currantlabs / ble

BSD 3-Clause "New" or "Revised" License
210 stars 177 forks source link

can't new device : can't init hci: no devices available: (hci0: can't down device: operation not permitted) #56

Open minhajakhterkhan199 opened 7 years ago

minhajakhterkhan199 commented 7 years ago

Dear, I am trying to run example scanner / explorer, but dev.NewDevice(*device) is returning error 'can't new device : can't init hci: no devices available: (hci0: can't down device: operation not permitted)' Bluetooth device is up. Please advise how to fix this issue.

sudo hciconfig hci0 status hci0: Type: BR/EDR Bus: USB BD Address: 40:B8:9A:3C:30:00 ACL MTU: 820:8 SCO MTU: 255:16 UP RUNNING PSCAN ISCAN RX bytes:12989 acl:65 sco:0 events:605 errors:0 TX bytes:32909 acl:65 sco:0 commands:436 errors:0

Regards,

moogle19 commented 7 years ago

@minhajakhterkhan199 Looks like you don't have permission do access the device. Are you running the program as root?

efidoman commented 6 years ago

I'm getting the same error and running as root. Does this library try to gain full control of hci and no other process can use it at the same time?

efidoman commented 6 years ago

I'm just trying to do a client implementation, not server.