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.