【ラズベリーパイ】bluetoothが機能していない?
ラズベリーパイ経由でswitchbotを動作させようと考えていて、switchbotをamazonで購入しました(*´ω`)まだ届いていないのですが、その間にラズベリーパイをセットアップしてbluetoothの動作確認をしたところ、エラーが出たので、その対処の備忘録になります。
■事前準備
動作させるのに必要なツールをインストール
# apt-get install bluez pulseaudio-module-bluetooth
動作確認
# bluetoothctl
Waiting to connect to bluetoothd..
反応しない・・・
対応
# systemctl status bluetooth
failedになっていたので下記で起動
# systemctl start bluetooth
# systemctl enable bluetooth
下記も実行
# systemctl start hciuart
# systemctl enable hciuart
# hciconfig
hci0: Type: Primary Bus: UART
BD Address: B8:27:EB:D1:91:B2 ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING
RX bytes:822 acl:0 sco:0 events:56 errors:0
TX bytes:3738 acl:0 sco:0 commands:56 errors:0
再度確認
# bluetoothctl
[NEW] Controller B8:27:EB:D1:91:B2 msk5 [default]
↑ちゃんとデバイス認識した
[bluetooth]# scan on
Discovery started
[CHG] Controller B8:27:EB:D1:91:B2 Discovering: yes
[NEW] Device 65:B6:18:73:3B:A8 65-B6-18-73-3B-A8
[NEW] Device 0C:05:A1:F8:97:E0 0C-05-A1-F8-97-E0
[NEW] Device 5C:6C:98:C3:25:1B 5C-6C-98-C3-25-1B
[NEW] Device 5A:B6:EF:1C:EB:F6 5A-B6-EF-1C-EB-F6
[NEW] Device 15:91:C7:2C:C9:61 15-91-C7-2C-C9-61
・・・
色々出てきました(^^)
次回switchbotとの接続方法・起動を載せたいと思います。