paypal / gatt

Gatt is a Go package for building Bluetooth Low Energy peripherals
BSD 3-Clause "New" or "Revised" License
1.12k stars 283 forks source link

Failed to open device, err: no supported devices available #90

Open minhajakhterkhan199 opened 7 years ago

minhajakhterkhan199 commented 7 years ago

When I am running discoverer.go from example I am getting error no supported devices available. In addition, my Ubuntu 16.04 is successfully able to discover and connect to devices. Please advise hwo to solve the issue. bluetooth

go run examples/discoverer.go 2017/06/03 18:54:06 dev: hci0 up 2017/06/03 18:54:06 Failed to open device, err: no supported devices available exit status 1

darthrookie commented 6 years ago

Perhaps a little late. I was having the same issue then executed the example with administrator rights.

josephcenk commented 6 years ago

For your kind info, already fixed that issue.

roylee17 commented 6 years ago

It takes root privilege and exclusive access to the HCI device.

  1. Try execute the program with sudo. (but you mentioned that you already did.
  2. See if there are other program grabbing the device, such as blued or other daemon.

BTW, more recent efforts for BLE with GO can be found at:

https://github.com/currantlabs/ble or https://github.com/go-ble/ble

Cheers

andrei-pavel commented 6 years ago

I have recently found https://github.com/bettercap/gatt to be more active. currantlabs hasn't updated in years.

darthrookie commented 6 years ago

I am using this fork https://github.com/cksmith/gatt haven't looked into bettercap