* Connection handler and btmgmt/bluetoothctl
@ 2016-07-12 0:29 Clément Jacquemin
2016-07-13 5:50 ` Johan Hedberg
0 siblings, 1 reply; 4+ messages in thread
From: Clément Jacquemin @ 2016-07-12 0:29 UTC (permalink / raw)
To: linux-bluetooth
Hi,
I am implementing my own GATT server using the "tool/gatt-service.c" as
example. Create services and read/write characteristics is not a
problem, but I need a way to track connection and disconnection of clients.
Is there any way to make a handler or callback function that trigger
when a client connects/disconnects to my server?
Another question about best practice. For the moment I use "btmgmt" to
configure my daemon. However, the "bluetoothctl" binary seems to be a
more stable alternative except that i cannot find any way to do the "le
on" command as in "btmgmt".
Is there any way to activate the low energy option with bluetoothctl?
Regards,
Clément.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Connection handler and btmgmt/bluetoothctl
2016-07-12 0:29 Connection handler and btmgmt/bluetoothctl Clément Jacquemin
@ 2016-07-13 5:50 ` Johan Hedberg
2016-09-11 21:46 ` Clément Jacquemin
0 siblings, 1 reply; 4+ messages in thread
From: Johan Hedberg @ 2016-07-13 5:50 UTC (permalink / raw)
To: Clément Jacquemin; +Cc: linux-bluetooth
Hi Clément,
On Tue, Jul 12, 2016, Clément Jacquemin wrote:
> Another question about best practice. For the moment I use "btmgmt" to
> configure my daemon. However, the "bluetoothctl" binary seems to be a more
> stable alternative except that i cannot find any way to do the "le on"
> command as in "btmgmt".
> Is there any way to activate the low energy option with bluetoothctl?
bluetoothctl talks to bluetoothd and bluetoothd already automatically
enables LE support whenever it's reported to be supported by the kernel.
Johan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Connection handler and btmgmt/bluetoothctl
2016-07-13 5:50 ` Johan Hedberg
@ 2016-09-11 21:46 ` Clément Jacquemin
2016-10-17 23:37 ` Clément Jacquemin
0 siblings, 1 reply; 4+ messages in thread
From: Clément Jacquemin @ 2016-09-11 21:46 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Johan Hedberg
Thanks for your answer Johan!
Le 13/07/2016 07:50, Johan Hedberg a écrit :
> On Tue, Jul 12, 2016, Clément Jacquemin wrote:
>> Another question about best practice. For the moment I use "btmgmt" to
>> configure my daemon. However, the "bluetoothctl" binary seems to be a more
>> stable alternative except that i cannot find any way to do the "le on"
>> command as in "btmgmt".
>> Is there any way to activate the low energy option with bluetoothctl?
>
> bluetoothctl talks to bluetoothd and bluetoothd already automatically
> enables LE support whenever it's reported to be supported by the kernel.
>
> Johan
I still have some questions.
First, is there any equivalent of the 'bt_gatt_server_send_notification'
method from "src/shared/gatt-server.c" but with the GATT D-BUS API. I
did not find anything about that.
Second, when one of my characteristic need more than 5 seconds to
process the data, the client is systematically disconnect 5 seconds
after requesting a read action on that characteristic. I suppose there
is a timeout configuration somewhere, but where ?
Clément.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Connection handler and btmgmt/bluetoothctl
2016-09-11 21:46 ` Clément Jacquemin
@ 2016-10-17 23:37 ` Clément Jacquemin
0 siblings, 0 replies; 4+ messages in thread
From: Clément Jacquemin @ 2016-10-17 23:37 UTC (permalink / raw)
To: linux-bluetooth
Hello,
I am still looking for an answer about these two problems of timeout and
notifications.
Thank you!
Le 11/09/2016 23:46, Clément Jacquemin a écrit :
> Thanks for your answer Johan!
>
> Le 13/07/2016 07:50, Johan Hedberg a écrit :
>> On Tue, Jul 12, 2016, Clément Jacquemin wrote:
>>> Another question about best practice. For the moment I use "btmgmt" to
>>> configure my daemon. However, the "bluetoothctl" binary seems to be a
>>> more
>>> stable alternative except that i cannot find any way to do the "le on"
>>> command as in "btmgmt".
>>> Is there any way to activate the low energy option with bluetoothctl?
>>
>> bluetoothctl talks to bluetoothd and bluetoothd already automatically
>> enables LE support whenever it's reported to be supported by the kernel.
>>
>> Johan
>
> I still have some questions.
>
> First, is there any equivalent of the 'bt_gatt_server_send_notification'
> method from "src/shared/gatt-server.c" but with the GATT D-BUS API. I
> did not find anything about that.
>
> Second, when one of my characteristic need more than 5 seconds to
> process the data, the client is systematically disconnect 5 seconds
> after requesting a read action on that characteristic. I suppose there
> is a timeout configuration somewhere, but where ?
>
> Clément.
--
Clément Jacquemin
Root GISTRE 2016
clement.jacquemin@epita.fr
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-10-17 23:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-12 0:29 Connection handler and btmgmt/bluetoothctl Clément Jacquemin
2016-07-13 5:50 ` Johan Hedberg
2016-09-11 21:46 ` Clément Jacquemin
2016-10-17 23:37 ` Clément Jacquemin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).