Re: [PATCH hcidump 2/2 v2] Add parsing for AVRCP GetCapabilities

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

 



Hi, Luiz

On Wed, Jul 13, 2011 at 4:37 PM, Luiz Augusto von Dentz
<luiz.dentz@xxxxxxxxx> wrote:
>>> +                       printf("%s: 0x", cap2str(cap));
>>> +                       for (i = 0; i < 3; i++)
>>> +                               printf("%02x", get_u8(frm));
>>
>> Humn... I think this is not what you want. Since this information is
>> always in big endian order, you may need to convert it to host
>> architecture in order to see meaningful numbers. E.g.: if you do like
>> you're doing, when receiving a packet with COMPANY_ID == IEEE_BTSIG,
>> the information printed will be 0x581900 instead of the expected
>> 0x001958.
>
> It works just fine, we are printing byte by byte as it comes e.g. sony mw600:
>
>> AVCTP: Command : pt 0x00 transaction 5 pid 0x110e
>    AV/C: Status: address 0x48 opcode 0x00
>      Subunit: Panel
>      Opcode: Vendor Dependent
>      Company ID: 0x001958
>      AVRCP: GetCapabilities: pt 0x00 len 0x0001
>        CapabilityID: 0x02 (CompanyID)

Right... After all it comes as big endian, so you indeed shouldn't
have any issue.

Sorry, for the noise. It looks good now.



Lucas De Marchi
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux