RE: [RFC/PATCH 00/13] Support for WiFi Display as a Peer Service

2014-09-15 Thread Jussi Kukkonen
Hi,

I've been testing out the WiFi Display service registration patch set.
Some observations (Tomasz, mostly I shared these with you already,
just documenting here):

The documentation could be improved in a couple of ways:
* First, talking about "IEs" as the byte array argument to
RegisterPeerService is a bit confusing at least for someone looking at
the Wi-Di spec: the argument connman expects is actually just the
Device Information _subelement_ without the Information Element
envelope (Tomasz mentioned offline that the other subelements can be
appended to the byte array as well: that should be documented too).
* There could be a little more overview: E.g. what typically happens
after registration (when another device makes a P2P connection).
* I believe the idea was that to change values in the byte array, I
should unregister and then re-register: this should be mentioned.

Then, I had limited success with connecting from an android device to
a service I registered with connman: According to Tomasz it looks like
android picks PIN as the authentication method and that's not yet
implemented in connman: connman agent does shows a
"RequestPeerAuthorization" question but the "yes" response does not
succeed:
> Agent RequestPeerAuthorization peer_106f3f7b0f9a_12683f467bfb
>
> Accept connection (yes/no)? yes
> Agent ReportPeerError peer_106f3f7b0f9a_12683f467bfb
>  connect-failed
> connmanctl> Retry (yes/no)? no

Note how it also tries to retry -- Tomasz mentioned that is probably a
bug: it should not retry because the connection was started by the
other end.


And last, I have a couple of crash backtraces:

This one happened when the process that registered the service quit:

connmand[15134]: src/peer_service.c:remove_peer_service_owner() owner :1.227
connmand[15134]: Aborting (signal 11) [src/connmand]
connmand[15134]:  backtrace 
connmand[15134]: #0  0x7f0dfb6870f0 in /lib/x86_64-linux-gnu/libc.so.6
connmand[15134]: #1  0x426fd6 in g_supplicant_interface_p2p_listen()
at gsupplicant/supplicant.c:5060
connmand[15134]: #2  0x41cb9c in peer_unregister_service() at plugins/wifi.c:600
connmand[15134]: #3  0x481f67 in unregister_peer_service() at
src/peer_service.c:125
connmand[15134]: #4  0x7f0dfc7793dd in /lib/x86_64-linux-gnu/libglib-2.0.so.0
connmand[15134]: #5  0x7f0dfc7793fb in /lib/x86_64-linux-gnu/libglib-2.0.so.0
connmand[15134]: #6  0x481fa7 in remove_peer_service_owner() at
src/peer_service.c:177
connmand[15134]: #7  0x7f0dfc76b709 in /lib/x86_64-linux-gnu/libglib-2.0.so.0
connmand[15134]: #8  0x4837a7 in service_filter() at gdbus/watch.c:481
connmand[15134]: #9  0x483a23 in message_filter() at gdbus/watch.c:553
connmand[15134]: #10 0x7f0dfc4fb119 in /lib/x86_64-linux-gnu/libdbus-1.so.3
connmand[15134]: #11 0x482660 in message_dispatch() at
gdbus/mainloop.c:72 (discriminator 1)
connmand[15134]: #12 0x7f0dfc77cddd in /lib/x86_64-linux-gnu/libglib-2.0.so.0
connmand[15134]: #13 0x7f0dfc77d1b8 in /lib/x86_64-linux-gnu/libglib-2.0.so.0
connmand[15134]: #14 0x7f0dfc77d4e2 in /lib/x86_64-linux-gnu/libglib-2.0.so.0
connmand[15134]: #15 0x40feba in main() at src/main.c:691
connmand[15134]: #16 0x7f0dfb673b45 in /lib/x86_64-linux-gnu/libc.so.6
connmand[15134]: +++


And another one that could be unrelated to P2P -- I'm not sure what
was happening at this point:

connmand[16512]: plugins/wifi.c:network_removed() name
connmand[16512]: src/device.c:connman_device_get_network() device
0x7f92251e5708 identifier hidden_managed_psk
connmand[16512]: Aborting (signal 11) [src/connmand]
connmand[16512]:  backtrace 
connmand[16512]: #0  0x7f9224e780f0 in /lib/x86_64-linux-gnu/libc.so.6
connmand[16512]: #1  0x7f9225f5ce94 in /lib/x86_64-linux-gnu/libglib-2.0.so.0
connmand[16512]: #2  0x41bd34 in network_removed() at plugins/wifi.c:2573
connmand[16512]: #3  0x421027 in remove_network() at
gsupplicant/supplicant.c:575
connmand[16512]: #4  0x7f9225f5c709 in /lib/x86_64-linux-gnu/libglib-2.0.so.0
connmand[16512]: #5  0x424668 in signal_bss_removed() at
gsupplicant/supplicant.c:2325
connmand[16512]: #6  0x421811 in g_supplicant_filter() at
gsupplicant/supplicant.c:3116
connmand[16512]: #7  0x7f9225cec1b1 in /lib/x86_64-linux-gnu/libdbus-1.so.3
connmand[16512]: #8  0x482660 in message_dispatch() at
gdbus/mainloop.c:72 (discriminator 1)
connmand[16512]: #9  0x7f9225f6 in /lib/x86_64-linux-gnu/libglib-2.0.so.0
connmand[16512]: #10 0x7f9225f6e1b8 in /lib/x86_64-linux-gnu/libglib-2.0.so.0
connmand[16512]: #11 0x7f9225f6e4e2 in /lib/x86_64-linux-gnu/libglib-2.0.so.0
connmand[16512]: #12 0x40feba in main() at src/main.c:691
connmand[16512]: #13 0x7f9224e64b45 in /lib/x86_64-linux-gnu/libc.so.6
connmand[16512]: +++


 - Jussi
___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


[RFC/PATCH 00/13] Support for WiFi Display as a Peer Service

2014-09-05 Thread Tomasz Bursztyka
Hi,

Here is an rfc patch-set to support WiFi Display as Peer Service.

This patch-set cannot work without this wpa_supplicant pending patch-set:
http://lists.shmoo.com/pipermail/hostap/2014-August/030783.html

As usual connmanctl comes with a dummy test command, which is now 
peer_service register wfd_ies 

Since wfd is a global setting on wpa_s, it's not possible to register
more than 1 wfd service.

Tomasz Bursztyka (13):
  gsupplicant: Add a callback enabled setter for the WFD IEs
  manager: Support WiFiDisplayIEs as a new Peer Service to handle
  wifi: Support registering WiFi Display IEs when relevant
  client: Support basic WiFi Display IEs (un)registration
  gsupplicant: Refactor how Peer's groups is detected to have changed
  gsupplicant: Get Peer's WiFi Display information elements if present
  gsupplicant: Add a getter for the WiFi Display information elements
  gsupplicant: Rename the peer state enum for future changes
  gsupplicant: Add a Peer service changed dedicated state
  gsupplicant: Notify about peer's services on WiFi Display IEs change
  peer: Add the core logic to handle a peer service list
  peer: Implement peer's Services DBus property
  wifi: Expose WiFi Display IEs as a peer service

 client/commands.c |  60 ++---
 gsupplicant/gsupplicant.h |  13 +++-
 gsupplicant/supplicant.c  | 148 ++---
 include/peer.h|  10 +++
 plugins/wifi.c| 165 +-
 src/manager.c |   8 ++-
 src/peer.c|  86 +++-
 7 files changed, 439 insertions(+), 51 deletions(-)

-- 
1.8.5.5

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman