Re: [Bluez-users] notification of baseband conection establishment

Marcel Holtmann
2006-12-19T13:28:54Z

Hi Loreno,

> does anybody know some facility for a called device to detect the
> establishment of a baseband connection? That is, say we have two
> devices, A and B, and A attempts a paging to B. The idea is fire an
> event in B as soon as the baseband connection is established.
>
> I thought two ideas for this: first, when the synchronous call to
> "hci_create_connection" returns, A then invokes, via SDP, a service
> advertised on B, which fires the event on that device (it is
> reasonable in my context to assume that B advertises a service such
> like that). Second, some application in B runs a thread that
> constantly monitors the availability of baseband connections through
> "hci_for_each_dev function". Such an application would maintain a data
> structure for controling existent conections. When a new conection is
> established, B updates the data structure and fires the event.

look at the D-Bus API for BlueZ. It sends you a signal once a device has
been connected or disconnected.

Regards

Marcel