TechBuzzPro

Enable Monitor Mode on RTL8188CUS USB in Raspbian

· 6 min read · Windows & PC

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To enable monitor mode for an RTL8188CUS USB Wi-Fi adapter on Raspbian, you need a driver that supports it and the right commands. The stock kernel driver (rtl8192cu) often does not allow monitor mode, so the practical route is to install a patched driver or use the airmon-ng toolset with a compatible driver. In short: confirm the adapter is detected, install the necessary packages, load the correct driver, then use airmon-ng or iw to switch the interface into monitor mode. This guide walks through the reliable steps and the common pitfalls.

What You'll Need

  • A Raspberry Pi running Raspbian (any recent release) with internet access.
  • An RTL8188CUS-based USB Wi-Fi adapter (check with lsusb; it should show Realtek RTL8188CUS).
  • A second network connection for the Pi (Ethernet or another Wi-Fi adapter) so you don't lose SSH or VNC when the adapter changes mode.
  • Basic familiarity with the terminal and sudo privileges.
  • Optional but recommended: a powered USB hub if the adapter draws too much power.

Step-by-Step

  1. Update the system and install required tools. Run sudo apt update then sudo apt install -y iw wireless-tools aircrack-ng. These provide iw, iwconfig, and airmon-ng.
  2. Verify the adapter is detected. Plug in the USB adapter and run lsusb. You should see a line containing Realtek Semiconductor Corp. RTL8188CUS. Also run ip link or iwconfig to see the interface name (often wlan0 or wlan1).
  3. Check the current driver. Run lsmod | grep rtl. If you see rtl8192cu or rtl8xxxu, that is the kernel driver. The rtl8192cu driver typically does not support monitor mode; rtl8xxxu may support it in newer kernels. If monitor mode fails later, you will need to replace the driver.
  4. Try enabling monitor mode with airmon-ng. Run sudo airmon-ng start wlan0 (replace wlan0 with your interface). If successful, it creates a new interface like wlan0mon. Check with iwconfig; the mode should say Mode:Monitor.
  5. If airmon-ng fails, try iw directly. First bring the interface down: sudo ip link set wlan0 down. Then set monitor mode: sudo iw dev wlan0 set type monitor. Bring it up: sudo ip link set wlan0 up. Verify with iw dev wlan0 info; look for type monitor.
  6. If the driver does not support monitor mode, install a patched driver. The most reliable method is to build and install the rtl8188eu driver from source, which supports monitor mode. First, install build tools: sudo apt install -y git build-essential dkms. Then clone a known repository (e.g., git clone https://github.com/aircrack-ng/rtl8188eus.git). Change into the directory and run sudo make dkms_install. Reboot. After reboot, the adapter should use the new driver. Check with lsmod | grep 8188.
  7. Blacklist the conflicting kernel driver. If the old driver loads first, create a blacklist file: sudo nano /etc/modprobe.d/blacklist-rtl8192cu.conf and add blacklist rtl8192cu and blacklist rtl8xxxu. Save and reboot. This ensures only the patched driver loads.
  8. Enable monitor mode again. After reboot, repeat step 4 or 5. With the patched driver, airmon-ng should work without errors.
  9. Test monitor mode. Run sudo airodump-ng wlan0mon (or your monitor interface). You should see nearby networks and clients. Press Ctrl+C to stop. If you see data, monitor mode is working.
  10. To return to normal mode, run sudo airmon-ng stop wlan0mon or bring the interface down and set type managed: sudo ip link set wlan0 down, sudo iw dev wlan0 set type managed, sudo ip link set wlan0 up.

Common Mistakes

  • Using the wrong interface name. If you have multiple Wi-Fi adapters, wlan0 might be the built-in one. Always confirm with iwconfig or ip link which interface belongs to the USB adapter.
  • Not blacklisting the default driver. The kernel may load rtl8192cu even after installing a patched driver, preventing monitor mode. Blacklisting is essential.
  • Forgetting to bring the interface down before changing mode. iw requires the interface to be down; otherwise you get a "Device or resource busy" error.
  • Power issues. The RTL8188CUS can draw more power than the Pi's USB ports provide, causing disconnects. Use a powered hub.
  • Assuming all RTL8188CUS adapters are identical. Some have different firmware or minor chip revisions; the patched driver may need adjustments.

Tips

  • Use a second network connection (Ethernet) so you don't lose remote access when the Wi-Fi adapter goes into monitor mode.
  • Keep the system updated; kernel updates can break out-of-tree drivers, so you may need to reinstall the driver after a kernel upgrade.
  • If airmon-ng reports processes that could interfere, you can stop them with sudo airmon-ng check kill, but this will disconnect your Wi-Fi; use Ethernet.
  • For persistent monitor mode across reboots, create a systemd service or add the commands to /etc/rc.local (if available) or a cron job with @reboot.
  • Test with iw dev to confirm the interface type before running packet capture tools.

Troubleshooting

  • airmon-ng says "monitor mode enabled" but iwconfig shows Mode:Managed. The driver likely does not support monitor mode. Install the patched driver as in step 6.
  • Interface disappears after setting monitor mode. Some drivers rename the interface (e.g., to wlan0mon). Check ip link for new names.
  • "SIOCSIFFLAGS: Operation not possible due to RF-kill" Run sudo rfkill unblock wifi and check rfkill list.
  • Driver fails to build. Ensure you have the correct kernel headers: sudo apt install raspberrypi-kernel-headers. Also check that you are using a compatible driver branch for your kernel version.
  • Adapter not detected after driver install. Reboot, then check dmesg | grep 8188 for errors. You may need to unplug and replug the adapter.
  • Monitor mode works but no packets captured. Ensure the interface is up and you are using the correct channel or hopping. Also verify that the adapter is not in a power-saving state.

Frequently Asked Questions

Can I enable monitor mode without installing a new driver?

Sometimes, if your kernel uses the rtl8xxxu driver, monitor mode may work out of the box with iw. But the older rtl8192cu driver does not support it. Try the airmon-ng step first; if it fails, install the patched driver.

Will monitor mode work on the built-in Raspberry Pi Wi-Fi?

The built-in Wi-Fi chip (e.g., BCM43438) generally does not support monitor mode. You need a USB adapter with a compatible chipset like the RTL8188CUS.

Do I need to disable network-manager?

Not necessarily, but network-manager may try to manage the interface and interfere. You can stop it temporarily with sudo systemctl stop NetworkManager or use airmon-ng check kill.

How do I revert to normal Wi-Fi mode?

Stop monitor mode with sudo airmon-ng stop wlan0mon or set the interface type back to managed with iw. Then restart network-manager if you stopped it.

Why does my adapter disconnect randomly in monitor mode?

Power draw is a common cause. Use a powered USB hub. Also check dmesg for USB errors; you may need to increase the USB current limit in /boot/config.txt with max_usb_current=1 (only for some Pi models).

Is monitor mode legal?

Monitor mode itself is legal, but capturing traffic you are not authorized to access may be illegal. Use it only on networks you own or have permission to test.