DBus exception when trying to connect to a BLE device #1504
Unanswered
HamsterSqueak
asked this question in
Q&A
Replies: 1 comment 5 replies
-
What is the specific D-Bus error? What is the full stack trace? Can you share debug logs? Can you share packet capture logs? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to use the Python bleak libary on a Raspberry Pi 4B running Raspbian Debian GNU/Linux 11 (bullseye), using the internal BLE chip. Here's my code:
This code runs well sometimes, verifying that I can write a value to a characteristic and read values of characterisitcs. Sometimes it has an exception while trying to connect (
async with BleakClient(d, timeout=10) as client:
). The exception is<class 'bleak.exc.BleakDBusError'>
. After this exception occurs, I can sometimes execute the code successfully (no exception), but other times it has the exception every execution until I reboot the Raspberry Pi.As this communication process is to occur in a manufacturing environment, I am concerned about this solution.
Can someone help me understand how to get the bleak code to work reliably (no DBus exception)?
Beta Was this translation helpful? Give feedback.
All reactions