petzval / btferret

Python and C Bluetooth Library
MIT License
122 stars 21 forks source link

Can't make work notification #22

Closed gregoiregentil closed 1 year ago

gregoiregentil commented 1 year ago

I have a hard-time to make work notification. Here is a simple case that doesn't work: https://gentil.com/tmp/test.zip

petzval commented 1 year ago

The notification process normally works as follows: 1, The btferret server specifies a characteristic with notify permission in devices.txt.

  1. The btferret test.c code starts a server via le_server
  2. Android connects to the server.
  3. Android client enables the notification - not test.c
  4. The btferret test.c code writes a value to the characteristic - Android must be connected
  5. When a characteristic is written, btferret sends a notification to Android - not to read notify in test.c
gregoiregentil commented 1 year ago

I was confused by read_notify which is for the client. I can make work notification though performance is not good (opening a different bug for that).