Issue with client
Hi,
I manage to use the BLEkey successfully with the Mobile Nordic app or with gattttool in linux. When I try to use the client, I got some error that I'm unable to solve. Could you point me where to look to fix my problem and use the client?
Here is the output that I got when I try to use the client :
:~/BLEKey/client#
./blekey.py
Type quit, exit or ^D to cleanly exit and disonnect from BLEKey or you're gonna have a bad time...
? or help gets you a list of commands. Tab completion FTW.
[n/c] blekey> scan
scanning...
Traceback (most recent call last):
File "./blekey.py", line 138, in <module>
BLEKeyClient().cmdloop()
File "/usr/lib/python2.7/cmd.py", line 142, in cmdloop
stop = self.onecmd(line)
File "/usr/lib/python2.7/cmd.py", line 221, in onecmd
return func(arg)
File "./blekey.py", line 28, in do_scan
scan_result = pygatt.util.lescan()
AttributeError: 'module' object has no attribute 'lescan'
` OR this error with connect command:
[n/c] blekey> connect
connecting to D4:36:A4:31:DA:7C
Traceback (most recent call last):
File "./blekey.py", line 138, in <module>
BLEKeyClient().cmdloop()
File "/usr/lib/python2.7/cmd.py", line 142, in cmdloop
stop = self.onecmd(line)
File "/usr/lib/python2.7/cmd.py", line 221, in onecmd
return func(arg)
File "./blekey.py", line 40, in do_connect
self.bk = pygatt.BluetoothLEDevice(mac, hci_device=BLE_DEVICE,
AttributeError: 'module' object has no attribute
> 'BluetoothLEDevice'
` Thanks for your help.
some more info:
I'm on Kali linux running as root.
hci0: Type: Primary Bus: USB BD Address: 34:C7:31:E8:63:BD ACL MTU: 310:10 SCO MTU: 64:8 UP RUNNING RX bytes:1244 acl:0 sco:0 events:76 errors:0 TX bytes:2864 acl:0 sco:0 commands:75 errors:0
Make sure you are using the right version of pygatt, BLEKey is using a different one as documented in the README here https://github.com/linklayer/BLEKey/tree/master/client.