The BTLE specification does allow user/custom data to be added to the advertising packets. Which field in the advertising data structure is the right place for adding such data? I'd like to avoid hacks, so prefer to do it only where appropriate.
The BTLE specification does allow user/custom data to be added to the advertising packets. Which field in the advertising data structure is the right place for adding such data? I'd like to avoid hacks, so prefer to do it only where appropriate.
Please note that Pål is a stack developer, and doesn't know the SDK very well. :-) He therefore focuses on how the softdevice API is made.
If you use the SDK, you're most likely better off looking at Torbjørn's answer below, as the SDK wraps up the setting of advertisement data quite nicely. By using it, you can set the data up in C structs instead of pure data arrays. Take a look at the ble_advdata_t type, and especially its p_service_data_array and p_manuf_specific_data fields.
Hi Torbjørn,
Thanks for the hint.
I used the "NRF_FICR->DEVICEADDR[0]" and "NRF_FICR->DEVICEADDR[1]" lines of code in order to retrieve the Device address and then I send it as part of the manufacturerSpecificData together with the company ID. (in the advdata_update routine of the ble_app_temp project)
Thank you,
Cordially,
Maximilian Müller
I am glad I could be of assistance ;)
hi Torbjørn,
unfortunately the attachment isn't available any more. Could you please upload it again? Thanks in advance! :)
thx :) it works now!