On Jul 22, 2014, at 12:59 AM, Stuart Henderson <s...@spacehopper.org> wrote: >> >> Out of curiosity, what happens? > > It prints the status, > > iwn0: flags=8847<UP,BROADCAST,DEBUG,RUNNING,SIMPLEX,MULTICAST> mtu 1500 > lladdr 8c:70:5a:62:b7:f8 > priority: 4 > groups: wlan egress > media: IEEE802.11 autoselect (DS1 mode 11g) > status: active > ieee80211: nwid TP-LINK_8F014A chan 6 bssid f8:1a:67:8f:01:4a 189dB > > then there's a 30 second pause during which the led flashes, then ifconfig exits > without further output. Then I have to ifconfig iwn0 down, ifconfig iwn0 up, > and start dhclient again which has exited due to the interface state change
Yeah, that is interesting. I didnt really notice it before, but scan doesnt return anything if Im connected to my network, but the act of doing it changes the status from active to no network. Then it returns a list if invoked again. I thought I might run scan periodically to check connectivity, but the act of doing so seems to knock me off the air. A related wrinkle is that the status never changes to no network if the AP is powered off. So you cant check actively (with scan anyway) and you cant be informed passively if youve moved out of range. Darn. About the only thing I noticed was that the mode listed in the media line changes. Not sure thats actually indicative of anything > > While I don't dispute that this behaviour is a bug, it doesn't seem > right for the script to be doing this, surely if you know the password > you should also know if wep is needed? It would seem safer generally > to only use the expected protocol. True. wiconfigs author is open to changing how this works. Apparently, in an upcoming OBSD release, ifconfig will display the security offered by the AP. > > Do you need a full reboot at this point, or does restarting the interface > (ifconfig down+up) work? Do you get anything interesting (look in > /var/log/messages) if "ifconfig iwn0 debug" is set? Turns out, no. What I needed to do was clear the WEP key (by using the -nwkey" parameter) and then the interface was usable. A subsequent ifconfig with wpakey specified got me connected.