GATT connection disconnects when trying to read characteristic value #1691
Labels
3rd party issue
The issue is with the Bluetooth stack, the BLE device, or other 3rd party code not with Bleak itself
Backend: Core Bluetooth
Issues and PRs relating to the Core Bluetooth backend
bluetoothctl -v
) in case of Linux:Description
First off, I'm mainly an electronics guy and embedded developer so apologies in advance if I'm being ignorant here. I'm trying to develop a basic desktop app to get data from a BLE peripheral. I used the UART service example as a starting point for this. I have 4 characteristics in total: a read/notify status message, a write-only control value, a write-only enable characteristic and a read-only hour meter to count active time. I can write to the write characteristics without issue, but when I try to read or enable notifications on the status characteristic it immediately disconnects. If I watch the BLE packets with a sniffer, the read request doesn't happen: it just drops the connection. Likewise if I try to enable notifications, it just drops out right away.
I can read the hour meter characteristic without issue...I tried rearranging the characteristic declaration on my peripheral so that the status isn't the first characteristic in the GATT table to see if that might be the problem, but I get the same results.
I can read the characteristic with the NRF connect app as well as enable notifications and it seems to work normally. I'd appreciate if anybody might be able to point me towards the error of my ways here.
Here's the python in its entirety:
Here's the terminal output from the print statements:
The text was updated successfully, but these errors were encountered: