OSDN Git Service
Andrei Emeltchenko [Thu, 28 Jun 2012 13:09:22 +0000 (16:09 +0300)]
hcidump: Add decoding AMP Assoc data in HCI parser
Andrei Emeltchenko [Thu, 28 Jun 2012 13:09:21 +0000 (16:09 +0300)]
hcidump: Make assoc dump function available for HCI parser
AMP Assoc dump will be used also for HCI dump functions
Andrei Emeltchenko [Thu, 28 Jun 2012 13:09:20 +0000 (16:09 +0300)]
hcidump: Fix number of triplet calculation
Country code is also included in the TLV size.
Andrei Emeltchenko [Wed, 16 May 2012 08:26:52 +0000 (11:26 +0300)]
hcidump: Decode A2MP Get AMP Assoc rsp
Adds decoding Assoc data:
...
> ACL data: handle 11 flags 0x02 dlen 53
A2MP: Get AMP Assoc rsp: id 1 status (0) Success
Assoc data [len 39]:
MAC: <address>
Preferred Chan List number of triplets 4
Country code: XXX
Reg ext id 201 reg class 254 coverage class 0
Channel 1 max power 20
Channels 2 - 12 max power 20
Channels 4 - 8 max power 0
PAL CAP: 00 00 00 00
PAL VER: 01 Comp ID: <id> SubVer: 0001
...
Andrei Emeltchenko [Mon, 7 May 2012 13:49:26 +0000 (16:49 +0300)]
hcidump: Fix "length" name for A2MP Assoc log
Andrzej Kaczmarek [Fri, 30 Mar 2012 12:24:38 +0000 (14:24 +0200)]
hcidump: Add support for passing RFCOMM channel for SAP
Andrzej Kaczmarek [Fri, 30 Mar 2012 12:24:37 +0000 (14:24 +0200)]
hcidump: Add parameters parsing support for SAP PDU
Andrzej Kaczmarek [Fri, 30 Mar 2012 12:24:36 +0000 (14:24 +0200)]
hcidump: Add basic SAP parsing
Luiz Augusto von Dentz [Thu, 22 Mar 2012 19:04:43 +0000 (16:04 -0300)]
hcidump: Add parsing support for Volume Change notification
Luiz Augusto von Dentz [Thu, 22 Mar 2012 19:04:42 +0000 (16:04 -0300)]
hcidump: Add parsing for SetAbsoluteVolume PDU
Peter Krystad [Tue, 6 Mar 2012 00:14:52 +0000 (16:14 -0800)]
hcidump: Minor indentation cleanup and fix display of physical link key
Peter Krystad [Tue, 6 Mar 2012 00:14:51 +0000 (16:14 -0800)]
hcidump: Add parsing of A2MP signals
Peter Krystad [Tue, 6 Mar 2012 00:14:50 +0000 (16:14 -0800)]
hcidump: Add parsing of L2CAP Create/Move Channel signals
Luiz Augusto von Dentz [Fri, 17 Feb 2012 09:48:55 +0000 (11:48 +0200)]
hcidump: Add support for passing PSM as OBEX port
As OBEX can now use L2CAP as transport, -O/--obex option should accept
values other than RFCOMM channel, so values over 31 are now interpreted
as PSM.
Luiz Augusto von Dentz [Fri, 17 Feb 2012 09:48:54 +0000 (11:48 +0200)]
hcidump: add L2CAP OBEX support
Johan Hedberg [Wed, 1 Feb 2012 06:05:26 +0000 (08:05 +0200)]
hcidump: Fix UUID-128 parsing
ATT UUIDs are in little-endian format (in contrast to e.g. SDP).
Andrei Emeltchenko [Mon, 24 Oct 2011 09:22:34 +0000 (12:22 +0300)]
hcidump: Decode fixed channel list info rsp
Decode fixed channels in information response
< ACL data: handle 1 flags 0x00 dlen 10
L2CAP(s): Info req: type 3
> ACL data: handle 1 flags 0x02 dlen 20
L2CAP(s): Info rsp: type 3 result 0
Fixed channel list 0x0000000a
L2CAP Signalling Channel
AMP Manager Protocol
Martin Xu [Mon, 10 Oct 2011 09:21:57 +0000 (02:21 -0700)]
hcidump: Fix HCI event string lookup table
According to Core_v4.0 LE Meta Event Event Code is 0x3E, While Physical
Link Complete Event Code is 0x40 So add Unknown after LE Meta Event.
Andre Guedes [Tue, 4 Oct 2011 22:55:07 +0000 (19:55 -0300)]
hcidump: Fix EIR parsing in evt_le_advertising_report_dump
Only the first EIR data structure from the LE advertising report
event is dumped. This patch fix this, so all EIR data structure
present in that event is dumped.
Johan Hedberg [Thu, 6 Oct 2011 09:36:49 +0000 (12:36 +0300)]
hcidump: Fix crash with invalid L2CAP frame sizes
Reported by Jukka Taimisto <jukka.taimisto@codenomicon.com>
Johan Hedberg [Tue, 4 Oct 2011 10:14:56 +0000 (13:14 +0300)]
hcidump: fix format for 16-bit values
Andrei Emeltchenko [Tue, 27 Sep 2011 12:45:29 +0000 (15:45 +0300)]
hcidump: Parse extended control field in L2CAP
Adds support for parsing extended control field. Extended control field
may be used for ERTM and streaming mode (if EWS specified). ext_ctrl
flag resides in cid table. This also fixes P-bit decoding.
Andrei Emeltchenko [Tue, 27 Sep 2011 11:30:55 +0000 (14:30 +0300)]
hcidump: Remove magic numbers in L2CAP decoding
Andre Guedes [Tue, 30 Aug 2011 17:47:48 +0000 (14:47 -0300)]
hcidump: LE Connection Complete Event dump
Print Peer Address and Peer Address Type parameters from LE
Connection Complete Event.
Lucas De Marchi [Fri, 9 Sep 2011 17:40:36 +0000 (14:40 -0300)]
hcidump: Fix parser of AVRCP continuing messages
If packet_type is not START or SINGLE, we have to continue where we
stopped from previous packet. Therefore we must store where we left on
previous packet due to packet size limit. We store both the number of
attributes missing and the lenght of the last attribute that is missing.
An example interaction for this implementation, obtained with PTS test
TC_TG_MDI_BV_04_C (I reduced the MTU in order to reproduce it here and
values between brackets I added now):
> AVCTP: Command : pt 0x00 transaction 2 pid 0x110e
AV/C: Status: address 0x48 opcode 0x00
Subunit: Panel
Opcode: Vendor Dependent
Company ID: 0x001958
AVRCP: GetElementAttributes: pt Single len 0x0009
Identifier: 0x0 (PLAYING)
AttributeCount: 0x00
< AVCTP: Response : pt 0x00 transaction 2 pid 0x110e
AV/C: Stable: address 0x48 opcode 0x00
Subunit: Panel
Opcode: Vendor Dependent
Company ID: 0x001958
AVRCP: GetElementAttributes: pt Start len 0x0118
AttributeCount: 0x04
Attribute: 0x00000001 (Title)
CharsetID: 0x006a (UTF-8)
AttributeValueLength: 0x001b
AttributeValue: isso eh um titulo mei longo
Attribute: 0x00000003 (Album)
CharsetID: 0x006a (UTF-8)
AttributeValueLength: 0x00fe
AttributeValue: super-long-album-name super-long-album-name
super-long-album-name super-long-album-name super-long-album
super-long-album-name [... snip... ] super-long-album-name-1234
> AVCTP: Command : pt 0x00 transaction 2 pid 0x110e
AV/C: Control: address 0x48 opcode 0x00
Subunit: Panel
Opcode: Vendor Dependent
Company ID: 0x001958
AVRCP: RequestContinuingResponse: pt Single len 0x0001
< AVCTP: Response : pt 0x00 transaction 2 pid 0x110e
AV/C: Stable: address 0x48 opcode 0x00
Subunit: Panel
Opcode: Vendor Dependent
Company ID: 0x001958
AVRCP: GetElementAttributes: pt End len 0x002a
ContinuingAttributeValue:
678900000000000000
Attribute: 0x00000005 (Track Total)
CharsetID: 0x006a (UTF-8)
AttributeValueLength: 0x0002
AttributeValue: 30
Attribute: 0x00000006 (Genre)
CharsetID: 0x006a (UTF-8)
AttributeValueLength: 0x0006
AttributeValue: Gospel
Lucas De Marchi [Thu, 8 Sep 2011 23:32:50 +0000 (20:32 -0300)]
hcidump: fix name of metadata field
Metadata field number 0x7 should be the track duration and not the
progress of the track playback. Thus rename it to a better description.
Andrei Emeltchenko [Fri, 26 Aug 2011 12:05:36 +0000 (15:05 +0300)]
hcidump: Decode extended window size option
Marcel Holtmann [Wed, 31 Aug 2011 07:57:30 +0000 (00:57 -0700)]
hcidump: Change includes to use local copy of Bluetooth library
Johan Hedberg [Mon, 22 Aug 2011 08:02:34 +0000 (11:02 +0300)]
hcidump: Fix whitespace in l2cap.c
Peter Hurley [Sat, 13 Aug 2011 16:53:06 +0000 (12:53 -0400)]
hcidump: Fix L2CAP cid matching
If multiple ACL connections are using identical cid values, the L2CAP
parser will match the first avail cid found in the cid table. This
error often leads to incorrect psm determination, and thus incorrect
parsing of higher-layer frames.
When searching the cid table, a matching cid value must match by
ACL handle as well.
Syam Sidhardhan [Wed, 10 Aug 2011 18:45:49 +0000 (00:15 +0530)]
hcidump: Add support for parsing SRM headers
Lucas De Marchi [Mon, 8 Aug 2011 14:48:47 +0000 (11:48 -0300)]
hcidump: Fix response for GetCurrentPlayerApplicationSettingValue
According to AVRCP spec there's no player id in response.
Luiz Augusto von Dentz [Mon, 1 Aug 2011 08:42:18 +0000 (11:42 +0300)]
hcidump: Add parsing for AVRCP RegisterNotification PDU
Luiz Augusto von Dentz [Mon, 1 Aug 2011 08:42:17 +0000 (11:42 +0300)]
hcidump: Add parsing for AVRCP GetPlayStatus PDU
Luiz Augusto von Dentz [Mon, 1 Aug 2011 08:42:16 +0000 (11:42 +0300)]
hcidump: Add parsing for AVRCP GetElementAttributes PDU
Luiz Augusto von Dentz [Mon, 1 Aug 2011 08:42:15 +0000 (11:42 +0300)]
hcidump: Add parsing for AVRCP InformBatteryStatusOfCT PDU
Luiz Augusto von Dentz [Mon, 1 Aug 2011 08:42:14 +0000 (11:42 +0300)]
hcidump: Add parsing for AVRCP InformDisplayableCharacterSet PDU
Luiz Augusto von Dentz [Mon, 1 Aug 2011 08:42:13 +0000 (11:42 +0300)]
hcidump: Add parsing for AVRCP GetPlayerApplicationSettingValueText PDU
Luiz Augusto von Dentz [Mon, 1 Aug 2011 08:42:12 +0000 (11:42 +0300)]
hcidump: Add parsing for AVRCP GetPlayerApplicationSettingAttributeText PDU
Luiz Augusto von Dentz [Mon, 1 Aug 2011 08:42:11 +0000 (11:42 +0300)]
hcidump: Add parsing for AVRCP SetPlayerApplicationSettingValue PDU
Luiz Augusto von Dentz [Mon, 1 Aug 2011 08:42:10 +0000 (11:42 +0300)]
hcidump: Add parsing for AVRCP GetCurrentPlayerApplicationSettingValue PDU
Luiz Augusto von Dentz [Mon, 1 Aug 2011 08:42:09 +0000 (11:42 +0300)]
hcidump: Add parsing for AVRCP ListPlayerApplicationSettingValues PDU
Luiz Augusto von Dentz [Mon, 1 Aug 2011 08:42:08 +0000 (11:42 +0300)]
hcidump: Add parsing for AVRCP ListPlayerApplicationSettingAttributes PDU
Luiz Augusto von Dentz [Mon, 1 Aug 2011 15:43:52 +0000 (18:43 +0300)]
hcidump: Add parsing for command type rejected AVRCP responses
Luiz Augusto von Dentz [Mon, 1 Aug 2011 15:43:51 +0000 (18:43 +0300)]
hcidump: Don't parse response AVRCP PDU if ctype is NOT_IMPLETED
Andrei Emeltchenko [Wed, 27 Jul 2011 09:23:38 +0000 (12:23 +0300)]
hcidump: Decode extended flow spec option
Decode EFS option in L2CAP configuration packets
Andrei Emeltchenko [Wed, 6 Jul 2011 09:21:23 +0000 (12:21 +0300)]
hcidump: Add parsing of L2CAP Info response
Adds parsing L2CAP extended feature mask.
before:
hcidump -r /tmp/info-rsp.cap
HCI sniffer - Bluetooth packet analyzer ver 2.1
btsnoop version: 1 datalink type: 1002
> ACL data: handle 11 flags 0x02 dlen 16
L2CAP(s): Info rsp: type 2 result 0
Extended feature mask 0x00b8
after:
src/hcidump -r /tmp/info-rsp.cap
HCI sniffer - Bluetooth packet analyzer ver 2.1
btsnoop version: 1 datalink type: 1002
> ACL data: handle 11 flags 0x02 dlen 16
L2CAP(s): Info rsp: type 2 result 0
Extended feature mask 0x00b8
Enhanced Retransmission mode
Streaming mode
FCS Option
Fixed Channels
Luiz Augusto von Dentz [Tue, 12 Jul 2011 14:50:45 +0000 (17:50 +0300)]
hcidump: Add parsing for AVRCP GetCapabilities
Luiz Augusto von Dentz [Tue, 12 Jul 2011 08:07:53 +0000 (11:07 +0300)]
hcidump: Add check to verify AVRCP pdu length matches frame length
Luiz Augusto von Dentz [Tue, 28 Jun 2011 08:57:25 +0000 (11:57 +0300)]
hcidump: Add basic parsing support for AVRCP PDU
Luiz Augusto von Dentz [Mon, 27 Jun 2011 09:05:27 +0000 (12:05 +0300)]
hcidump: Add basic AVRCP parsing
This add support for AV/C Panel passthrough headers
Luiz Augusto von Dentz [Mon, 27 Jun 2011 09:05:26 +0000 (12:05 +0300)]
hcidump: Add basic AVCTP parsing
Luiz Augusto von Dentz [Mon, 13 Jun 2011 13:46:46 +0000 (16:46 +0300)]
hcidump: Add support for OBEX Action command
Add support for parsing OBEX Action command and related headers.
Johan Hedberg [Thu, 9 Jun 2011 07:09:29 +0000 (16:09 +0900)]
hcidump: Add missing error code descriptions from Core spec. 4.0
Johan Hedberg [Wed, 8 Jun 2011 08:47:39 +0000 (17:47 +0900)]
hcidump: Fix gcc 4.6 compiler warnings
Luiz Augusto von Dentz [Wed, 8 Jun 2011 08:33:24 +0000 (17:33 +0900)]
hcidump: Add basic parsing for SMP
Johan Hedberg [Tue, 7 Jun 2011 07:35:44 +0000 (10:35 +0300)]
hcidump: Fix infinite loop in read by group response parsing
Johan Hedberg [Tue, 7 Jun 2011 07:23:28 +0000 (10:23 +0300)]
hcidump: Add ATT parsing for the ATT fixed CID
Iain Hibbert [Thu, 14 Apr 2011 09:08:36 +0000 (10:08 +0100)]
hcidump: use correct size to copy 'direction' value
frm.in is stored as an uint8_t, so we cannot copy an int there
directly. use an intermediate variable so that it also works
on big-endian systems.
Andre Dieb Martins [Wed, 30 Mar 2011 14:01:34 +0000 (11:01 -0300)]
hcidump: Add parsing for ATT Execute Write command
BT's Core V4.0 document is buggy regarding Execute Write Response, so we'll
leave it out until a proper description is given.
Andre Dieb Martins [Wed, 30 Mar 2011 14:01:33 +0000 (11:01 -0300)]
hcidump: Add parsing for ATT Prepare Write
Andre Dieb Martins [Wed, 30 Mar 2011 14:01:32 +0000 (11:01 -0300)]
hcidump: Fix handle formatting for ATT Handle Notify
Andre Dieb Martins [Wed, 30 Mar 2011 14:01:31 +0000 (11:01 -0300)]
hcidump: Add parsing for ATT Signed Write
Andre Dieb Martins [Wed, 30 Mar 2011 14:01:30 +0000 (11:01 -0300)]
hcidump: Add parsing for ATT Write Command
Andre Dieb Martins [Wed, 30 Mar 2011 14:01:29 +0000 (11:01 -0300)]
hcidump: Add parsing for ATT Write Request
Note we do not need extra parsing for ATT Write Response as it only has
one field (opcode).
Johan Hedberg [Tue, 22 Mar 2011 10:40:18 +0000 (12:40 +0200)]
hcidump: Minor coding style fixes to ATT parser code
Andre Dieb Martins [Mon, 21 Mar 2011 12:18:34 +0000 (09:18 -0300)]
hcidump: Add parsing for Read Multiple
Andre Dieb Martins [Mon, 21 Mar 2011 12:18:33 +0000 (09:18 -0300)]
hcidump: Add parsing for ATT Read By Group
Additionally, fix Read By Type printf formatting for handles.
Andre Dieb Martins [Mon, 21 Mar 2011 12:18:32 +0000 (09:18 -0300)]
hcidump: Add parsing for ATT Read Blob
Andre Dieb Martins [Mon, 21 Mar 2011 12:18:31 +0000 (09:18 -0300)]
hcidump: Add parsing for ATT Find By Type
Anderson Lizardo [Fri, 18 Mar 2011 19:10:19 +0000 (15:10 -0400)]
hcidump: Fix compilation against latest BlueZ
BlueZ now has ntoh64()/hton64() functions in bluetooth.h, therefore the
hcidump local copy is not necessary.
Andre Dieb Martins [Mon, 28 Feb 2011 03:58:22 +0000 (00:58 -0300)]
hcidump: Fix HCI LE advertising report dump
LE advertising report event has only one data block for each report.
Thus, we can't reuse ext_inquiry_response_dump(), which loops over
successive data blocks until reaches a zero-length one.
This commit introduces ext_inquiry_data_dump(), which dumps a frame
containing data formatted according to [Vol 3] Part C, Section 8. This
function is reused by ext_inquiry_response_dump().
Also adds RSSI parsing to each advertising report.
Daniel Orstadius [Thu, 10 Feb 2011 10:34:01 +0000 (12:34 +0200)]
hcidump: Add check for ACL_START_NO_FLUSH
In addition to ACL_START, hcidump should check for the flag
ACL_START_NO_FLUSH to indicate the start of a frame.
Using '==' instead of '&' for the comparison since
ACL_START_NO_FLUSH is defined to zero.
The flag was introduced in BlueZ commit
2430512c983cad8c20252f1df8f297399993ca3d
Andre Dieb Martins [Wed, 9 Feb 2011 17:28:55 +0000 (14:28 -0300)]
hcidump: Add ATT read by type req/resp dump
Andre Dieb Martins [Wed, 9 Feb 2011 17:28:54 +0000 (14:28 -0300)]
hcidump: Add ATT dump for read req/resp
Andre Dieb Martins [Wed, 9 Feb 2011 17:28:53 +0000 (14:28 -0300)]
hcidump: Add ATT find info req/resp dump
Adds dumping for ATT's Find Info Request and Response. Also adds a simple
name resolving for GATT common uuids (listed on Assigned Numbers).
Andre Dieb Martins [Wed, 9 Feb 2011 17:28:52 +0000 (14:28 -0300)]
hcidump: Add ATT error pdu dump
Andre Dieb Martins [Wed, 9 Feb 2011 17:28:51 +0000 (14:28 -0300)]
hcidump: Add ATT MTU req/resp and notify value
Andre Dieb Martins [Wed, 9 Feb 2011 17:28:50 +0000 (14:28 -0300)]
hcidump: Partial dump of ATT PDUs
Starts implementing dumping for ATT/GATT pdus.
André Dieb Martins [Mon, 31 Jan 2011 19:09:32 +0000 (16:09 -0300)]
hcidump: Add missing const to utility functions
André Dieb Martins [Mon, 31 Jan 2011 19:09:31 +0000 (16:09 -0300)]
hcidump: Implement dump for event LE Read Remote Used Features Complete
André Dieb Martins [Mon, 24 Jan 2011 19:32:39 +0000 (16:32 -0300)]
hcidump: Implement dumping for evnet LE Connection Update Complete.
André Dieb Martins [Mon, 24 Jan 2011 19:32:38 +0000 (16:32 -0300)]
hcidump: Fix time intervals dumping of LE commands.
Add missing btohs() convertions and spec. constants for converting time
intervals for LE Set Scan Parameters and LE Set Advertising Parameters.
Marcel Holtmann [Thu, 27 Jan 2011 07:50:11 +0000 (08:50 +0100)]
hcidump: Update copyright information
Anderson Lizardo [Thu, 20 Jan 2011 21:02:48 +0000 (17:02 -0400)]
hcidump: Fix uninitialized struct sockaddr_hci memory passed to bind()
The bind() call in open_socket() was passing a struct sockaddr_hci to
bind() with two uninitialized bytes. This caused "Invalid argument" errors
on kernels which do strict checks of struct sockaddr_hci fields.
André Dieb Martins [Thu, 20 Jan 2011 19:18:13 +0000 (16:18 -0300)]
hcidump: Implement partial support for LE events and commands
Marcel Holtmann [Tue, 5 Oct 2010 07:30:29 +0000 (09:30 +0200)]
hcidump: Fix breakage with LE advertising reports decoding
Marcel Holtmann [Mon, 4 Oct 2010 09:50:21 +0000 (11:50 +0200)]
hcidump: Add support for decoding LE advertising reports
Ville Tervo [Wed, 29 Sep 2010 13:56:21 +0000 (16:56 +0300)]
hcidump: Fix missing comma in cmd_le_str
Ville Tervo [Wed, 29 Sep 2010 13:56:20 +0000 (16:56 +0300)]
hcidump: Add master/slave parsing for le_conn_complete event
Inga Stotland [Wed, 18 Aug 2010 23:38:54 +0000 (16:38 -0700)]
hcidump: Parsing of AMP specific HCI events
Inga Stotland [Wed, 18 Aug 2010 23:38:53 +0000 (16:38 -0700)]
hcidump: Parse Command Complete events corresponding to AMP related HCI commands
Inga Stotland [Wed, 18 Aug 2010 23:38:52 +0000 (16:38 -0700)]
hcidump: Add parsing of AMP related HCI commands
Ville Tervo [Fri, 16 Jul 2010 09:31:07 +0000 (12:31 +0300)]
hcidump: Add LE connection creation dumping
Marcel Holtmann [Mon, 12 Jul 2010 22:52:04 +0000 (19:52 -0300)]
hcidump: Fix unneeded single character option parsing
Marcel Holtmann [Mon, 12 Jul 2010 22:50:49 +0000 (19:50 -0300)]
hcidump: Add command for displaying hcidump version
Marcel Holtmann [Mon, 12 Jul 2010 22:39:52 +0000 (19:39 -0300)]
hcidump: Forgot to remove the --verbose option parsing
Marcel Holtmann [Mon, 12 Jul 2010 22:31:26 +0000 (19:31 -0300)]
hcidump: Remove --verbose also from usage description
Marcel Holtmann [Mon, 12 Jul 2010 22:28:21 +0000 (19:28 -0300)]
hcidump: Just default to verbose parsing and remove the option
Marcel Holtmann [Mon, 12 Jul 2010 22:20:22 +0000 (19:20 -0300)]
hcidump: Remove --noappend and --btsnoop options from manual page