Open sagarika4 opened 7 years ago
Need to run it with root privilege,
try sudo python testblescan.py
How to use it in a crontab?
self.bluez.hci_send_cmd(self.socket, OGF_LE_CTL, OCF_LE_SET_SCAN_ENABLE, command) _bluetooth.error: (100, 'Network is down')
I am trying to run this in visual studio remote debugging. I get this error, is this possible?
sudo setcap 'cap_net_raw,cap_net_admin+eip' "$(readlink -f "$(which python3)")"
This worked for me.
File "testblescan.py", line 19, in
blescan.hci_enable_le_scan(sock)
File "/home/sagarika/iBeacon-Scanner--master/blescan.py", line 79, in hci_enable_le_scan
hci_toggle_le_scan(sock, 0x01)
File "/home/sagarika/iBeacon-Scanner--master/blescan.py", line 103, in hci_toggle_le_scan
bluez.hci_send_cmd(sock, OGF_LE_CTL, OCFLE
_bluetooth.error: (1, 'Operation not permitted')