Julien Massot | 9 May 17:46 2012

Agent Request Input Timeout / wap_supplicant BSS expiration

Hi all,

Sometimes the connection to a network fails because I take too much
time to provide the reply from the agent.

connmand[19268]: src/service.c:request_input_cb() RequestInput return, 0x8ec0448
connmand[19268]: src/service.c:request_input_cb() error:
connmand[19268]: src/service.c:service_save() service 0x8ec0448 new 0
connmand[19268]: src/service.c:__connman_service_get_order() service
0x8ebdd30 name Wired order 1 split 0
connmand[19268]: src/service.c:connman_service_unref_debug() 0x8ec0448
ref 1 by src/agent.c:184:request_input_passphrase_reply()

In agent.c __connman_agent_request_passphrase_input() L 430:
	if (dbus_connection_send_with_reply(connection, message,
						&call, -1) == FALSE) {

Here, we use the default timeout for a dbus call, It doesn't seems to
be very accurate but I have something like 25-30sec.
Perhaps we can change the -1 in DBUS_TIMEOUT_INFINITE, to avoid this issue.

I've also another problem, The wpa_supplicant timeout before
considering that a network is removed ("Due to age")
is 180 sec.(hostap/wpa_supplicant/config.c / #define

If we are unlucky (according to autoscan delay) the network can be
removed between the moment that I request the connection
and when I provide the passphrase from the agent.

Perhaps we can set a shorter maximum timeout (under 180 ) for autoscan
to avoids this issue, or we can set a longer timeout for wpa_s
using wpas_dbus_setter_bss_expire_age.