
I spent ages last night getting wireless working on an embedded ARM device. The problem is that the first time wpa_supplicant runs, it can't see any SSIDs, and doesn't get anywhere. The second time it runs, it's all fine. My eventual solution was to create a script that runs wpa_supplicant, waits five seconds, kills it, then runs it again. So, so dirty. This issue only appears to occur with one of my three USB wifi adapters. However of the others, one isn't supported by any version of Linux, and the other one is dodgy on 3.2 kernels.. but post 3.2.x kernels don't work reliably on this hardware. Soo.. while I wait for a fourth bloody USB adapter with yet another wifi chipset in it to arrive.. does anyone have any ideas how to fix the current one? I'm guessing there's something specific the wifi adapter needs initialised before it will work, but I just don't know what.. Cheers, Toby

I spent ages last night getting wireless working on an embedded ARM device. The problem is that the first time wpa_supplicant runs, it can't see any SSIDs, and doesn't get anywhere. The second time it runs, it's all fine.
Does this problem occur under Linux on a regular PC too?
My eventual solution was to create a script that runs wpa_supplicant, waits five seconds, kills it, then runs it again. So, so dirty.
Yeah that never leaves you feeling good about a project.
This issue only appears to occur with one of my three USB wifi adapters. However of the others, one isn't supported by any version of Linux, and the other one is dodgy on 3.2 kernels.. but post 3.2.x kernels don't work reliably on this hardware.
Soo.. while I wait for a fourth bloody USB adapter with yet another wifi chipset in it to arrive.. does anyone have any ideas how to fix the current one?
I'm guessing there's something specific the wifi adapter needs initialised before it will work, but I just don't know what..
Is there a way to 'open' the adapter via some other means before loading wpa_supplicant? Otherwise maybe strace and see what the differences between the two runs are. James

On 13/03/13 11:35, James Harper wrote:
I spent ages last night getting wireless working on an embedded ARM device. The problem is that the first time wpa_supplicant runs, it can't see any SSIDs, and doesn't get anywhere. The second time it runs, it's all fine.
Does this problem occur under Linux on a regular PC too?
The embedded board runs linux kernel 3.2, and later kernels weren't working at all. When I tried a different embedded board, and a PC, both with later kernels and ubuntu distros, it Just Worked. But I didn't have any hardware running the same distro and kernel to test on. So I guess it looks like something is flakey in the versions of either (or both) the wpa_supplicant and the wifi chipset driver.
My eventual solution was to create a script that runs wpa_supplicant, waits five seconds, kills it, then runs it again. So, so dirty.
Yeah that never leaves you feeling good about a project.
This issue only appears to occur with one of my three USB wifi adapters. However of the others, one isn't supported by any version of Linux, and the other one is dodgy on 3.2 kernels.. but post 3.2.x kernels don't work reliably on this hardware.
Soo.. while I wait for a fourth bloody USB adapter with yet another wifi chipset in it to arrive.. does anyone have any ideas how to fix the current one?
I'm guessing there's something specific the wifi adapter needs initialised before it will work, but I just don't know what..
Is there a way to 'open' the adapter via some other means before loading wpa_supplicant?
You can try and initialise it via the old-school wireless configuration methods (as if you were using WEP or no encryption at all). I was trying that, but it didn't seem to be helping.
Otherwise maybe strace and see what the differences between the two runs are.
Yeah :( Getting into the realm of Too Hard though. T

On 13/03/2013, at 11:15, Toby Corkindale <toby.corkindale@strategicdata.com.au> wrote:
I spent ages last night getting wireless working on an embedded ARM device. The problem is that the first time wpa_supplicant runs, it can't see any SSIDs, and doesn't get anywhere. The second time it runs, it's all fine.
My eventual solution was to create a script that runs wpa_supplicant, waits five seconds, kills it, then runs it again. So, so dirty.
I'm guessing there's something specific the wifi adapter needs initialised before it will work
Could you try sending the scan command to the supplicant before trying to associate? I don't have the commands in front of me but the wpa_supplicant cli tool has lots of hints and various things to control the card

On 13/03/13 11:15, Toby Corkindale wrote:
I spent ages last night getting wireless working on an embedded ARM device. The problem is that the first time wpa_supplicant runs, it can't see any SSIDs, and doesn't get anywhere. The second time it runs, it's all fine. My eventual solution was to create a script that runs wpa_supplicant, waits five seconds, kills it, then runs it again. So, so dirty.
I had a similar problem on an Orinoco card in an old Toshiba Portege (Lucent/Agere Hermes chipset), and had ended up with the same solution as you: a few pre-up stanzas in the network interfaces file to start up wpa_supplicant and kill it after a second. Not nice, but it worked every time. I got hold of a newer version of the the (closed) firmware for the card, but it didn't help. I also messed around with wpa_supplicant, but didn't find a cleaner way to get it to just initialize and exit. Glenn -- sks-keyservers.net 0xb1e82ec9228ac090
participants (4)
-
Glenn McIntosh
-
hannah commodore
-
James Harper
-
Toby Corkindale