-
Notifications
You must be signed in to change notification settings - Fork 20
Dynamic debug howto
Disconnect wifi of the device
If this is Android OS, stop the GUI, by running:
adb shell stop
and get Android's shell
adb shell
Kill wpa_supplicant or hostapd if running.
Remove wl12xx modules
rmmod wl12xx_sdio wl12xx
Load modules with certain debug level
insmod /system/lib/modules/wl12xx.ko debug_level=8192
insmod /system/lib/modules/wl12xx_sdio.ko
Allow debug output for all wireless modules
echo 'module cfg80211 +p' > /sys/kernel/debug/dynamic_debug/control
echo 'module mac80211 +p' > /sys/kernel/debug/dynamic_debug/control
echo 'module wl12xx +p' > /sys/kernel/debug/dynamic_debug/control
echo 'module wl12xx_sdio +p' > /sys/kernel/debug/dynamic_debug/control
Activate the device ifconfig wlan0 up
At this stage relevant output appear on the console.
Some words about debug level.
The debug level values can be found at drivers/net/wireless/wl12xx/wl12xx.h
The current values are:
DEBUG_NONE = 0,
DEBUG_IRQ = BIT(0),
DEBUG_SPI = BIT(1),
DEBUG_BOOT = BIT(2),
DEBUG_MAILBOX = BIT(3),
DEBUG_TESTMODE = BIT(4),
DEBUG_EVENT = BIT(5),
DEBUG_TX = BIT(6),
DEBUG_RX = BIT(7),
DEBUG_SCAN = BIT(8),
DEBUG_CRYPT = BIT(9),
DEBUG_PSM = BIT(10),
DEBUG_MAC80211 = BIT(11),
DEBUG_CMD = BIT(12),
DEBUG_ACX = BIT(13),
DEBUG_SDIO = BIT(14),
DEBUG_FILTERS = BIT(15),
DEBUG_ADHOC = BIT(16),
DEBUG_AP = BIT(17),
DEBUG_MASTER = (DEBUG_ADHOC | DEBUG_AP),
DEBUG_ALL = ~0,
The script go.sh from ti-utils project has helpful commands in the matter:
wl12xx-tool.sh -d -1 Shows the current debug level value
wl12xx-tool.sh -d Sets the debug level (only in decimal)
wl12xx-tool.sh -h Prints out help with debug values like above