So I am reading this guide: https://novelbits.io/deep-dive-ble-packets-events/ .
There the structure is explained as follows:
But I do not understand, why 0x46 means the PDU Type is 0110. So here you are reading it from right to left, but why is the length 0x1C then not read the same way? The length is just normally converted into the decimal value.
I am asking, since I am trying to decode some LL Data myself. Namely this here: 0f 09 09 fd fd 81 07 00 00 00 00 If I do it as described above, 0x0f -> 0b00001111 and then the last four bits 1111 would describe the PDU Type, but such a type does not exist. However, the payload length is described correctly by 0x09.
What am I missing? I am really lost right now and do not know how to understand this LL Data I have there.
Thanks in Advance!
I am trying to understand LL Data, namely the Header of a PDU.
If you want to decode Link Layer PDUs, you should read the specification.
From what I understood your Question aka. "0f 09 09 fd fd 81 07 00 00 00 00" example data, you are looking for a LL Control PDU, which is a Data Physical Channel PDU.
I your example the PDU has the Header: 0f 09
LLID: 11 (LL Control PDU)
NESN: 1
SN: 1
MD: 0
CP: 0
RFU: 00
Length: 1001 0000 (9 octett)
which is a LL_FEATURE_RSP (09) with a feature set of { fd fd 81 07 00 00 00 00 }