ecc1 / ble

Go package for communicating with Bluetooth Low Energy peripheral devices
MIT License
31 stars 14 forks source link

Devices not getting Discover #5

Open josephcenk opened 6 years ago

josephcenk commented 6 years ago

Trying to discover the device with 0 or 60 seconds timeout but device is not getting discover. In addition, timeout 0 does not return. Please advise to fix the issue Please Note : Getting UUID's through bluetoothctl.


2018/01/11 16:25:10 JC-VirtualBox: setting discovery filter [00001800-0000-1000-8000-00805f9b34fb 00001801-0000-1000-8000-00805f9b34fb 6e400001-b5a3-f393-e0a9-e50e24dcca9e]
2018/01/11 16:25:10 JC-VirtualBox: starting discovery
2018/01/11 16:26:10 JC-VirtualBox: stopping discovery
2018/01/11 16:27:03 discovery timeout [00001800-0000-1000-8000-00805f9b34fb 00001801-0000-1000-8000-00805f9b34fb 6e400001-b5a3-f393-e0a9-e50e24dcca9e]```
ecc1 commented 6 years ago

On Thu, Jan 11, 2018 at 7:43 AM, josephcenk notifications@github.com wrote:

Trying to discover the device with 0 or 60 seconds timeout but device is not getting discover. In addition, timeout 0 does not return. Please advise to fix the issue Please Note : Getting UUID's through bluetoothctl.

2018/01/11 16:25:10 JC-VirtualBox: setting discovery filter [00001800-0000-1000-8000-00805f9b34fb 00001801-0000-1000-8000-00805f9b34fb 6e400001-b5a3-f393-e0a9-e50e24dcca9e] 2018/01/11 16:25:10 JC-VirtualBox: starting discovery 2018/01/11 16:26:10 JC-VirtualBox: stopping discovery 2018/01/11 16:27:03 discovery timeout [00001800-0000-1000-8000-00805f9b34fb 00001801-0000-1000-8000-00805f9b34fb 6e400001-b5a3-f393-e0a9-e50e24dcca9e]

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ecc1/ble/issues/5, or mute the thread https://github.com/notifications/unsubscribe-auth/ABeTxQTK9wgATeqx-RU-cVjbVHzoyXNbks5tJgHhgaJpZM4RayiH .

What version of Linux are you trying this on? Older kernels don't implement the discovery filter, and you need to build the library with the "-tags nofilter" option to work around that. You can also try to do the discovery filter "by hand" in bluetoothctl, using the set-scan-filter-* commands if you suspect this might be the case.

(Timeout = 0 means wait indefinitely, so that bit is working as intended.)

josephcenk commented 6 years ago

Using Ubuntu 16.04 with Kernel 4.10.0-42-generic. Will try to build library with tags nofilter.

ecc1 commented 6 years ago

On Thu, Jan 11, 2018 at 2:47 PM, josephcenk notifications@github.com wrote:

Using Ubuntu 16.04 with Kernel 4.10.0-42-generic. Will try to build library with tags nofilter.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ecc1/ble/issues/5#issuecomment-357040599, or mute the thread https://github.com/notifications/unsubscribe-auth/ABeTxeP9C_QwDlP3twyDx0JEHca7Ct4sks5tJmVfgaJpZM4RayiH .

Hmm, that should be plenty new enough (I ran into this issue in the 3.x series), so although it won't hurt, I doubt it will help.

I would also try that "discover manually" sequence in bluetoothctl, just to make sure that it should work (devices are discoverable, etc.).