[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bluetooth-dev] HCIDump 0.2 released.



Hi Folks,

I think this may be interesting/useful for OpenBT users as well.

HCIDump (stands for Hyper Cool Incredible Debugging utility :)) has been released.
http://bluez.sf.net/hcidump-0.2.tar.gz

This release understands all HCI events and commands and has pretty much complete L2CAP
parser with PSM tracking (will be used for SDP and RFCOMM parsing).
Parser is now separate unified library that can be easily reused by other tools (hcitool, etc).
Output was improved and simplified (examples provided below).
HCIDump can write/read dumps to/from file. Dump file is platform independent, you can save  
it on ARM, for example, and later parse on Sparc or x86 and vice versa. 
If you have some bizarre problems you can now save dump and provide URL to list members, so 
we can analyze it.

Happy dumping :) 
Max

Examples 

Device initialization:

bluez:/>hcidump -i hci0 -h       
HCIDump - HCI packet analyzer ver 0.2 08/21/2001.
device: hci0 snap_len: 73 filter: none
< HCI Command: Read Local Supported Features(0x04|0x0003) plen 0
 > HCI Event: Command Complete(0x0e) plen 12
   01 03 10 00 07 EA 31 00 00 00 00 00 
< HCI Command: Read Buffer Size(0x04|0x0005) plen 0
 > HCI Event: Command Complete(0x0e) plen 11
   01 05 10 00 A0 02 00 0A 00 00 00 
< HCI Command: Read BD ADDR(0x04|0x0009) plen 0
 > HCI Event: Command Complete(0x0e) plen 10
   01 09 10 00 45 42 14 37 80 00 
< HCI Command: Set Event Filter(0x03|0x0005) plen 1
   00 
 > HCI Event: Command Complete(0x0e) plen 4
   01 05 0C 00 
< HCI Command: Write Page Timeout(0x03|0x0018) plen 2
   00 80 
 > HCI Event: Command Complete(0x0e) plen 4
   01 18 0C 00 
< HCI Command: Write Connection Accept Timeout(0x03|0x0016) plen 2
   00 7D 
 > HCI Event: Command Complete(0x0e) plen 4
   01 16 0C 00 
< HCI Command: Write Scan Enable(0x03|0x001a) plen 1
   03 
 > HCI Event: Command Complete(0x0e) plen 4
   01 1A 0C 00 
< HCI Command: Write Authentication Enable(0x03|0x0020) plen 1
   00 
 > HCI Event: Command Complete(0x0e) plen 4
   01 20 0C 00 

SDP session with Digianswer:
bluez:/>hcidump -r /tmp/digi_sdp_dump -h
HCIDump - HCI packet analyzer ver 0.2 08/21/2001.
 > HCI Event: Connect Request(0x04) plen 10
   A3 94 00 CD 50 00 0C 01 76 01 
< HCI Command: Accept Connection Request(0x01|0x0009) plen 7
   A3 94 00 CD 50 00 01 
 > HCI Event: Command Status(0x0f) plen 4
   00 01 09 04 
 > HCI Event: Connect Complete(0x03) plen 11
   00 01 00 A3 94 00 CD 50 00 01 00 
 > HCI Event: Max Slots Change(0x1b) plen 3
   01 00 05 
 > ACL data: handle 0x0001 flags 0x02 dlen 12
   L2CAP(s): Connect req: psm 1 scid 0x0040
< ACL data: handle 0x0001 flags 0x02 dlen 16
   L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
 > ACL data: handle 0x0001 flags 0x02 dlen 16
   L2CAP(s): Config req: dcid 0x0040 flags 0x0000 clen 4
     MTU 512 
< ACL data: handle 0x0001 flags 0x02 dlen 14
   L2CAP(s): Config rsp: scid 0x0040 flags 0x0000 result 0 clen 0
< ACL data: handle 0x0001 flags 0x02 dlen 16
   L2CAP(s): Config req: dcid 0x0040 flags 0x0000 clen 4
     MTU 1024 
 > ACL data: handle 0x0001 flags 0x02 dlen 18
   L2CAP(s): Config rsp: scid 0x0040 flags 0x0000 result 0 clen 4
     MTU 512 
 > ACL data: handle 0x0001 flags 0x02 dlen 17
   L2CAP(d): cid 0x40 len 13 [psm 1]
   02 00 00 00 08 35 03 19 11 01 FF FF 00 
< ACL data: handle 0x0001 flags 0x02 dlen 18
   L2CAP(d): cid 0x40 len 14 [psm 1]
   03 00 00 00 09 00 01 00 01 01 00 FF FF 00 
 > ACL data: handle 0x0001 flags 0x02 dlen 21
   L2CAP(d): cid 0x40 len 17 [psm 1]
   04 14 79 00 0C 01 00 FF FF FF FF 35 03 09 01 00 00 
< ACL data: handle 0x0001 flags 0x02 dlen 23
   L2CAP(d): cid 0x40 len 19 [psm 1]
   05 14 79 00 0E 00 0B 35 09 09 01 00 25 04 43 4F 4D 33 00 
 > HCI Event: Number of Completed Packets(0x13) plen 5
   01 01 00 05 00 
 > ACL data: handle 0x0001 flags 0x02 dlen 21
   L2CAP(d): cid 0x40 len 17 [psm 1]
   04 12 D7 00 0C 01 00 FF FF FF FF 35 03 09 00 04 00 
< ACL data: handle 0x0001 flags 0x02 dlen 31
   L2CAP(d): cid 0x40 len 27 [psm 1]
   05 12 D7 00 16 00 13 35 11 09 00 04 35 0C 35 03 19 01 00 35 
   05 19 00 03 08 0A 00 
 > ACL data: handle 0x0001 flags 0x02 dlen 17
   L2CAP(d): cid 0x40 len 13 [psm 1]
   02 00 00 00 08 35 03 19 11 11 FF FF 00 

<....skiped....>

< ACL data: handle 0x0001 flags 0x02 dlen 45
   L2CAP(d): cid 0x40 len 41 [psm 1]
   05 C5 B5 00 24 00 21 35 1F 09 01 00 25 1A 44 69 67 69 61 6E 
   73 77 65 72 20 4E 65 74 77 6F 72 6B 20 53 75 70 70 6F 72 74 
   00 
 > HCI Event: Number of Completed Packets(0x13) plen 5
   01 01 00 05 00 
 > ACL data: handle 0x0001 flags 0x02 dlen 12
   L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040
< ACL data: handle 0x0001 flags 0x02 dlen 12
   L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040
 > HCI Event: Disconn Complete(0x05) plen 4
   00 01 00 13 

-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com