labapart / gattlib

Library to access GATT information from BLE (Bluetooth Low Energy) devices
http://labapart.com/
461 stars 161 forks source link

gatttool in /examples segfaults on raspberry pi 3 debian #27

Closed leisurehound closed 7 years ago

leisurehound commented 7 years ago

Am looking to use gattlib for a heart rate monitor app I'm building and building things went smoothly, but am having a problem connecting. It appears the latest raspberry pi image has a gatttool in /usr/bin and that version successfully connects without issue. But the gatttool in gattlib segfaults when trying to connect. Clues?


pi@raspberrypi:~/gattlib/gattlib-master/examples/gatttool $ bluetoothd -v 
5.23
pi@raspberrypi:~/gattlib/gattlib-master/examples/gatttool $ which gatttool 
/usr/bin/gatttool
pi@raspberrypi:~/gattlib/gattlib-master/examples/gatttool $ gatttool -t random -b C2:CF:62:25:14:5D -I
[C2:CF:62:25:14:5D][LE]> connect
Attempting to connect to C2:CF:62:25:14:5D
Connection successful
[C2:CF:62:25:14:5D][LE]> char-write-req 0x000f 0100
Characteristic value was written successfully
Notification handle = 0x000e value: 16 00 b4 03 16 04 45 3a 17 04 9e 3f 
Notification handle = 0x000e value: 16 38 29 04 
Notification handle = 0x000e value: 16 37 13 04 
Notification handle = 0x000e value: 16 37 39 04 
Notification handle = 0x000e value: 16 37 44 04 
Notification handle = 0x000e value: 16 37 18 04 
Notification handle = 0x000e value: 16 37 23 04 
Notification handle = 0x000e value: 16 38 43 04 
[C2:CF:62:25:14:5D][LE]> char-write-req 0x000f 0000
Characteristic value was written successfully
[C2:CF:62:25:14:5D][LE]> exit
pi@raspberrypi:~/gattlib/gattlib-master/examples/gatttool $ ./gatttool -t random -b C2:CF:62:25:14:5D -I
[   ][C2:CF:62:25:14:5D][LE]> connect
Segmentation fault
pi@raspberrypi:~/gattlib/gattlib-master/examples/gatttool $ ```
leisurehound commented 7 years ago

doh, duplicate.