Debugging hardware can be tricky especially when doing kernel and drivers development. It might become handy for you to add serial console to your device as well as using JTAG to debug your code.
→ gdb a very short introduction on the GNU Debugger
When encountering wireless bugs, such as connection drop or wpa rekeying issues, it is possible to remotely run
tcpdump in order to capture wireless management traffic for later analysis of the communication leading to the problem.
The command below will spawn a monitor interface with a mac80211 based driver, start
tcpdump and save the captured data locally into
ssh firstname.lastname@example.org 'grep -q mon0 /proc/net/dev || /usr/sbin/iw phy phy0 interface add mon0 type monitor; /sbin/ifconfig mon0 up; /usr/sbin/tcpdump -s 0 -i mon0 -y IEEE802_11_RADIO -w -' > /tmp/wifi.pcap
A smaller alternative to
tcpdump is the
iwcap utility. Its MIPS binary only ~5KB large and it does not require
libpcap to function.
It also supports the filtering of data frames through the
-D switch to cut down the amount of captured traffic;
ssh email@example.com 'grep -q mon0 /proc/net/dev || /usr/sbin/iw phy phy0 interface add mon0 type monitor; /sbin/ifconfig mon0 up; /usr/sbin/iwcap -i mon0 -s' > /tmp/wifi.pcap
The following command restarts hostapd in debug mode and stores the log into the local /tmp directory.
ssh firstname.lastname@example.org 'killall -9 hostapd; /usr/sbin/hostapd -dd /var/run/hostapd-phy0.conf' > /tmp/hostapd.log
doc/devel/debugging.txt · Last modified: 2012/11/30 16:48 by karlp