ukBaz / python-bluezero

A simple Python interface to Bluez
MIT License
387 stars 112 forks source link

set_value wait for response #350

Closed p30arena closed 2 years ago

p30arena commented 2 years ago

I'm using peripheral mode and writing to the characteristic using set_value

it seems sometimes the data received at the central end is corrupted or some packets are ignored by dbus

how can I discover this and retry the transmission?

ukBaz commented 2 years ago

If you want to try different setup then there are a few different options that are available.

The simplest one is to change notify to indicate which will then add a confirmation on the lower level communication. The full list of options is in the BlueZ documentation: https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/gatt-api.txt#n263

If you are sending lots of notifications then you might want to look at using a socket connection with AcquireNotify. This is beyond what Bluezero plans to support

ukBaz commented 2 years ago

This has been sat here a while without an update so I'm closing. If it is still an issue then please re-open with more information on how to reproduce