[svlug] wi-fi mysteries: I can iwlist scan but root can't?

Akkana Peck akkana at shallowsky.com
Tue Jan 20 18:30:03 PST 2015


A different sort of wi-fi problem: anybody ever seen a case where
iwlist works as a regular user but not as root?

This afternoon, after unsuccessfully trying to connect to a
nonexistent accesspoint (one I had been connected to earlier in
the day, so my script automatically tried to connect to it), I
found that iwlist wlan0 scan as root gave this:

Interface doesn't support scanning : Device or resource busy

If I kept running it over and over, eventually it would give a
list of accesspoints; then it would go back to giving the same
message, as though a successful run was tying up the interface
for a minute or so. iwconfig (to associate with an accesspoint)
also failed.

However, running the same iwlist command as myself worked fine,
and I could run it over and over. Of course, I couldn't try
connecting with iwconfig, since that has to be run as root.

The wifi chip is a Broadcom using the brcmsmac module; lshw says:
 BCM4313 802.11b/g/n Wireless LAN Controller
Software is Debian wheezy, updated a few days ago.
No NetworkManager or anything like that, just my python scripts that
call programs like iwconfig and iwlist.  Usually this combination
works pretty well; I've never seen this problem before.

Unloading and reloading the brcmsmac module didn't help, but rebooting
did, as long as I didn't try to connect to the nonexistent accesspoint
before doing anything else.  Any idea what might cause this?

        ...Akkana



More information about the svlug mailing list