2008-12-04 08:23:24

by Ville Tervo

[permalink] [raw]
Subject: [RFC] Support for getting rfcomm connection information before setting up the connection


In order to implement HFP profile correctly the gateway needs to know
address off the the HF device before accepting the connection. Currently
there is no way to check the address without calling accept(). This
patch creates a socket option which can be used change the behavior of
the socket. Server still calls accept() but the actual connection setup
will be done only after calling recv() for the first time. In between
the server can use other getsockopts to get the needed information.

I also attached patch against rctest.c as an example how test this feature.

Waiting for comments :)


0001--BLUETOOTH-Support-for-deferring-rfcomm-connection.patch (11.00 kB)
0001-hack-to-test-connection-defer-feature.patch (2.55 kB)
Download all attachments