I'm trying to do a lescan using hcitool on the raspberry pi.
The command prints out
Set scan parameters failed: Input/output error.
I'm not sure, what exactly happens here. My iPhone is advertising here.
I'm using a BLE dongle from IOGear.
However, if I restart my machine, it shows the a MAC address after I issue the lescan
command, and starts showing the same error after I issue the lescan command a couple of more times. Is it like, the lescan command cannot be issued more than once?
I have removed Bluez and then I just installed it again, and it worked for me:
And then
That should be enough.
That happens often really often to me. I'm developing with it and it just happens from time to time. I was also able to reproduce your error within 5 minutes ;-) I'm running bluez v.5.17. However i can run lescan more than one time without this error.
try:
and check the status afterwords.
if this doesn't work or it hangs in DOWN status, try:
(all commands as superuser)
And close all application that may access bluetooth. For example hcidump.
If that doesn't work you normally have to unplug it. But there is another dirty hack to do this. It works by setting the authorized to 0 and than 1 again. This forces the usb dongle to init.
sudo service bluetooth restart
helps me on Raspibian Buster.in case of
Set scan parameters failed: Input/output error.
error insudo hcitool lescan
.But is is occuring randomly again, so some system library has probably some issue.