micropython-lib icon indicating copy to clipboard operation
micropython-lib copied to clipboard

bluetooth/aioble/examples/temp_sensor.py: Properly notifies on update.

Open mores opened this issue 1 year ago • 2 comments

mores avatar Mar 25 '24 12:03 mores

I think this should be merged. The timeout_ms=None call in particular keeps something deep in the internals from blocking service queries from the central, and without this the central doesn't get timely updates.

konistehrad avatar Apr 18 '24 16:04 konistehrad

Thanks for example update. I was doing this myself because the current example in master was not working.

aetelani avatar May 10 '24 21:05 aetelani

Thanks for the contribution. I can confirm that both fixes are needed:

  • for the char write, so that subscribers are notified
  • for the disconnected, so that the temp sensor remains connected until the central initiates a disconnect

dpgeorge avatar May 24 '24 08:05 dpgeorge