EVK-ELLA-W1 - User Guide
UBX-15012877 - R04
Early Production Information
Software
Page 20 of 24
4.7
Driver debugging
Driver debugging is provided via the kernel print function
printk
and the
proc
file system. The driver states are
recorded and can be retrieved through the proc file system during runtime. The following files containing the
debug information are provided (the actual location is dependent on the Linux kernel version):
/proc/mwlan/config or /proc/net/mwlan/config
/proc/mwlan/mlanX/info or /proc/net/mwlan/mlanX/info
/proc/mwlan/mlanX/debug or /proc/net/mwlan/mlanX/debug
mlanX is the name of the device node created at runtime. Other possibilities are uapX and wfdX for the
acces point and Wi-Fi Direct interfaces respectively.
Debug messages are also printed to the kernel ring buffer through printk calls. These messages can be accessed
raw using the
/proc/kmsg
interface or by the
dmesg
command. Alternatively, this can also be handled by more
advanced logging facilities.
4.7.1
Compile-time debug options
The extent to which debug messages are available for printing at runtime is controlled by the
CONFIG_DEBUG
variable in the driver's Makefile. The
CONFIG_DEBUG
variable can have the following values:
n: debug messages are disabled and not compiled into the driver module
1: all kinds of debug messages can be configured except for MENTRY, MWARN and MINFO. By default
MMSG, MFATAL and MERROR are enabled.
2: all kinds of debug messages can be configured
4.7.2
Runtime debug options
Once debugging is enabled in the Makefile, debug messages can be selectively enabled or disabled at runtime by
setting or clearing the corresponding bits of the
drvdbg
parameter:
$ hcitool -i hci0 scan
Scanning ...
00:22:58:F8:86:BB ae-sho-bln-test
$ l2ping -i hci0 00:22:58:F8:86:BB
Ping: 00:22:58:F8:86:BB from 00:06:C6:46:DF:7B (data size 44) ...
4 bytes from 00:22:58:F8:86:BB id 0 time 69.75ms
4 bytes from 00:22:58:F8:86:BB id 1 time 56.76ms
[...]