btmon
ピアから送信/受信したBluetoothパケットを監視するために使用します。btmon
Ubuntuシステムでこのコマンドを実行すると、以下の説明に従ってログが収集されます。私も次のマニュアルページを読みました。https://manpages.debian.org/testing/bluez/btmon.1.en.html
どのパケットが送信パケットと見なされ、どのパケットがすべてのデータ受信と見なされるかを知る必要があります。
ログにTxとRxが記載されており、時間も言及されていることを観察しましたが、パケットの送信が始まる場所とパケットの受信が終わる場所はわかりません。
基本的に、ピアがパケットを送信した後にどれくらい時間がかかるかを知りたいです。
< ACL Data TX: Handle 3585 flags 0x01 dlen 27 [hci0] 20.084811
ATT: Write Command (0x52) len 130
Handle: 0x0013
Data: 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001ffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
> HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 20.085678
Num handles: 1
Handle: 3585
Count: 1
< ACL Data TX: Handle 3585 flags 0x00 dlen 19 [hci0] 20.085759
ATT: Write Command (0x52) len 14
Handle: 0x0013
Data: 0000000000000000edfa5318
> HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 20.086641
Num handles: 1
Handle: 3585
Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 20.087638
Num handles: 1
Handle: 3585
Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 20.088637
Num handles: 1
Handle: 3585
Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 20.132702
Num handles: 1
Handle: 3585
Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 20.133698
Num handles: 1
Handle: 3585
Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 20.134653
Num handles: 1
Handle: 3585
Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 20.135646
Num handles: 1
Handle: 3585
Count: 1
> ACL Data RX: Handle 3585 flags 0x02 dlen 9 [hci0] 20.182235
ATT: Handle Value Notification (0x1b) len 4
Handle: 0x0010
Data: 0206
> ACL Data RX: Handle 3585 flags 0x02 dlen 17 [hci0] 20.282358
ATT: Handle Value Notification (0x1b) len 12
Handle: 0x0010
Data: 000c000007177df11e96
< ACL Data TX: Handle 3585 flags 0x00 dlen 27 [hci0] 20.301577
< ACL Data TX: Handle 3585 flags 0x01 dlen 27 [hci0] 20.301615
< ACL Data TX: Handle 3585 flags 0x01 dlen 27 [hci0] 20.301618
< ACL Data TX: Handle 3585 flags 0x01 dlen 27 [hci0] 20.301620
< ACL Data TX: Handle 3585 flags 0x01 dlen 27 [hci0] 20.301622
ATT: Write Command (0x52) len 130
Handle: 0x0013
Data: 0202010c00000718000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
< ACL Data TX: Handle 3585 flags 0x00 dlen 27 [hci0] 20.319607
< ACL Data TX: Handle 3585 flags 0x01 dlen 27 [hci0] 20.319734
> HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 20.332684
Num handles: 1
Handle: 3585
Count: 1
< ACL Data TX: Handle 3585 flags 0x01 dlen 27 [hci0] 20.332724
> HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 20.333649
Num handles: 1
Handle: 3585
Count: 1
< ACL Data TX: Handle 3585 flags 0x01 dlen 27 [hci0] 20.333696
> HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 20.334697
Num handles: 1
Handle: 3585
Count: 1
< ACL Data TX: Handle 3585 flags 0x01 dlen 27 [hci0] 20.334817
ATT: Write Command (0x52) len 130
Handle: 0x0013
Data: 0000000000000000000000000000000000000000000000000000000080c0e0f0f0fcfcfeffffffffffffffffffffffffff7f1f1f07070101010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
> HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 20.335683
Num handles: 1
Handle: 3585
Count: 1
< ACL Data TX: Handle 3585 flags 0x00 dlen 19 [hci0] 20.335759
ATT: Write Command (0x52) len 14
Handle: 0x0013
Data: 000000000000000093c682c9
> HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 20.336693
Num handles: 1
Handle: 3585
Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 20.337651
Num handles: 1
Handle: 3585
Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 20.338651
Num handles: 1
Handle: 3585
Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 20.382660
Num handles: 1
Handle: 3585
Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 20.383658
Num handles: 1
Handle: 3585
Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 20.384657
Num handles: 1
Handle: 3585
Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5 [hci0] 20.385682
Num handles: 1
Handle: 3585
Count: 1
> ACL Data RX: Handle 3585 flags 0x02 dlen 9 [hci0] 20.432153
ATT: Handle Value Notification (0x1b) len 4
Handle: 0x0010
Data: 0206
> ACL Data RX: Handle 3585 flags 0x02 dlen 17 [hci0] 20.532366
ATT: Handle Value Notification (0x1b) len 12
Handle: 0x0010
Data: 000c0000071845bea32b
< ACL Data TX: Handle 3585 flags 0x00 dlen 27 [hci0] 20.555377
< ACL Data TX: Handle 3585 flags 0x01 dlen 27 [hci0] 20.555479
< ACL Data TX: Handle 3585 flags 0x01 dlen 27 [hci0] 20.555499
< ACL Data TX: Handle 3585 flags 0x01 dlen 27 [hci0] 20.555514
< ACL Data TX: Handle 3585 flags 0x01 dlen 27
誰かが私にbtmonログ形式を説明して必要なものを得ることができますか?フォーマットはどこに文書化されていますか?
ベストアンサー1
man btmon
btsnoop形式で教えてください。
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/btsnoop.txt