나는 btmon
피어로부터 전송/수신된 블루투스 패킷을 모니터링하는 데 사용합니다. 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