Closed abeldsouza closed 2 years ago
The constants (or any other source file) don't have to be edited for normal usage, this contains just the builtin characteristics list that I mention in the Readme. It should make it easier when working with common modules. Looks like your device has different UUIDs. I am not entirely sure which service you want to connect to, but a guess from the deep scan output:
ble-serial -v -d D5:D5:25:ED:2C:7C -w 569a2001-b87f-490c-92cb-11ba5ea5167c -r 569a2002-b87f-490c-92cb-11ba5ea5167c
This probably does not solve that error alone though. The exception message indicates a add_connection_status_changed
method should be called and this is not ble-serial code, but a dependency. I found that call here inside the bleak Windows RT backend. bleak is the library I use to handle the bluetooth inferface cross platform.
So I probably can't help much here as I don't see this error in my windows tests. It would be best if you can attach a debugger and reproduce the error to figure out exactly where it happens. Then a minimal example could be made and reported in an issue on the bleak project, or ideally a fix as PR.
Thank you for your response and analysis of the issue. I tried the command format that you mentioned but ran into the same error. s suggested i will ask a query in bleak to see if i can get any clues. Thank you again. I shall close this ticket.
@Jakeler Could you help have a quick peek at hbldh/bleak#647 to see if you can share any insights. Thanks, Abel.
Describe the bug Hello, I recently came across this ble library and started exploring it to see if its suitable for me to use in my project. While connecting to my ble peripheral device i get the following error. I dont understand this error and hence seeking help
main.py: Unexpected Error: 'NoneType' object has no attribute 'add_connection_status_changed'
Log messages The full output of
ble-serial -v
(with your usual parameters like-d
). If it is related to BLE chracteristics please also runble-scan -d
with you device address.Put the result into code blocks (wrap with tripple backticks) to get proper formatting:
Setup (please complete the following information):
bluetoothctl -v
, Linux only]python3 -V
]pip3 list
]Windows 10 Pro x64 Laird’s BL 652 peripheral device, Bluetooth v5.0 - Single mode with nRF52832 chipset
C:\Windows\system32>pip freeze ble-serial==2.4.1 bleak==0.12.1 coloredlogs==15.0.1 humanfriendly==10.0 pypiwin32==223 pyreadline3==3.3 pyserial==3.5 pywin32==301 winrt==1.0.21033.1
C:\Windows\system32>python -V Python 3.9.7
Complete error log
As seen above, i can do a scan and also a deep scan. However attempting to connect to the device fails. com0com is setup and working properly.
I can connect and receive data from the peripheral device with many popular ble apps like light blue (on android and iOS). On windows i have tried 2 ble apps. Both can connect and receive / write data successfully.
I also started to look through the code and found a constants file but not sure if this should be edited? Thanks in advance. Do let me know if any additional details need to be shared. Any help would be greatly appreciated.
Thanks, Abel.