hcitool lescan shows I/O error

前端 未结 10 2184
忘掉有多难
忘掉有多难 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 02:09

    To those finding this question now, it is fixed as of Bluez v5.41. All you need to to is download and install. You can download the lastest version from http://www.bluez.org/download/.

    0 讨论(0)
  • 2021-02-01 02:09
    sudo hcitool lescan
    

    Just use sudo & will scan

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

    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.

    hcitool lescan
    Set scan parameters failed: Input/output error
    

    try:

    hciconfig hci0 down
    hciconfig hci0 up
    

    and check the status afterwords.

    if this doesn't work or it hangs in DOWN status, try:

    service bluetooth restart
    service dbus restart
    

    (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.

    lsusb
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
    Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
    Bus 001 Device 004: ID 0a5c:21e8 Broadcom Corp. 
    
    
    cd /sys/bus/usb/devices/
    
    grep -i -s -r 0a5c *
    …
    1-1.2/idVendor:0a5c
    …
    
    cd 1-1.2
    
    echo 0 > authorized
    echo 1 > authorized
    
    0 讨论(0)
  • 2021-02-01 02:17

    sudo service bluetooth restart helps me on Raspibian Buster.

    in case of Set scan parameters failed: Input/output error. error in sudo hcitool lescan.

    But is is occuring randomly again, so some system library has probably some issue.

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