[kismac] Solution to AE Passive Mode kernel panics, unable to load Monitor Mode

  • From: Ricardo Lugo <punka@xxxxxxxxxx>
  • To: kismac@xxxxxxxxxxxxx
  • Date: Sun, 30 Apr 2006 15:10:44 -0400

Dear Kismac developers:

I have a 1.33Ghz G4 AI PowerBook, and keep getting kernel panics or "Unable to load Monitor Mode" errors when trying to load the AirPort Extreme passive mode driver in Kismac - and have found the solution that allows dynamically-loaded passive mode to work!

Symptoms ======== Kernel Panic when loading driver

"Unable to load Monitor Mode" when trying to load driver

Unable to unload AppleAirPort2.kext, something like this appears in dmesg:
kernel[0]: com.apple.iokit.AppleAirPort2: AirPortPCI has 1 instance(s)
kernel[0]: com.apple.iokit.AppleAirPort2: PCIWUserClient has 1 instance(s)
kernel[0]: com.apple.iokit.AppleAirPort2: PCIWirelessTimer has 8 instance(s)
kernel[0]: com.apple.iokit.AppleAirPort2: AirPortPCI_MM has 1 instance (s)

Resolution ========= 0) Turn AirPort Off 1) `killall eapolclient` 2) Remove the AirPort status in menu bar

If one boots up with AirPort Off, the kext is still unused and as such can be unloaded, so the passive mode driver will load in this state. But its a royal PITA to reboot every time you want to use KisMac.

Once you activate AirPort and connect to the internet, however, the kext gets put into use and one must first stop all programs / deamons that keep it in use, as that prevents it from unloading.

Eapolclient opens when one connects to a WPA2 Enterprise (the one with 802.11x, but it could open for others?). Even if airport is turned off (or port is removed), the eapolclient daemon remains open. If one attempts to unload AppleAirPort2.kext without first killing/ stopping this daemon, the kernel panics.

If AirPort is ever turned on, the "AirPort status in the menu bar" prevents AppleAirPort2.kext from unloading, so turning AirPort off, then removing it from the menu bar effectively removes all active instances of the kernel extension from the system, allowing it to unload.

Only after airport is turned off, eapolclient is stopped, and the menu bar status is removed, will KisMac be able to unload the kext, load it's driver, and be able to scan passively.

I hope this solution finds it's way into KisMac's source!

- Rick

Other related posts: