switchdoclabs / iBeacon-Scanner-

Reliable Bluetooth LE (iBeacon) scanner for Raspberry Pi
202 stars 122 forks source link

_bluetooth.error: (1, 'Operation not permitted') #13

Open sagarika4 opened 7 years ago

sagarika4 commented 7 years ago

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')

Scrumantic commented 7 years ago

Need to run it with root privilege, try sudo python testblescan.py

Kclemen commented 7 years ago

How to use it in a crontab?

hisajarif commented 6 years ago

self.bluez.hci_send_cmd(self.socket, OGF_LE_CTL, OCF_LE_SET_SCAN_ENABLE, command) _bluetooth.error: (100, 'Network is down')

rackflot commented 4 years ago

I am trying to run this in visual studio remote debugging. I get this error, is this possible?

shanlng commented 3 years ago

sudo setcap 'cap_net_raw,cap_net_admin+eip' "$(readlink -f "$(which python3)")" This worked for me.