gatt-python - "random" LE address type?
MacLe7400 opened this issue · 1 comments
MacLe7400 commented
Hello,
I have a problem connecting to BLE device using gatt-python:
$ sudo gattctl --connect E5:D4:39:0E:87:21
Connecting...
[E5:D4:39:0E:87:21] Connection failed: Device does not exist, check adapter name and MAC address.
Terminate with Ctrl+C
Simultaneously I can connect (and operate device with gatt commands) using regular "gatttool":
$ sudo gatttool -b E5:D4:39:0E:87:21 -t random --primary
attr handle = 0x0001, end grp handle = 0x0007 uuid: 00001800-0000-1000-8000-00805f9b34fb
attr handle = 0x0008, end grp handle = 0x0008 uuid: 00001801-0000-1000-8000-00805f9b34fb
attr handle = 0x0009, end grp handle = 0xffff uuid: 6e400001-b5a3-f393-e0a9-e50e24dcca9e
However - it is possible only in "random" LE address type ("-t random" option)
When I try to use gatttool in default mode ("public" LE address type):
$ sudo gatttool -b E5:D4:39:0E:87:21 --primary
I receive:
connect error: Connection refused (111)
Maybe it is the same problem with gatt-python???
Is there a possibility to switch to random LE address type in gatt-python?
Regards,
ML
PS.
Bluez 5.43
python3-dbus 1.2.4-1
gatt-0.2.6
hubert3 commented
How did you resolve this?