All of lore.kernel.org
 help / color / mirror / Atom feed
* supporting both btgatt-client and btgatt-server in application
@ 2019-03-17  7:51 Ordit Gross
  2019-03-17  8:33 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 2+ messages in thread
From: Ordit Gross @ 2019-03-17  7:51 UTC (permalink / raw)
  To: linux-bluetooth

hi all,
We have an application that should support both btgatt-client and
btgatt-server (connecting to different devices for different
workflows), using bluez.

1. Should I create a single mainloop that will be used by both or
should I create two different mainloop_run? (thought of have porting
the mainloop code to c++ and change it to be class element)

2. Regarding the btgatt-client, how can I initiate a disconnect? (I
looked in the btgatt-client.c test application and did not see an
initiation of disconnect).

thanks in advance! (hope I sent the message to right mailing list.. )

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: supporting both btgatt-client and btgatt-server in application
  2019-03-17  7:51 supporting both btgatt-client and btgatt-server in application Ordit Gross
@ 2019-03-17  8:33 ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2019-03-17  8:33 UTC (permalink / raw)
  To: Ordit Gross; +Cc: linux-bluetooth

Hi Ordit,
On Sun, Mar 17, 2019 at 9:54 AM Ordit Gross <ordit.gross@orcam.com> wrote:
>
> hi all,
> We have an application that should support both btgatt-client and
> btgatt-server (connecting to different devices for different
> workflows), using bluez.
>
> 1. Should I create a single mainloop that will be used by both or
> should I create two different mainloop_run? (thought of have porting
> the mainloop code to c++ and change it to be class element)
>
> 2. Regarding the btgatt-client, how can I initiate a disconnect? (I
> looked in the btgatt-client.c test application and did not see an
> initiation of disconnect).
>
> thanks in advance! (hope I sent the message to right mailing list.. )

Take a look at bluetoothctl, it can actually act as both Client and
Server at the same time with just a single mainloop, you can check how
to disconnect using disconnect command.


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-17  8:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-17  7:51 supporting both btgatt-client and btgatt-server in application Ordit Gross
2019-03-17  8:33 ` Luiz Augusto von Dentz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.