Problem with JetBot with Edimax N150 (Solved)

I hope someone else finds this useful.

I was playing around with my SparkFun Jetbot and was having endless trouble with keeping the wifi connection alive with the N150 (I even gave up and used ethernet for a while).

I tried a whole host of fixes to resolve the issue: Using a different brand of access point, changing the power saving potions, looking into alternate drivers. Nothing worked. My connection would only last about 1 minute before dying.

I had a hunch that this had to have something to do with network scanning. so I decided to turn up the debug level on NetworkManager and correlate the network dying with what it was doing.

What I found was that the network dying corresponded to the exact time NetworkManager scanned the extra interface, wlan1.

There’s certainly more than one way to deal with this, but I tried creating a file:

/etc/NetworkManager/conf.d/10-no-wlan1.conf

containing:

[keyfile]

unmanaged-devices+=interface-name:wlan1

which prevents NetworkManager from and the issue went away.

BTW, one way to quickly test whether this issue is affecting you is to do

sudo ifconfig wlan1 down

That will remove the device and prevent NetworkManager from scanning wlan1 , but will re-appear when the device is unplugged and plugged back in again or the machine is rebooted.