Re: Scan fails to find wireless networks

Joerg Albert <[email protected]> Thu, 14 Oct 2004 05:32:14 +0200 (CEST)
Newsgroups gmane.linux.drivers.at76c503a.user
Message-ID <[email protected]>
Hi,

On Tue, 12 Oct 2004, Mike Pinna wrote:

> After I have brought up the interface would you expect it to work
> immediately, or is it expected that for some time data sent on the
> interface might be lost?  I'm consistently getting behaviour like the
> following, with apparently complete packet loss for around six seconds
> after the interface comes up:
>
> # ifconfig wlan0 down; ifconfig wlan0 192.168.5.78; ping 192.168.5.1
> PING 192.168.5.1 (192.168.5.1): 56 data bytes
> 64 bytes from 192.168.5.1: icmp_seq=6 ttl=64 time=28.3 ms
> 64 bytes from 192.168.5.1: icmp_seq=7 ttl=64 time=13.8 ms
> 64 bytes from 192.168.5.1: icmp_seq=8 ttl=64 time=13.7 ms
> 64 bytes from 192.168.5.1: icmp_seq=9 ttl=64 time=13.5 ms
> --- 192.168.5.1 ping statistics ---
> 10 packets transmitted, 4 packets received, 60% packet loss
>
> This affects all data transfer consistently for that amount of time, not
> just ping.

Yes, that's the same here:
---
roke:~# ifconfig wlan0 192.168.1.54; ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: icmp_seq=6 ttl=64 time=9.5 ms
64 bytes from 192.168.1.1: icmp_seq=7 ttl=64 time=2.8 ms
64 bytes from 192.168.1.1: icmp_seq=8 ttl=64 time=3.0 ms
64 bytes from 192.168.1.1: icmp_seq=9 ttl=64 time=3.3 ms
---

Most of the time is spent waiting for the result of two scan runs (~ 2.5 s
each) - you see it if you exec.
	iwpriv wlan0 set_debug 0x180003
before the above line.

> [ assertion failures on arm ]
> > What did you run before the "ifconfig" here, a "iwlist wlan0 scan"?
>
> Yes.  I can reproduce this as follows, immediately after loading the
> modules:
>
> # iwlist wlan0 scan
> wlan0     No scan results
> # ifconfig wlan0 127.0.0.2
> at76c503.c: at76c503.c:2905 assertion dev->istate == INIT failed
> #
>
> I could probably reproduce the `dev->istate == SCANNING' assertion
> failure easily enough if that would be interesting.

I'll look into this during the weekend.

> Also I'm having another problem that is rather serious for me, which is
> that scanning for networks often fails to come up with anything near a
> complete list of available networks.  There should be five networks
> discovered, but often I only see as few as one or zero.  My driver is
> the at76c505-rfmd2958 with version 1.101.0 #86 of the firmware.
>
> Is it possible a newer version of the firmware will help with this?
> I've tried it with the same device under Windows and it seemed to work a
> lot better with the binary drivers that came with the device, though
> it's hard to know what was going on behind the scenes and extracting the
> firmware from those drivers for use with your driver caused little or no
> improvement.
>
> Other wireless networking hardware we've tried (mainly PCMCIA) has no
> problem finding all networks in a scan under linux.

There was a bug in the i/f to "iwlist wlanX scanning" (I guess you use
this for scanning) which let it report only a random subset of the whole
table. It's fixed in the cvs 0.12beta21.
If you still miss some APs, increase the minimum channel time, i.e.
the device scans on a channel, before it hops to the next one:

	iwpriv wlan0 scan_times N 120

with N = 30,40, ... (N=10 is the default). The 120 is the max. channel
time, increasing it let iwlist fail here.

HTH,

Jörg.