Enable monitoring mode for RTL8188CUS via USB on Raspbian
Turns out the steps to recompile and load the rtlwifi module are correct. The problem is iwconfig not working to enable/determine monitoring mode in this situation.
Instead, I used iw as outlined by Steven Gordon - Capturing WiFi in Monitor mode with iw and it worked.
To summarize:
STEP 6b: List the physical network interfaces available
$ iw dev
STEP 7: Determine if the physical interface supports monitoring mode
$ iw phy phy0 info... lots of stuff ...Supported interface modes: * IBSS * managed * AP * AP/VLAN * monitor * mesh point * P2P-client * P2P-GO... lots more stuff ...
STEP 8: Add a monitoring interface to that physical card
You need to explicitly add a 'monitoring' interface for the hardware you have.
$ sudo iw phy phy0 interface add mon0 type monitor
STEP 8: Start monitoring
In my case, I'm using tshark to facilitate monitoring, displaying a few useful fields rather than a lot of noise.
$ sudo apt-get install tshark$ sudo tshark -i mon0 -f 'broadcast' -T fields -e frame.time_epoch -e wlan.sa -e radiotap.dbm_antsignal -e wlan.fc.type -e wlan.fc.subtype
Done.
For anyone still interested, the rtl8192cu
is now compiled into the raspberry kernel by default. It can be activated by commenting out the blacklist in /etc/modprobe.d/blacklist-rtl8192cu.conf
. Executing sudo iwconfig wlan0 mode monitor
after a reboot will activate monitoring mode without any further problems.