Wireless network problem with Access Point selection using ifup
I have a wireless-N Linksys router centrally located in my home. I also have 2 each Linksys E1000 range extenders located at each end of the house. I have Desktop computers in fixed locations around the house. Using Network Manager all is well with all of them. I can see all the Access Points and select the one with the best signal. However network manager doesn't seem to be a valid option for all of them and I'm using traditional ifup with static configurations.
When using ifup, wrong Access Points are being chosen by whatever the underlying userland/kernel process is that is supposed to select it. And I admit I do not know what that process is. It seems it wants to select the one with the weakest signal instead of the strongest. Most of the time, the AP furthest away is selected. Often the router in the middle of the house is selected. Very very rarely is the closest AP chosen. When the furthest is chosen, I am unable to use the network. When the router in the middle of the home is selected, the connection comes to a crawl and often disassociates in the middle of use. When it does choose the correct AP, all is well until I reboot the machine.
I'm being told that when using ifup and WPA, as opposed to WEP, that userland has no choice in the selection of an Access Point by MAC address, only by SSID. All my APs have the same SSID.
I am using SuSE 12.2 Linux and 3.6.6 kernels on all these machines and the wireless hardware I am using on all these is are ASUS USB-300N adapters.
lsusb output: Bus 001 Device 004: ID 0b05:17ab ASUSTek Computer, Inc.
The kernel driver being used is rtl8192cu.
Some sample dmesg and iwconfig output when the AP at the other end of the house was selected:
[ 19.876977] wlan0: authenticate with c8:d7:19:7a:ab:1e [ 19.901616] wlan0: send auth to c8:d7:19:7a:ab:1e (try 1/3) [ 19.904099] wlan0: authenticated [ 19.916679] wlan0: associate with c8:d7:19:7a:ab:1e (try 1/3) [ 19.925839] wlan0: RX AssocResp from c8:d7:19:7a:ab:1e (capab=0x411 status=0 aid=2) [ 19.925975] wlan0: associated [ 19.925988] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
wlan0 IEEE 802.11bgn ESSID:"hounschell-1"
Mode:Managed Frequency:2.437 GHz Access Point:
C8:D7:19:7A:AB:1E
Bit Rate=150 Mb/s Tx-Power=20 dBm
Retry long limit:7 RTS thr=2347 B Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=66/70 Signal level=-44 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:9 Missed beacon:0
This AP is at the other end of the house. The network was unusable after this boot.
Is this likely a kernel issue? If so, I would be willing to file a BUG report and even help with it if I can with my configuration.
Regards
Mark
Quoted 2 lines · Mark Hounschell
I'm using
traditional ifup with static configurations.
You should at least run wpa_supplicant, which will pick a better network and reconnect if the connection drops etc. Almost no device does that by itself any more.
johannes
Quoted 7 lines · Johannes Berg
Quoted 2 lines · Mark Hounschell
I'm using
traditional ifup with static configurations.You should at least run
wpa_supplicant, which will pick a better network and reconnect if the connection drops etc. Almost no device does that by itself any more.
wpa_supplicant is running.
#ps ax | grep wpa
wpa_supplicant -iwlan0 -c/var/run/wpa_supplicant-wlan0.conf -Dnl80211,wext -P/var/run/wpa_supplicant/wlan0.pid -B
When the router in the middle of the house is chosen, as opposed to the range extender in the very same room, the network works for a time but eventually disassociates, usually reason 7, and never reconnects to anything.
Mark
Quoted 13 lines · Mark Hounschell
Quoted 7 lines · Johannes Berg
Quoted 2 lines · Mark Hounschell
I'm using
traditional ifup with static configurations.You should at least run
wpa_supplicant, which will pick a better network and reconnect if the connection drops etc. Almost no device does that by itself any more.
wpa_supplicantis running.#ps ax | grep wpa
Quoted 9 lines
wpa_supplicant-iwlan0-c/var/run/wpa_supplicant-wlan0.conf-Dnl80211,wext -P/var/run/wpa_supplicant/wlan0.pid -BWhen the router in the middle of the house is chosen, as opposed to the range extender in the very same room, the network works for a time but eventually disassociates, usually reason 7, and never reconnects to anything.
Hi Johannes,
Thanks for responding. Do you think my problem is a wpa_supplicant issue, a kernel issue, or a Dist issue?
Regards
Mark
Quoted 18 lines · Mark Hounschell
Quoted 17 lines · Mark Hounschell
Quoted 7 lines · Johannes Berg
Quoted 2 lines · Mark Hounschell
I'm using
traditional ifup with static configurations.You should at least run
wpa_supplicant, which will pick a better network and reconnect if the connection drops etc. Almost no device does that by itself any more.
wpa_supplicantis running.#ps ax | grep wpa
wpa_supplicant-iwlan0-c/var/run/wpa_supplicant-wlan0.conf-Dnl80211,wext -P/var/run/wpa_supplicant/wlan0.pid -B
Quoted 8 lines
Quoted 5 lines
When the router in the middle of the house is chosen, as opposed to the range extender in the very same room, the network works for a time but eventually disassociates, usually reason 7, and never reconnects to anything.
Thanks for responding. Do you think my problem is a
wpa_supplicantissue, a kernel issue, or a Dist issue?
I'd say it's a wpa_s issue, but I can't remember any time that it didn't reconnect after getting disconnected, so maybe there's an issue with your driver/device that causes it to need a reset or something ... hard to tell more without at least the supplicant log.
johannes
Quoted 9 lines · Johannes Berg
Quoted 3 lines
Thanks for responding. Do you think my problem is a
wpa_supplicantissue, a kernel issue, or a Dist issue?I'd say it's a
wpa_sissue, but I can't remember any time that it didn't reconnect after getting disconnected, so maybe there's an issue with your driver/device that causes it to need a reset or something ... hard to tell more without at least the supplicant log.
I am wpa_supplicant stupid. I'll investigate and see if I can provide more info. I have 4 of these devices scattered about the house on Linux boxes. They all do the same thing. I also have 3 TV's and a windows laptop my wife uses that all connect properly to it's closest AP. As you can see this is a project to make the whole house wireless.
Also, personally I'm more concerned as to why the Linux boxes don't just pick the closest AP to begin with. If it did, and it actually has, it never disconnects and will be reliable until a reboot.
Thanks
Mark
Quoted 5 lines · Mark Hounschell
I have more info. Attached are 3 files. One for each of the APs selected. The furthest away, the router in the middle and even one for the closest/correct AP. In each file is the logfile for
wpa_swith the -dd option added, the dmesg output for that particular boot, and the iwconfig output.
You seem to have driver issues. After getting disconnected (for some reason, but this isn't surprising), you get:
wlan0: State: COMPLETED -> DISCONNECTED
...
Scan requested (ret=0) - scan timeout 30 seconds
nl80211: Event message available
nl80211: Scan trigger
Scan timeout - try to get results
^ timeout here
wlan0: Event SCAN_RESULTS (3) received
nl80211: Received scan results (0 BSSes)
wlan0: BSS: Start scan result update 3
wlan0: New scan results available
wlan0: Selecting BSS from priority group 0
wlan0: No suitable network found
wlan0: Setting scan request: 5 sec 0 usec
wlan0: Checking for other virtual interfaces sharing same radio (phy0) in event_scan_results Scan SSID - hexdump_ascii(len=12):
68 6f 75 6e 73 63 68 65 6c 6c 2d 31 hounschell-1
wlan0: Starting AP scan for wildcard SSID
nl80211: Scan SSID - hexdump_ascii(len=12):
68 6f 75 6e 73 63 68 65 6c 6c 2d 31 hounschell-1 nl80211: Scan SSID - hexdump_ascii(len=0): [NULL]
nl80211: Scan trigger failed: ret=-16 (Device or resource busy)
^ new trigger fails
So whatever driver you're using seems to be broken.
johannes
Quoted 36 lines · Johannes Berg
Quoted 5 lines · Mark Hounschell
I have more info. Attached are 3 files. One for each of the APs selected. The furthest away, the router in the middle and even one for the closest/correct AP. In each file is the logfile for
wpa_swith the -dd option added, the dmesg output for that particular boot, and the iwconfig output.You seem to have driver issues. After getting disconnected (for some reason, but this isn't surprising), you get:
wlan0: State: COMPLETED -> DISCONNECTED
...
Scan requested (ret=0) - scan timeout 30 seconds
nl80211: Event message available
nl80211: Scan trigger
Scan timeout - try to get results^ timeout here
wlan0: Event
SCAN_RESULTS(3) received
nl80211: Received scan results (0 BSSes)
wlan0: BSS: Start scan result update 3
wlan0: New scan results available
wlan0: Selecting BSS from priority group 0
wlan0: No suitable network found
wlan0: Setting scan request: 5 sec 0 usec
wlan0: Checking for other virtual interfaces sharing same radio (phy0) inevent_scan_resultsScan SSID -hexdump_ascii(len=12):68 6f 75 6e 73 63 68 65 6c 6c 2d 31 hounschell-1 wlan0: Starting AP scan for wildcard SSID nl80211: Scan SSID - hexdump_ascii(len=12): 68 6f 75 6e 73 63 68 65 6c 6c 2d 31 hounschell-1nl80211: Scan SSID -
hexdump_ascii(len=0): [NULL]
nl80211: Scan trigger failed: ret=-16 (Device or resource busy)
Quoted 8 lines
^ new trigger fails
So whatever driver you're using seems to be broken.
johannes
The driver is use has was identified in the original email. So I guess this is the right place to report this issue? In each of the wpa log files I See in the beginning, a section like this:
nl80211: Received scan results (4 BSSes)
wlan0: BSS: Start scan result update 1
wlan0: BSS: Add new id 0 BSSID c8:d7:19:7a:ab:1e SSID 'hounschell-1'
wlan0: BSS: Add new id 1 BSSID 20:aa:4b:b2:dd:79 SSID 'hounschell-1'
wlan0: BSS: Add new id 2 BSSID 00:18:f8:ff:72:d5 SSID 'hounschell-1'
wlan0: BSS: Add new id 3 BSSID 00:1a:70:6d:99:50 SSID 'MACDONALD'
Every time the first one listed is the one actually selected and each time is different and usually NOT the closest. Why? This machine is NOT roaming. It is a Desktop in a fixed location. The AP is within 15ft of the ASUS USB adapter and in direct line of sight. There may be more than one problem here. I think one of the problems is right here. Above 20:aa:4b:b2:dd:79 is the closest AP. Why is it not first in the list? Why, when it selects one of the others and it can't figure out it selected the wrong one and reselect the right one seems like a different problem. After all when it does select the correct one, all is good but the actual bandwidth.
Mark
Quoted 2 lines · Mark Hounschell
The driver is use has was identified in the original email. So I guess this is the right place to report this issue?
Yeah, I guess Larry should take a look.
Quoted 10 lines
In each of the wpa log files I See
in the beginning, a section like this:nl80211: Received scan results (4 BSSes)
wlan0: BSS: Start scan result update 1
wlan0: BSS: Add new id 0 BSSID c8:d7:19:7a:ab:1e SSID 'hounschell-1'
wlan0: BSS: Add new id 1 BSSID 20:aa:4b:b2:dd:79 SSID 'hounschell-1'
wlan0: BSS: Add new id 2 BSSID 00:18:f8:ff:72:d5 SSID 'hounschell-1'
wlan0: BSS: Add new id 3 BSSID 00:1a:70:6d:99:50 SSID 'MACDONALD'
Quoted 2 lines
Every time the first one listed is the one actually selected and each time is different and usually NOT the closest.
That's expected, the order is random by the order in which it was found in scanning etc. There's no inherent order here.
Quoted 4 lines
It is a Desktop in a fixed location. The AP is within 15ft of the ASUS USB adapter and in direct line of sight. There may be more than one problem here. I think one of the problems is right here. Above 20:aa:4b:b2:dd:79 is the closest AP. Why is it not first in the list?
See above.
Quoted 4 lines
Why, when it selects one
of the others and it can't figure out it selected the wrong one and reselect the right one seems like a different problem. After all when it does select the correct one, all is good but the actual bandwidth.
Well so I suspect the driver is also not reporting useful signal strength so that wpa_s doesn't know which one to select. And then when the connection fails, the driver is refusing scanning so it can't even reconnect to a better AP ...
IOW, all driver problems, and I'm not familiar enough with that driver to tell you what's going on.
johannes
Quoted 35 lines · Johannes Berg
Quoted 2 lines · Mark Hounschell
The driver is use has was identified in the original email. So I guess this is the right place to report this issue?
Yeah, I guess Larry should take a look.
Quoted 10 lines
In each of the wpa log files I See
in the beginning, a section like this:nl80211: Received scan results (4 BSSes)
wlan0: BSS: Start scan result update 1
wlan0: BSS: Add new id 0 BSSID c8:d7:19:7a:ab:1e SSID 'hounschell-1'
wlan0: BSS: Add new id 1 BSSID 20:aa:4b:b2:dd:79 SSID 'hounschell-1'
wlan0: BSS: Add new id 2 BSSID 00:18:f8:ff:72:d5 SSID 'hounschell-1'
wlan0: BSS: Add new id 3 BSSID 00:1a:70:6d:99:50 SSID 'MACDONALD'Quoted 2 lines
Every time the first one listed is the one actually selected and each time is different and usually NOT the closest.
That's expected, the order is random by the order in which it was found in scanning etc. There's no inherent order here.
Quoted 4 lines
It is a Desktop in a fixed location. The AP is within 15ft of the ASUS USB adapter and in direct line of sight. There may be more than one problem here. I think one of the problems is right here. Above 20:aa:4b:b2:dd:79 is the closest AP. Why is it not first in the list?
See above.
Quoted 4 lines
Why, when it selects one
of the others and it can't figure out it selected the wrong one and reselect the right one seems like a different problem. After all when it does select the correct one, all is good but the actual bandwidth.
Quoted 8 lines
Well so I suspect the driver is also not reporting useful signal strength so that
wpa_sdoesn't know which one to select. And then when the connection fails, the driver is refusing scanning so it can't even reconnect to a better AP ...IOW, all driver problems, and I'm not familiar enough with that driver to tell you what's going on.
Should I file and bug report and/or contact the author?
Mark
rtl8192cu problem - Re: Wireless network problem with Access Point selection using ifup
Quoted 1 line · Mark Hounschell
Should I file and bug report and/or contact the author?
Larry, the issue seems to be that rtl8192cu doesn't scan after having disconnected at least once, and maybe doesn't report any/good signal strength values.
johannes
Re: rtl8192cu problem - Re: Wireless network problem with Access Point selection using ifup
Quoted 7 lines · Johannes Berg
Quoted 1 line · Mark Hounschell
Should I file and bug report and/or contact the author?
Larry, the issue seems to be that rtl8192cu doesn't scan after having disconnected at least once, and maybe doesn't report any/good signal strength values.
The problem is likely that rtl8192cu goes mute after a disconnect. I'm not sure if it happens only with WPA/WPA2 or if all encryption methods are affected. I have not yet found the problem, but this and other reports have increased the priority.
Larry
Re: rtl8192cu problem - Re: Wireless network problem with Access Point selection using ifup
Quoted 5 lines · Larry Finger
Quoted 4 lines · Johannes Berg
Quoted 1 line · Mark Hounschell
Should I file and bug report and/or contact the author?
Quoted 9 lines
Quoted 3 lines
Larry, the issue seems to be that rtl8192cu doesn't scan after having disconnected at least once, and maybe doesn't report any/good signal strength values.
The problem is likely that rtl8192cu goes mute after a disconnect. I'm not sure if it happens only with WPA/WPA2 or if all encryption methods are affected. I have not yet found the problem, but this and other reports have increased the priority.
FYI,
If you look at the logs for the instance when the furthest away AP was selected (info-furthest-away), At least I, see no disconnections at all. It selected the furthest AP yet was unusable. Yet no disconnects and iwconfig showed good.
Mark
Re: rtl8192cu problem - Re: Wireless network problem with Access Point selection using ifup
Quoted 16 lines · Mark Hounschell
Quoted 5 lines · Larry Finger
Quoted 4 lines · Johannes Berg
Quoted 1 line · Mark Hounschell
Should I file and bug report and/or contact the author?
Quoted 9 lines
Quoted 3 lines
Larry, the issue seems to be that rtl8192cu doesn't scan after having disconnected at least once, and maybe doesn't report any/good signal strength values.
The problem is likely that rtl8192cu goes mute after a disconnect. I'm not sure if it happens only with WPA/WPA2 or if all encryption methods are affected. I have not yet found the problem, but this and other reports have increased the priority.
Quoted 7 lines
FYI,
If you look at the logs for the instance when the furthest away AP was selected (info-furthest-away), At least I, see no disconnections at all. It selected the furthest AP yet was unusable. Yet no disconnects and iwconfig showed good.
I haven't noticed any activity on this. Should I just toss out all my rtl8192cu devices? If so, can anyone recommend ANY USB wireless-N devices that actually work as they should in Linux with Linux drivers?
Thanks and Regards
Mark