R.Wieser wrote:
> Deloptes,
>
>> It is SDK and it shows you the way to write the code you
>> need in following sections
>
> I've been googeling for a couple of hours to find stuff related to the
> RPi's
> BLE, but have not found anything like that. Could you provide a link to
> that SDK ?
>
The link you pasted is a link to SDK
getsenic/gatt-python: Bluetooth GATT SDK for Python - GitHub
>> if you were using section "Running the GATT control script",
>
> Nothing like that. I took that Github code that I mentioned and just
> altered it a bit, using the included example scripts as well as the main
> gatt_linux one as a lead. Going thru those scripts I did not see any
> auto-reconnection possibility. Hence my question.
>
I assume (because I have no time or need at the moment to look into the
detail) the SDK offers implementation of the GATT API.
In the examples you have the code for discovery and also the code to connect
and read values etc. It looks like you have to put the puzzle in the right
way, no?
From my experience with dbus and bluez5, you would register a listener that
will reconnect as soon as the device appears, but I am unfortunately
neither GATT nor python expert. I have done some work on synchronization
and audio.
Though if you look at the GATT API spec under GATT Manager hierarchy, you
would note
"To make service registration simple, BlueZ requires that all objects that
belong to a GATT service be grouped under a D-Bus Object Manager that
solely manages the objects of that service."[1]
Check also the ObjectManager API [2].
And also under GATT Profile hierarchy
"Local profile (GATT client) instance. By registering this type of object
an application effectively indicates support for a specific GATT profile
and requests automatic connections to be established to devices
supporting it." [1]
For me this one looks promising. Perhaps you need to register this type of
object and the magic will work. I'm telling you (jokingly) BT is magic.
After spending few weeks may be 7y ago and was probably more frustrated than
you are ATM, I laughed for an hour or so after reading this blog article.
(it was written in the time of bluez4 I think) [3].
I must admit now the bluez5 is a blessing to work with, so take it from the
positive side.
I hope it helps
[1] https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/gatt-api.txt
[2]
https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-ob
jectmanager
[3] https://www.lightofdawn.org/blog/?viewDetailed=00031
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|