aioble: receiving data from server with indication #17845
-
I try to use a laser rangefinder (bosh PLR 30 C) via bluetooth from my eps32 with aioble. With the code below I can successfully send a command (a hex byte code) to the device, which triggers the measurement. But I just cannot receive any response. I know (from investigations with nRF Connect android app) that the device can do indications and when sending the byte code via nRF connect app I am getting response (which is a hex byte code) as expected. Why is it not working with aioble? Do I miss something? How can I receive data from server to client after a write command with response?
Thanks for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The problem was in
It will set the value of the descriptor at address My fix: Instead of
then the code works like a charm! |
Beta Was this translation helpful? Give feedback.
The default value of notify is
True
,in micropython-lib/micropython/bluetooth/aioble/aioble/client.py
In your case, you have to write explicitely as: