After clicking on Raw Data in Nrf connect App I am getting this 0x0201041AFF590000150112233445566778899AABBCCDDEEFF0FFFFFFFFC3. what are 0201041AFF these bytes ? can I remove it?
After clicking on Raw Data in Nrf connect App I am getting this 0x0201041AFF590000150112233445566778899AABBCCDDEEFF0FFFFFFFFC3. what are 0201041AFF these bytes ? can I remove it?
Hello,
The advertising packet and scan response data are built using LTV (Length-Type-Value) format (similar to TLV, but Length comes first).
You may read more in Core Bluetooth specification 5.2, Vol 3, Part C, Chapter 11, Supplement to the Bluetooth Core Specification (the same link), chapter 1. The IDs of available types are listed here: https://www.bluetooth.com/specifications/assigned-numbers/generic-access-profile/
Each entry starts with Length, in bytes, of the following type + data. Length of type is always 1 (can be extended in the future).
The raw data you scanned: 0x0201041AFF590000150112233445566778899AABBCCDDEEFF0FFFFFFFFC3 are split into entries the following way (nRF Connect for Android also displays this in the table below the raw data):
Len Type. Value
0x02 0x01 (Flags) 0x04 - BR/EDR Not Supported
0x1A. 0xFF (Manufacturer Data) 0x59000000150112233445566778899AABBCCDDEEFF0FFFFFFFFC3
The Supplement to Bluetooth Core Specification 4.1+ defines the first 2 bytes of Manufacturer data as Company ID.
The Manufacturer Data are encoded using application format, in this case nRF Beacon format, or something similar.
0x5900 - Nordic Semiconductor ASA Company ID (https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers/), in Little Endian
0x00 - beacon type - this should be 0x02, actually
0x15 - length of the rest of payload
0x0112233445566778899AABBCCDDEEFF0 - the UUID: 01122334-4556-6778-899A-ABBCCDDEEFF0
0xFFFF - major number
0xFFFF - minor number
0xC3 - the calculated RSSI signal at 1m, in dBm = -61 dBm
can I remove 0201041AFF or not ?
can you please respond ? its urgent.
where are these values 0x1AFF set in the code of BLE APP UART ?
When you set the manufacturer data, the 0x1A is there length of the data and 0xFF is the Manufacturer Data Type. So it's set automatically when settin asking manufacturer data to the adv packet.
Automatically means? somewhere it mus be calculating.
BLE APP UART does not set Manufacturer Data in `gap_params_init`. but e.g. ble_app_beacon sample does set advdata.p_manuf_specific_data, which is then passed to ble_advdata_encode. This encode method encodes the advertising data to use AD types.
BLE APP UART does not set Manufacturer Data in `gap_params_init`. but e.g. ble_app_beacon sample does set advdata.p_manuf_specific_data, which is then passed to ble_advdata_encode. This encode method encodes the advertising data to use AD types.