linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Automatically connect via DBUS Device API
@ 2018-09-11 17:45 Mike Ryan
  2018-09-12  9:52 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Ryan @ 2018-09-11 17:45 UTC (permalink / raw)
  To: linux-bluetooth

It would be useful to have a way to automatically connect to previously
discovered devices via the DBUS Device API.

Current use case: I have BLE devices that become discoverable once they
have a measurement available. Upon connecting, the measurement is
notified/indicated and then the connection drops. Some of the devices
with this behavior support/require pairing, and some do not support
pairing/encryption.

At present, the only options are to manually connect via DBUS or set the
device to auto connect via the management API (using Add Device with
Action set to 2). Since management is root-only, it would be useful to
move this into DBUS.

Possible workflow:

 1. Discover devices as usual using StartDiscovery() on the adapter
 2. Pair (if necessary)
 3. Set new property AutoConnect = true
 4. bluetoothd scans in background, connects when device becomes
    available

One concern: a binary AutoConnect may not be sufficient considering the
management API has three defined actions: background scan (generates an
event, could be handled via a new Connectable property that generates a
ProptertiesChanged event), allow incoming connection (connects on
directed advertising), and auto-connect (connects even on indirect
advertising).

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

end of thread, other threads:[~2018-09-12  9:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-11 17:45 Automatically connect via DBUS Device API Mike Ryan
2018-09-12  9:52 ` Luiz Augusto von Dentz

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).