こんにちは。 先日は回答ありがとうございます。 質問した問題の答えが、最新のカーネルを使うというある意味、問題発生の初期のころに試みるべき答えで、とても申し訳なかったです。
またいくらか調べてみて、解決できなかったので質問させてください。
R3HC21をbluetoothでdebian11で使いたいのですが、うまくいきません 現在ロジクールのbluetoothマウスM557を使っているのですが、こちらはちゃんと使えています。 マザーボードH670M-ITX/axに標準搭載されているbluetoothは5.2なのですがうまくいかず、使えていなくて、 古いパソコンに付いていた、bluetoothアダプタがv.4.0でこちらは認識しちゃんと使えています。
アダプタの情報です。 $ hciconfig -a hci1: Type: Primary Bus: USB BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0 DOWN RX bytes:96 acl:0 sco:0 events:1 errors:0 TX bytes:4 acl:0 sco:0 commands:1 errors:0 Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Packet type: DM1 DH1 HV1 Link policy: Link mode: SLAVE ACCEPT
hci0: Type: Primary Bus: USB BD Address: XXXX[アドレス] ACL MTU: 310:10 SCO MTU: 64:8 UP RUNNING RX bytes:1493617 acl:93269 sco:0 events:96 errors:0 TX bytes:5212 acl:14 sco:0 commands:70 errors:0 Features: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 Link policy: RSWITCH HOLD SNIFF PARK Link mode: SLAVE ACCEPT Name: 'XXXX[ネーム]' Class: 0x3c0104 Service Classes: Rendering, Capturing, Object Transfer, Audio Device Class: Computer, Desktop workstation HCI Version: 4.0 (0x6) Revision: 0x1d86 LMP Version: 4.0 (0x6) Subversion: 0x1d86 Manufacturer: Cambridge Silicon Radio (10)
また、blueman-appletからはなぜか上手く接続できないのでこちらの方法で接続しています。
bluetooth接続|bluetoothctlでのCUI編|かつお|note https://note.com/noabou/n/n22a462256ef7
$ bluetoothctl [bluetooth]# power on [bluetooth]# scan on [bluetooth]# devices [bluetooth]# agent on [bluetooth]# pair MACアドレス //PINコードがある場合実行 [bluetooth]# trust MACアドレス //PINコードが無い場合に実行 [bluetooth]# connect MACアドレス
とするとM557は使えるのですが、R3HC21は使えません。 R3HC21は要求がv4.0以上なので対応できると思うのですが.....。
こちらも参考にし ja/BluetoothUser - Debian Wiki https://wiki.debian.org/ja/BluetoothUser
指示されてるコマンドが検索しても出てこなかったっりして分かりにくかったのですが、ようやく
sudo hciconfig hci0 piscan hcitool scan sudo bluetooth-agent 4835 rfcomm connect hci0 <address> sudo hciconfig hci0 noscan
とすれば良いのかな、と試してみたのですが、bluetooth-agentコマンドが見つからないと言われて、 apt-file search してもコマンドが含まれるパッケージが見当たらなく、古い手法なのかなと思いました。
こちらを読んで bluetoothctl のコマンド一覧と使い方をまとめてみた - Qiita https://qiita.com/noraworld/items/55c0cb1eb52cf8dccc12
ペアリング時にパスフレーズの入力を求められないのが原因かなとも思い agent onの時に agent KeyboardDisplay と agent KeyboardOnly で試してみても変わらずでした。
関係ないと思いますが bluez-firmware を入れてみたけど、変わらなかったです、
失敗したbluetoothctlのログを載せておきます。 アドレスは極力伏せました、セキリュティ的に安全かは分からないですが。
接続自体は成功しblueman-applet上に表示もされるのですが、いくらキーボードを押しても反応しません。
今回は高級品を試しに買ってみたのですが、コケてショックです。
agent KeyboardDisplayのログ
w@host:~$ bluetoothctl Agent registered [Bluetooth Mouse M557]# power on Changing power on succeeded [NEW] Device XXXX[REALFORCEアドレス] REALFORCE_1 [NEW] Primary Service (Handle 0x4d5d) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000a 00001801-0000-1000-8000-00805f9b34fb Generic Attribute Profile [NEW] Primary Service (Handle 0x4d5d) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000b 0000180a-0000-1000-8000-00805f9b34fb Device Information [NEW] Characteristic (Handle 0x18ab) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000b/char000c 00002a29-0000-1000-8000-00805f9b34fb Manufacturer Name String [NEW] Characteristic (Handle 0x18ab) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000b/char000e 00002a50-0000-1000-8000-00805f9b34fb PnP ID [NEW] Primary Service (Handle 0x4d5d) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service0010 0000180f-0000-1000-8000-00805f9b34fb Battery Service [NEW] Characteristic (Handle 0x18ab) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service0010/char0011 00002a19-0000-1000-8000-00805f9b34fb Battery Level [NEW] Descriptor (Handle 0x2800) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service0010/char0011/desc0013 00002902-0000-1000-8000-00805f9b34fb Client Characteristic Configuration [CHG] Device XXXX[REALFORCEアドレス] UUIDs: 00001800-0000-1000-8000-00805f9b34fb [CHG] Device XXXX[REALFORCEアドレス] UUIDs: 00001801-0000-1000-8000-00805f9b34fb [CHG] Device XXXX[REALFORCEアドレス] UUIDs: 0000180a-0000-1000-8000-00805f9b34fb [CHG] Device XXXX[REALFORCEアドレス] UUIDs: 0000180f-0000-1000-8000-00805f9b34fb [CHG] Device XXXX[REALFORCEアドレス] UUIDs: 00001812-0000-1000-8000-00805f9b34fb [CHG] Device XXXX[REALFORCEアドレス] ServicesResolved: yes [CHG] Device XXXX[REALFORCEアドレス] WakeAllowed: yes [Bluetooth Mouse M557]# scan on Discovery started [CHG] Controller XXXX[BTアダプタアドレス2] Discovering: yes [CHG] Device XXXX[REALFORCEアドレス] ServicesResolved: no [CHG] Device XXXX[REALFORCEアドレス] Connected: no [CHG] Device XXXX[REALFORCEアドレス] RSSI: -64 [CHG] Device XXXX[REALFORCEアドレス] Appearance: 0x03c1 [CHG] Device XXXX[REALFORCEアドレス] Icon: input-keyboard [CHG] Device XXXX[REALFORCEアドレス] Connected: yes [Bluetooth Mouse M557]# devices Device XXXX[M557アドレス2] Bluetooth Mouse M557 Device XXXX[REALFORCEアドレス] REALFORCE_1 [Bluetooth Mouse M557]# agent KeyboardDisplay Agent is already registered [CHG] Device XXXX[REALFORCEアドレス] Connected: no [CHG] Device XXXX[REALFORCEアドレス] Connected: yes [CHG] Device XXXX[REALFORCEアドレス] Connected: no [Bluetooth Mouse M557]# pair XXXX[REALFORCEアドレス] Attempting to pair with XXXX[REALFORCEアドレス] [Bluetooth Mouse M557]# trust XXXX[REALFORCEアドレス] [CHG] Device XXXX[REALFORCEアドレス] Trusted: yes Changing XXXX[REALFORCEアドレス] trust succeeded [Bluetooth Mouse M557]# connect XXXX[REALFORCEアドレス] Attempting to connect to XXXX[REALFORCEアドレス] Failed to pair: org.bluez.Error.Failed Failed to connect: org.bluez.Error.Failed [DEL] Primary Service (Handle 0x0cb3) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000a 00001801-0000-1000-8000-00805f9b34fb Generic Attribute Profile [DEL] Characteristic (Handle 0x6100) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000b/char000c 00002a29-0000-1000-8000-00805f9b34fb Manufacturer Name String [DEL] Characteristic (Handle 0x6100) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000b/char000e 00002a50-0000-1000-8000-00805f9b34fb PnP ID [DEL] Primary Service (Handle 0x2130) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000b 0000180a-0000-1000-8000-00805f9b34fb Device Information [DEL] Descriptor (Handle 0xc220) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service0010/char0011/desc0013 00002902-0000-1000-8000-00805f9b34fb Client Characteristic Configuration [DEL] Characteristic (Handle 0x6100) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service0010/char0011 00002a19-0000-1000-8000-00805f9b34fb Battery Level [DEL] Primary Service (Handle 0xe2e0) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service0010 0000180f-0000-1000-8000-00805f9b34fb Battery Service [DEL] Device XXXX[REALFORCEアドレス] REALFORCE_1 [NEW] Device XXXX[謎アドレス1] [DEL] Device XXXX[謎アドレス1] [Bluetooth Mouse M557]#
agent KeyboardOnlyのログ
w@host:~$ bluetoothctl Agent registered [Bluetooth Mouse M557]# power on Changing power on succeeded [NEW] Device XXXX[REALFORCEアドレス] REALFORCE_1 [NEW] Primary Service (Handle 0x9d5d) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000a 00001801-0000-1000-8000-00805f9b34fb Generic Attribute Profile [NEW] Primary Service (Handle 0x9d5d) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000b 0000180a-0000-1000-8000-00805f9b34fb Device Information [NEW] Characteristic (Handle 0xa8ab) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000b/char000c 00002a29-0000-1000-8000-00805f9b34fb Manufacturer Name String [NEW] Characteristic (Handle 0xa8ab) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000b/char000e 00002a50-0000-1000-8000-00805f9b34fb PnP ID [NEW] Primary Service (Handle 0x9d5d) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service0010 0000180f-0000-1000-8000-00805f9b34fb Battery Service [NEW] Characteristic (Handle 0xa8ab) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service0010/char0011 00002a19-0000-1000-8000-00805f9b34fb Battery Level [NEW] Descriptor (Handle 0xb800) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service0010/char0011/desc0013 00002902-0000-1000-8000-00805f9b34fb Client Characteristic Configuration [CHG] Device XXXX[REALFORCEアドレス] UUIDs: 00001800-0000-1000-8000-00805f9b34fb [CHG] Device XXXX[REALFORCEアドレス] UUIDs: 00001801-0000-1000-8000-00805f9b34fb [CHG] Device XXXX[REALFORCEアドレス] UUIDs: 0000180a-0000-1000-8000-00805f9b34fb [CHG] Device XXXX[REALFORCEアドレス] UUIDs: 0000180f-0000-1000-8000-00805f9b34fb [CHG] Device XXXX[REALFORCEアドレス] UUIDs: 00001812-0000-1000-8000-00805f9b34fb [CHG] Device XXXX[REALFORCEアドレス] ServicesResolved: yes [CHG] Device XXXX[REALFORCEアドレス] WakeAllowed: yes [Bluetooth Mouse M557]# scan on Discovery started [CHG] Controller XXXX[BTアダプタアドレス2] Discovering: yes [Bluetooth Mouse M557]# devices Device XXXX[M557アドレス2] Bluetooth Mouse M557 Device XXXX[REALFORCEアドレス] REALFORCE_1 [Bluetooth Mouse M557]# agent KeyboardOnly Agent is already registered [CHG] Device XXXX[REALFORCEアドレス] ServicesResolved: no [CHG] Device XXXX[REALFORCEアドレス] Connected: no [CHG] Device XXXX[REALFORCEアドレス] Connected: yes [Bluetooth Mouse M557]# pair XXXX[REALFORCEアドレス] Attempting to pair with XXXX[REALFORCEアドレス] [CHG] Device XXXX[REALFORCEアドレス] Connected: no Failed to pair: org.bluez.Error.AuthenticationCanceled [Bluetooth Mouse M557]# trust XXXX[REALFORCEアドレス] [CHG] Device XXXX[REALFORCEアドレス] Trusted: yes Changing XXXX[REALFORCEアドレス] trust succeeded [DEL] Primary Service (Handle 0x0020) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000a 00001801-0000-1000-8000-00805f9b34fb Generic Attribute Profile [DEL] Characteristic (Handle 0xcc00) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000b/char000c 00002a29-0000-1000-8000-00805f9b34fb Manufacturer Name String [DEL] Characteristic (Handle 0xcc00) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000b/char000e 00002a50-0000-1000-8000-00805f9b34fb PnP ID [DEL] Primary Service (Handle 0xb500) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000b 0000180a-0000-1000-8000-00805f9b34fb Device Information [DEL] Descriptor (Handle 0x5530) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service0010/char0011/desc0013 00002902-0000-1000-8000-00805f9b34fb Client Characteristic Configuration [DEL] Characteristic (Handle 0xcc00) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service0010/char0011 00002a19-0000-1000-8000-00805f9b34fb Battery Level [DEL] Primary Service (Handle 0x7580) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service0010 0000180f-0000-1000-8000-00805f9b34fb Battery Service [DEL] Device XXXX[REALFORCEアドレス] REALFORCE_1 [Bluetooth Mouse M557]# connect XXXX[REALFORCEアドレス] Device XXXX[REALFORCEアドレス] not available [Bluetooth Mouse M557]# connect XXXX[REALFORCEアドレス] Device XXXX[REALFORCEアドレス] not available [Bluetooth Mouse M557]# trust XXXX[REALFORCEアドレス] Device XXXX[REALFORCEアドレス] not available [Bluetooth Mouse M557]# pair XXXX[REALFORCEアドレス] Device XXXX[REALFORCEアドレス] not available [NEW] Device XXXX[REALFORCEアドレス] REALFORCE_1 [NEW] Primary Service (Handle 0x9d5d) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000a 00001801-0000-1000-8000-00805f9b34fb Generic Attribute Profile [NEW] Primary Service (Handle 0x9d5d) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000b 0000180a-0000-1000-8000-00805f9b34fb Device Information [NEW] Characteristic (Handle 0xa8ab) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000b/char000c 00002a29-0000-1000-8000-00805f9b34fb Manufacturer Name String [NEW] Characteristic (Handle 0xa8ab) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000b/char000e 00002a50-0000-1000-8000-00805f9b34fb PnP ID [NEW] Primary Service (Handle 0x9d5d) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service0010 0000180f-0000-1000-8000-00805f9b34fb Battery Service [NEW] Characteristic (Handle 0xa8ab) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service0010/char0011 00002a19-0000-1000-8000-00805f9b34fb Battery Level [NEW] Descriptor (Handle 0xbc80) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service0010/char0011/desc0013 00002902-0000-1000-8000-00805f9b34fb Client Characteristic Configuration [CHG] Device XXXX[REALFORCEアドレス] UUIDs: 00001800-0000-1000-8000-00805f9b34fb [CHG] Device XXXX[REALFORCEアドレス] UUIDs: 00001801-0000-1000-8000-00805f9b34fb [CHG] Device XXXX[REALFORCEアドレス] UUIDs: 0000180a-0000-1000-8000-00805f9b34fb [CHG] Device XXXX[REALFORCEアドレス] UUIDs: 0000180f-0000-1000-8000-00805f9b34fb [CHG] Device XXXX[REALFORCEアドレス] UUIDs: 00001812-0000-1000-8000-00805f9b34fb [CHG] Device XXXX[REALFORCEアドレス] ServicesResolved: yes [CHG] Device XXXX[REALFORCEアドレス] WakeAllowed: yes [Bluetooth Mouse M557]# pair XXXX[REALFORCEアドレス] Attempting to pair with XXXX[REALFORCEアドレス] [Bluetooth Mouse M557]# trust XXXX[REALFORCEアドレス] [CHG] Device XXXX[REALFORCEアドレス] Trusted: yes Changing XXXX[REALFORCEアドレス] trust succeeded [Bluetooth Mouse M557]# connect XXXX[REALFORCEアドレス] Attempting to connect to XXXX[REALFORCEアドレス] Connection successful [CHG] Device XXXX[REALFORCEアドレス] ServicesResolved: no [CHG] Device XXXX[REALFORCEアドレス] Connected: no Failed to pair: org.bluez.Error.AuthenticationCanceled [CHG] Device XXXX[REALFORCEアドレス] Connected: yes [CHG] Device XXXX[REALFORCEアドレス] Connected: no [CHG] Device XXXX[REALFORCEアドレス] RSSI: -84 [CHG] Device XXXX[REALFORCEアドレス] Appearance: 0x03c1 [CHG] Device XXXX[REALFORCEアドレス] Icon: input-keyboard [CHG] Device XXXX[REALFORCEアドレス] Connected: yes [CHG] Device XXXX[REALFORCEアドレス] Connected: no [CHG] Device XXXX[REALFORCEアドレス] RSSI: -59 [CHG] Device XXXX[REALFORCEアドレス] Connected: yes [CHG] Device XXXX[REALFORCEアドレス] Connected: no [CHG] Device XXXX[REALFORCEアドレス] Connected: yes [REALFORCE_1]# connect XXXX[REALFORCEアドレス] Attempting to connect to XXXX[REALFORCEアドレス] Connection successful [REALFORCE_1]# pair XXXX[REALFORCEアドレス] Attempting to pair with XXXX[REALFORCEアドレス] [CHG] Device XXXX[REALFORCEアドレス] Connected: no Failed to pair: org.bluez.Error.AuthenticationCanceled [CHG] Device XXXX[REALFORCEアドレス] Connected: yes [REALFORCE_1]# trust XXXX[REALFORCEアドレス] Changing XXXX[REALFORCEアドレス] trust succeeded [CHG] Device XXXX[REALFORCEアドレス] Connected: no [CHG] Device XXXX[REALFORCEアドレス] Connected: yes [CHG] Device XXXX[REALFORCEアドレス] Connected: no [DEL] Primary Service (Handle 0x0020) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000a 00001801-0000-1000-8000-00805f9b34fb Generic Attribute Profile [DEL] Characteristic (Handle 0xcc00) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000b/char000c 00002a29-0000-1000-8000-00805f9b34fb Manufacturer Name String [DEL] Characteristic (Handle 0xcc00) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000b/char000e 00002a50-0000-1000-8000-00805f9b34fb PnP ID [DEL] Primary Service (Handle 0x1d20) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000b 0000180a-0000-1000-8000-00805f9b34fb Device Information [DEL] Descriptor (Handle 0x24a0) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service0010/char0011/desc0013 00002902-0000-1000-8000-00805f9b34fb Client Characteristic Configuration [DEL] Characteristic (Handle 0xcc00) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service0010/char0011 00002a19-0000-1000-8000-00805f9b34fb Battery Level [DEL] Primary Service (Handle 0x4c40) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service0010 0000180f-0000-1000-8000-00805f9b34fb Battery Service [DEL] Device XXXX[REALFORCEアドレス] REALFORCE_1 [NEW] Device XXXX[REALFORCEアドレス] REALFORCE_1 [CHG] Device XXXX[REALFORCEアドレス] Connected: yes [NEW] Primary Service (Handle 0x9d5d) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000a 00001801-0000-1000-8000-00805f9b34fb Generic Attribute Profile [NEW] Primary Service (Handle 0x9d5d) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000b 0000180a-0000-1000-8000-00805f9b34fb Device Information [NEW] Characteristic (Handle 0xa8ab) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000b/char000c 00002a29-0000-1000-8000-00805f9b34fb Manufacturer Name String [NEW] Characteristic (Handle 0xa8ab) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service000b/char000e 00002a50-0000-1000-8000-00805f9b34fb PnP ID [NEW] Primary Service (Handle 0x9d5d) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service0010 0000180f-0000-1000-8000-00805f9b34fb Battery Service [NEW] Characteristic (Handle 0xa8ab) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service0010/char0011 00002a19-0000-1000-8000-00805f9b34fb Battery Level [NEW] Descriptor (Handle 0xbd40) /org/bluez/hci0/dev_XXXX[REALFORCEアドレス2]/service0010/char0011/desc0013 00002902-0000-1000-8000-00805f9b34fb Client Characteristic Configuration [CHG] Device XXXX[REALFORCEアドレス] UUIDs: 00001800-0000-1000-8000-00805f9b34fb [CHG] Device XXXX[REALFORCEアドレス] UUIDs: 00001801-0000-1000-8000-00805f9b34fb [CHG] Device XXXX[REALFORCEアドレス] UUIDs: 0000180a-0000-1000-8000-00805f9b34fb [CHG] Device XXXX[REALFORCEアドレス] UUIDs: 0000180f-0000-1000-8000-00805f9b34fb [CHG] Device XXXX[REALFORCEアドレス] UUIDs: 00001812-0000-1000-8000-00805f9b34fb [CHG] Device XXXX[REALFORCEアドレス] ServicesResolved: yes [CHG] Device XXXX[REALFORCEアドレス] WakeAllowed: yes [REALFORCE_1]# exit