RaspberrypiでスマートブレスレットとBluetoothで接続しようとしたところ
user@raspberrypi:~$ sudo hcitool lescan Set scan parameters failed: File descriptor in bad state
となってしまいました。もともとscan自体はできてはいたんですが、ブレスレットを再起動しないと認識してくれなかったりと少々不便だったので諸々のソフトウェアのバージョンを上げていたところ上記のエラーしかでなくなってしまいましたorz
現状はこんなんで、
user@raspberrypi:~$ hcitool scan Device is not available: No such device user@raspberrypi:~$ sudo systemctl start hciuart.service Job for hciuart.service failed. See 'systemctl status hciuart.service' and 'journalctl -xn' for details. user@raspberrypi:~$ sudo hciconfig hci0 up Can't get device info: No such device user@raspberrypi:~$ rfkill list 0: phy0: Wireless LAN Soft blocked: no Hard blocked: no
おそらく原因はこれかと思ってます↓
user@raspberrypi:~$ sudo systemctl status hciuart.service ● hciuart.service - Configure Bluetooth Modems connected by UART Loaded: loaded (/lib/systemd/system/hciuart.service; enabled) Active: failed (Result: exit-code) since 土 2018-09-01 17:26:30 JST; 13min ago Process: 455 ExecStart=/usr/bin/btuart (code=exited, status=1/FAILURE) 9月 01 17:26:29 raspberrypi systemd[1]: Starting Configure Bluetooth Modems connected by UART... 9月 01 17:26:30 raspberrypi btuart[455]: Unknown device type or id 9月 01 17:26:30 raspberrypi systemd[1]: hciuart.service: control process exited, code=exited status=1 9月 01 17:26:30 raspberrypi systemd[1]: Failed to start Configure Bluetooth Modems connected by UART. 9月 01 17:26:30 raspberrypi systemd[1]: Unit hciuart.service entered failed state.
というような感じでどうも hciuart
自体が立ち上がっていないみたいです。
環境は以下です。
- Raspberry Pi3 Model B
user@raspberrypi:~$ lsb_release -a No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 8.0 (jessie) Release: 8.0 Codename: jessie
色々サイト参考にして
sudo apt-get update sudo apt-get upgrade -y sudo apt-get dist-upgrade -y sudo rpi-update sudo reboot sudo apt-get purge pi-bluetooth raspberrypi-sys-mods sudo apt-get install pi-bluetooth raspberrypi-sys-mods sudo reboot
https://teratail.com/questions/100040
https://www.jeedom.com/forum/viewtopic.php?t=24338&start=40
とか、このあたり↓参考にして
http://fishingiot.blogspot.com/2017/05/raspberry-pi-3-bluez-523-544.html
https://learn.adafruit.com/install-bluez-on-the-raspberry-pi/installation
https://blog.creatorslab.jp/2017/03/18/raspberry-pi-ble-install/
Bluezのバージョンアップやって今は5.9になってます。一点不明瞭なところがあるとすれば
user@raspberrypi:~$ dpkg -l |grep blue ii bluej 3.1.7b all A simple but powerful Java IDE. ii bluetooth 5.23-2+rpi2 all Bluetooth support ii bluez 5.23-2+rpi2 armhf Bluetooth tools and daemons ii bluez-firmware 1.2-3+rpi2 all Firmware for Bluetooth devices ii bluez-hcidump 5.23-2+rpi2 armhf Analyses Bluetooth HCI packets ii bluez-obexd 5.23-2+rpi2 armhf bluez obex daemon ii bluez-tools 0.2.0~20140808-3 armhf Set of tools to manage Bluetooth devices for linux ii libbluetooth-dev 5.23-2+rpi2 armhf Development files for using the BlueZ Linux Bluetooth library ii libbluetooth3:armhf 5.23-2+rpi2 armhf Library to use the BlueZ Linux Bluetooth stack ii pi-bluetooth 0.1.3+1 armhf Raspberry Pi 3 bluetooth ii python-bluez 0.20-1 armhf Python wrappers around BlueZ for rapid bluetooth development user@raspberrypi:~$ bluetoothctl [bluetooth]# version Version 5.9
となっていて dpkg -l
と bluetoothctl
で出てくるバージョンが違うところがありますが、ちょっと埒が明かなくなってきましたので何か解決方法思いつく方いらっしゃいましたらヒント頂けませんでしょうか。
よろしくお願いいたします。

バッドをするには、ログインかつ
こちらの条件を満たす必要があります。