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

[bluetooth-dev] Sv: need a little more help on sending acl pkts



Hi Sami,
 
Now that I have finished my assigment, I am ready to do some BT stuff again.
 
I have found an error in the way I encode/decode the ACL data packet header. You could check up on that. The correct (I have cross checket it with Axis' code) way to encode the header (in the buffer) should be like this:
 
XXXXXXXX | XX XX XXXX | XXXXXXXX XXXXXXXX
--------   -- -- ----   -----------------
    |       |  |   |            |
    |       |  |   |            -------- Data Total Length
    |       |  |   |-------------------- Bit 8-11 of Connection Handle
    |       |  ------------------------- Packet Boundary
    |       ---------------------------- Broadcast Flag
    ------------------------------------ Bit 0-7 of Connection Handle
 
 
This means that the following packet:
 
Connection Handle: 0xABC
Packet Boundary: 0x2 (First datapacket)
Broadcast Flag: 0x0 (point-to-point)
Data Total Length: 0x0056
 
Should be encoded as:
BC 2A 56 00
 
Do you agree on that?
 
Regards
/Michael