hcitool lescan shows I/O error

前端 未结 10 2183
忘掉有多难
忘掉有多难 2021-02-01 01:14

I\'m trying to do a lescan using hcitool on the raspberry pi.

The command prints out

Set scan parameters failed: Input/output error. 

相关标签:
10条回答
  • 2021-02-01 01:54

    I had the same error with hcitool, while bluetoothctl worked just fine. Then I ran across this article stating that all "tools using raw socket shall be considered deprecated" (hcitool, hcicfg, etc.).

    So maybe just open bluetoothctl and issue a scan on command.

    0 讨论(0)
  • 2021-02-01 01:54

    I have removed Bluez and then I just installed it again, and it worked for me:

    sudo apt remove --purge bluez bluez-* -y
    
    
    apt install bluez
    

    And then

    hcitool lescan 
    

    That should be enough.

    0 讨论(0)
  • 2021-02-01 01:54

    What worked for me though is opening up the Bluetooth settings on my Ubuntu and manually removing the unused devices. Immediately lescan started working.

    0 讨论(0)
  • 2021-02-01 02:01

    I am using Version 5.53 I have two Bluetooth devices (hic0 and hic1) I tried all kinds of ways to to reset the devices ... The only way that worked was to physically unplug and re-insert the hic1 dongle. This is the one that supports ble. Then it works until I reboot. I really wish there was a pure software solution way to do this.

    0 讨论(0)
  • 2021-02-01 02:04

    Upgrading to bluez v5.43 fixed this for me.

    To upgrade to the newest bluez, you need to do a "manual" installation (not apt-get), downloading from the bluez website. I recommend this video walkthrough if you are new installing packages or need help.

    After installing the latest bluez, I had to run a couple commands before it worked.

    1. systemctl daemon-reload : Restarts the system daemon.

    2. sudo service bluetooth restart : Restarts the Bluetooth service.

    3. sudo hciconfig hci0 up : This was needed for my Raspberry Pi 3, with the built-in BT found at hci0.

    After these commands, sudo hcitool lescan and its variants all seem to work.

    0 讨论(0)
  • 2021-02-01 02:06

    It is possible, that HCI is currently in use. In my case I must stop Node-Red and it works. So take care, that the HCI isn't in use.

    Restart the HCI is a way, to solve the problem temporarily, but it doesn't solve the problem right.

    0 讨论(0)
提交回复
热议问题