Closed steinhb closed 2 years ago
You don't have to edit bluetooth/constants.py
just specify both read and write characteristic like this:
ble-serial -d 62:00:A1:1E:78:40 -r 0000ffe4-0000-1000-8000-00805f9b34fb -w 0000ffe9-0000-1000-8000-00805f9b34fb
The problem is when you specify only the read characteristic that it searches for write too, but none in the list matches. Vice versa if you only specify write. It requires both by default.
Another way would be to disable one direction, for example if you want a read only connection then the read characteristic is enough of course:
ble-serial -d 62:00:A1:1E:78:40 -r 0000ffe4-0000-1000-8000-00805f9b34fb --permit ro
I should probably explain this a bit more in the Readme and use different error messages for the builtin list vs. user supplied characteristics.
btw: service UUID is irrelevant in any case, only read/notify and write characteristic matters.
ble-serial -d 62:00:A1:1E:78:40 -r 0000ffe4-0000-1000-8000-00805f9b34fb -w 0000ffe9-0000-1000-8000-00805f9b34fb
@steinhb Does this solve the issue? If so please close it. I have also adjusted the readme, should be clearer now?
Sorry to let you wait that long. I totally forgot to close the issue.
Yes, everything is fine now and in hindsight the usage totally makes sense. Thank you for helping me out!
Describe the bug I tried to connect a Raspberry Pi Compute Module 4 via its built-in bluetooth module to this external module: https://www.hoperf.com/modules/Bluetooth/HM-BT4502W.html I already managed to connected the module with my phone with the app 'Serial Bluetooth Terminal' so I knew the correct UUIDs already.
I followed the introduction, deep-scanned the ble-module address and tried to connect specifying the respective UUIDs. There I encountered an error that it didn't find a characteristic with the specified UUID (see log).
It turns out that changing the UUIDs in 'ble_serial/bluetooth/constants.py' to the correct ones did the trick.
Log messages Deep scan: (I marked the correct ones)
Error when trying to connect with the correct read/write UUIDs
Changed 'ble_serial/bluetooth/constants.py' to
Everything works fine
Setup (please complete the following information):