Fix "Set scan parameters failed: Input/output error" on Ubuntu 16.04

This error appears when you try scan bluetooth low energy devices with hcitool lescan.
The major blogs give similars solutions like:

hciconfig hci0 down
hciconfig hci0 up

or

service bluetooth restart

or

sudo hciconfig hci0 reset

but none gave me a solution...
The last bluez version (at this moment) available for Ubuntu 16.04 is version 5.37.
To solve this problem you must install the last version available from the bluez web page (version 5.41).

wget https://www.kernel.org/pub/linux/bluetooth/bluez-5.41.tar.xz
tar xvf bluez-5.41.tar.xz
sudo apt-get install libudev-dev libical-dev libreadline6-dev libdbus-1-dev libglib2.0-dev
./configure
make
sudo make install


sudo hcitool lescan      

LE Scan ...

Enjoy it!

Comments

  1. Hello,

    Thank you for this post, the install of Bluez 5.41 was successful. However, I think Ubuntu is still using the old version. Do you know how I can set the default version for BlueZ to be 5.41? Should I simply uninstall Bluez 5.37 using the command:

    $: sudo apt-get remove bluez

    thank you for you help

    ReplyDelete
    Replies
    1. look your bluez version with "hcitool | grep ver | awk '{print $6}'"
      you can remove the previous version with "sudo apt-get remove bluez"
      You are welcome

      Delete
    2. I have the same problem. I successfully downloaded, made, and installed the newer bluez version 5.47, but the old version is still being used when I do 'hcitool | grep ver'. When I do "sudo apt-get remove bluez" it also removes unity-control-center, which breaks System Settings, and reinstalling that again replaces the bluez version with 5.37.

      Delete
  2. Bluez from tarball installs hcitool to /usr/local/bin not to /usr/bin
    You need to replace hcitool from repositories, overwritting it. To do that, use /usr/bin as folder to install it:
    ./configure --prefix=/usr/
    make -j8
    make install

    ReplyDelete
    Replies
    1. Still didn't work. Any ideas?

      Delete
    2. search where is hcitool 5.37 (with locate hcitool)
      After, configure bluez with this folder to overwrite the older version

      Delete
  3. I follow this instruction, and removed the older version, and my hcitool version 5.41 is now running, but I still got this error

    ReplyDelete

Post a Comment

Popular posts from this blog

Exception: Could not find a default OpenFlow controller in Mininet

How to fix Android when developer options are not available for this user

Webcam streaming throught VLC with YUY2 compatibility