Hello, i'm making small android application for my own test purposes. I want to understand full structure of advertisement packet which i receive with my phone. I can't find any documentation on that so could you help me out, to understand what every byte is? For example, when i scanned with my phone, i received a packet of 31 bytes:
// Advertisement packet 0x0B, 0x09, 0x4C, 0x45, 0x44, 0x5F, 0x42, 0x6C, 0x69, 0x6E, 0x6B, 0x79, 0x03, 0x19, 0x00, 0x00, 0x02, 0x01, 0x06, 0x0B, 0xFF, 0xDE, 0xEF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF
0x0B - what is this byte?
0x09 - this is configured with (advdata.name_type)
0x4C, 0x45, 0x44, 0x5F, 0x42, 0x6C, 0x69, 0x6E, 0x6B, 0x79 - This is my devace name.
0x03, 0x19, 0x00, 0x00 - These four bytes are in the advertisement packet or not, it depends on (advdata.include_appearance). If it is set to false, then these four bytes are dropped out of the packet, but what these four bytes actually are?
Next two bytes - 0x02, 0x01. I don't know what these are.
Next byte is 0x06. I believe this byte is advdata.flags value.
Next two bytes are 0x0B and 0xFF - i don't understand also from where did these come here.
Next two bytes are 0xDE and 0xEF. I have now idea how they got here, but they are from my created service. I did that using nAN-36 for creating custom service. So my service UUID is: 0x0000xxxx-1212-EFDE-1523-785FEABCD123 . I changed these two bytes of my service and it is indeed from here, but where is the peace of code which puts these bytes here, and why they are here? i think it would make a lot more of sence if i would see xxxx bytes from my service here.
Last bytes of 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF are my created advertisement data which is put into ble_advdata_manuf_data_t structure and everything are clear for me with these bytes.
So if anyone could explain what are those bytes which i don't understand, or point me to any source which would explain packet structure (because i wasn't able to find one), i would be very grateful. Regards.