Picking up a thread from IRC, I've been working on getting agent-based service 
connections working with connman-1.0. However, what I've found is that rather 
than performing the following sequence of operations:

        1) Issue .Service.Connect call.
        2) Receive properties dictionary from .Agent.RequestInput call.
        3) Post message to UI with a closure context for the async pending 
.Agent.RequestInput call.
        4) Gather requested input.
        5) Create a response dictionary
        6) Complete closure context and send D-Bus reply back to initial 
.Agent.RequestInput call.

What I see happening instead is:

        1) Issue .Service.Connect call.
        2) Receive .Service.PropertiesChanged call with State = failure.
        3) Receive net.connman.Error.Failed: Input/output error error in 
response to (1).
        4) Receive properties dictionary from .Agent.RequestInput call.

and things generally fall apart from there. Debugging this, in particular the 
source of the -EIO asynchronous cancellation in the middle of the connect 
request, what I find is the following:

        23.000 debug connmand:                  --> (3) connect_service: 
service 0xaa320
        23.000 debug connmand:                          --> (4) 
__connman_service_connect: service 0xaa320 state idle
        23.000 info  connmand: User-requested connection to service "Test" 
identifier "wifi_02283e3d4347_65547473_managed_psk".
        23.000 debug connmand: service_connect returned -126 (Required key not 
available)
        23.000 debug connmand: __connman_error_failed: msg 0xa0698 errnum 5 
(Input/output error)
        23.000 err   connmand: ++++++++ backtrace ++++++++
        24.000 err   connmand: #0  0x31078 in reply_pending() at 
src/service.c:3315
        24.000 err   connmand: #1  0x35010 in service_complete() at 
src/service.c:4383
        24.000 err   connmand: #2  0x35288 in service_indicate_state() at 
src/service.c:4749
        24.000 err   connmand: #3  0x35628 in 
__connman_service_ipconfig_indicate_state() at src/service.c:5041
        24.000 err   connmand: #4  0x35f04 in __connman_service_connect() at 
src/service.c:5291
        24.000 err   connmand: #5  0x36520 in connect_service() at 
src/service.c:3449
        24.000 err   connmand: #6  0x13130 in process_message() at 
gdbus/object.c:199
        24.000 err   connmand: #7  0x40163e84 in /lib/libdbus-1.so.3
        24.000 err   connmand: #8  0x4014f5d4 in /lib/libdbus-1.so.3
        24.000 err   connmand: #9  0x12090 in message_dispatch() at 
gdbus/mainloop.c:76
        24.000 err   connmand: #10 0x4006773c in /lib/libglib-2.0.so.0
        24.000 err   connmand: #11 0x40066db4 in /lib/libglib-2.0.so.0
        24.000 err   connmand: #12 0x4006ab98 in /lib/libglib-2.0.so.0
        24.000 err   connmand: #13 0x4006b148 in /lib/libglib-2.0.so.0
        24.000 err   connmand: #14 0x27788 in main() at src/main.c:562
        24.000 err   connmand: +++++++++++++++++++++++++++
        24.000 debug connmand: service->network 0xa8e48
        24.000 debug connmand:                                  --> (5) 
__connman_network_disconnect: network 0xa8e48
        24.000 debug connmand: user connect 1, error is -126 (Required key not 
available)
        24.000 debug connmand:                                          --> (6) 
__connman_agent_request_passphrase_input: service 0xaa320 callback 0x369d4 
user_data (nil)
        24.000 debug connmand:                                          <-- (6) 
__connman_agent_request_passphrase_input: err -5 (Input/output error)
        24.000 debug connmand:                                  <-- (5) 
__connman_service_connect: err -115 (Operation now in progress)
        24.000 debug connmand: __connman_service_connect returned -115 
(Operation now in progress)
        24.000 debug connmand: return 2
        24.000 debug connmand:                          <-- (4) 
connect_service: reply (nil)

So, it would appear that service_indicate_state is killing the .Service.Connect 
call prematurely for reasons yet to be determined.

Best,

Grant
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to