failure using wpa_supplicant from command line

Gucea Doru gucea.doru at
Tue Oct 4 05:54:48 PDT 2016

On Sat, Sep 17, 2016 at 8:19 PM, Jouni Malinen <j at> wrote:
> On Fri, Sep 02, 2016 at 02:52:00PM +0300, Gucea Doru wrote:
>> I further investigated the problem and discovered that the scanning
>> process is not started because wpa_supplicant times-out on a netlink
>> socket.
>> Strace shows me that there is a timeout on a pselect call with EAGAIN
>> ( For reference I also attach lsof
>> output (
> Where do you see EAGAIN there?

I just wanted to point out that there is a timeout on the pselect call
and the function is called AGAIN.
EAGAIN is a different thing, sorry for the misleading.

>> Could someone help me to identify what is the expected input for this
>> socket and why the socket times out?
> I'm not sure I've understood what you describe as an issue here.. The
> eloop pselect calls are expected to time out if there are no pending
> events for the process.
>> What is really interesting is that a kill -1 on the wpa_supplicant
>> process determines a reconfiguration and the and the scanning process
>> is started (
> SIGHUP requests a new scan to be run..

Thanks, in the meantime I also discovered this by inspecting the code.

>> On Sat, Aug 27, 2016 at 3:34 PM, Gucea Doru <gucea.doru at> wrote:
>> >  3. wpa_supplicant -dd -Dnl80211 -iwlan0 -c./ap.conf
>> > ----------
>> >
>> >  - logcat messages:
> While this log shows a case where there is nothing requesting a scan to
> be run.
>> > As you can notice from the logcat messages, there are no error
>> > messages (E) only debug (D) messages and the scanning/association
>> > process is not started.
>> >
>> > **Judging from the logcat messages do you have any idea where the problem is?**
> What problem? This logs seems to show expected wpa_supplicant behavior..
> If you want to scan for networks on Android, you'll need something to
> issue the scan command. Normally, this would be the Wi-Fi framework.
> Since you are running wpa_supplicant manually with custom configuration,
> Wi-Fi framework may not be able to support such a case.

The problem is that the scanning for new networks is issued only after SIGHUP:

- If I start wpa_supplicant with wpa_supplicant -Dnl80211 -iwlan0
-c./ap.conf the scan process is not started;
- If I send SIGHUP to the wpa_suplicant process then the scan process
is started the connection to the AP specified in the configuration
file is successful.

I just want wpa_suppllicant to start the scan process without sending
a SIGHUP. Does the Android framework use any addition parameter for
wpa_supplicant in order to issue the scan command?

>> > P.S.: Just for reference, I also attach the wpa_supplicant messages
>> > from a successful authentication (when wpa_supplicant is used
>> > automatically by the Android framework):
> And this one is showing the Android framework requesting a scan and
> wpa_supplicant executing it.

I also tried to start wpa_supplicant from comman line with the same
configuration files used by the Android framework but the problem

> --
> Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list