Raspberrypi3でBluetoothが使えない
受付中
回答 1
投稿
- 評価
- クリップ 0
- VIEW 6,691
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
で出てくるバージョンが違うところがありますが、ちょっと埒が明かなくなってきましたので何か解決方法思いつく方いらっしゃいましたらヒント頂けませんでしょうか。
よろしくお願いいたします。
-
気になる質問をクリップする
クリップした質問は、後からいつでもマイページで確認できます。
またクリップした質問に回答があった際、通知やメールを受け取ることができます。
クリップを取り消します
-
良い質問の評価を上げる
以下のような質問は評価を上げましょう
- 質問内容が明確
- 自分も答えを知りたい
- 質問者以外のユーザにも役立つ
評価が高い質問は、TOPページの「注目」タブのフィードに表示されやすくなります。
質問の評価を上げたことを取り消します
-
評価を下げられる数の上限に達しました
評価を下げることができません
- 1日5回まで評価を下げられます
- 1日に1ユーザに対して2回まで評価を下げられます
質問の評価を下げる
teratailでは下記のような質問を「具体的に困っていることがない質問」、「サイトポリシーに違反する質問」と定義し、推奨していません。
- プログラミングに関係のない質問
- やってほしいことだけを記載した丸投げの質問
- 問題・課題が含まれていない質問
- 意図的に内容が抹消された質問
- 過去に投稿した質問と同じ内容の質問
- 広告と受け取られるような投稿
評価が下がると、TOPページの「アクティブ」「注目」タブのフィードに表示されにくくなります。
質問の評価を下げたことを取り消します
この機能は開放されていません
評価を下げる条件を満たしてません
質問の評価を下げる機能の利用条件
この機能を利用するためには、以下の事項を行う必要があります。
- 質問回答など一定の行動
-
メールアドレスの認証
メールアドレスの認証
-
質問評価に関するヘルプページの閲覧
質問評価に関するヘルプページの閲覧
15分調べてもわからないことは、teratailで質問しよう!
- ただいまの回答率 88.20%
- 質問をまとめることで、思考を整理して素早く解決
- テンプレート機能で、簡単に質問をまとめられる