コマンド †
- hciattach - HCI UART driver initialization utility
- hciconfig - HCI device configuration utility
$ sudo hciconfig
- hcidump ... Bluetoothの通信をキャプチャ
- hcidump コマンドを実行した後に
$ hcidump
HCI sniffer - Bluetooth packet analyzer ver 5.23
device: hci0 snap_len: 1500 filter: 0xffffffff
- "sudo l2ping -c 1 0F:02:17:42:61:16" を実行
> HCI Event: Command Status (0x0f) plen 4
Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 12 bdaddr 0F:02:17:42:61:16 type ACL encrypt 0x00
> HCI Event: Command Status (0x0f) plen 4
Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
> HCI Event: Read Remote Supported Features (0x0b) plen 11
status 0x00 handle 12
Features: 0xff 0xfb 0x8f 0xf8 0x8b 0x85 0x51 0x83
> HCI Event: Command Status (0x0f) plen 4
Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
> HCI Event: Read Remote Extended Features (0x23) plen 13
status 0x00 handle 12 page 1 max 0
Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
> HCI Event: Command Status (0x0f) plen 4
Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> HCI Event: Remote Name Req Complete (0x07) plen 255
status 0x00 bdaddr 0F:02:17:42:61:16 name 'BlueTooth Printer'
> HCI Event: Command Complete (0x0e) plen 7
Read RSSI (0x05|0x0005) ncmd 1
status 0x00 handle 12 rssi 0
> HCI Event: Command Complete (0x0e) plen 7
Read Link Quality (0x05|0x0003) ncmd 1
status 0x00 handle 12 lq 255
> HCI Event: Command Complete (0x0e) plen 7
Read Transmit Power Level (0x03|0x002d) ncmd 1
status 0x00 handle 12 level 12
> HCI Event: Command Complete (0x0e) plen 7
Read RSSI (0x05|0x0005) ncmd 1
status 0x00 handle 12 rssi 0
> HCI Event: Command Complete (0x0e) plen 7
Read Link Quality (0x05|0x0003) ncmd 1
status 0x00 handle 12 lq 255
> HCI Event: Command Complete (0x0e) plen 7
Read Transmit Power Level (0x03|0x002d) ncmd 1
status 0x00 handle 12 level 12
> HCI Event: Command Complete (0x0e) plen 7
Read RSSI (0x05|0x0005) ncmd 1
status 0x00 handle 12 rssi 0
> HCI Event: Command Complete (0x0e) plen 7
Read Link Quality (0x05|0x0003) ncmd 1
status 0x00 handle 12 lq 255
> HCI Event: Command Complete (0x0e) plen 7
Read Transmit Power Level (0x03|0x002d) ncmd 1
status 0x00 handle 12 level 12
> HCI Event: Command Status (0x0f) plen 4
Disconnect (0x01|0x0006) status 0x00 ncmd 1
> HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 12 reason 0x16
Reason: Connection Terminated by Local Host
- hidd
$ sudo hidd --search
- rfcomm
- バインド状況を確認
$ sudo rfcomm -a
- アンバインド
$ sudo rfcomm release 1
- l2ping
$ sudo l2ping -c 4 0F:02:17:42:61:16
Ping: 0F:02:17:42:61:16 from B8:27:EB:78:D3:BF (data size 44) ...
0 bytes from 0F:02:17:42:61:16 id 0 time 50.72ms
0 bytes from 0F:02:17:42:61:16 id 1 time 43.25ms
0 bytes from 0F:02:17:42:61:16 id 2 time 19.89ms
0 bytes from 0F:02:17:42:61:16 id 3 time 52.33ms
4 sent, 4 received, 0% loss
bluetoothctl †
- devices
- pair <MAC ADDR>
- trust <MAC ADDR>
- connect <MAC ADDR>
えとせとら †
|