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.
Does it make any sense if I want to output some value via advertising package to use manufacturer specific data? if so, then
typedef union {
uint8_t adv_manuf_data_data[1];
int16_t val;
} actual_data_u;
/*****/
static void advertising_init(uint8_t adv_flags, int16_t val)
{
actual_data_u my_data;
/****/
actual_data.val = val;
adv_manuf_data_array.p_data = my_data.adv_manuf_data_data;
adv_manuf_data_array.size = sizeof(adv_manuf_data_data);
/****/
}
When I need to change then I'll call this function again.
Thank you.
Does it make sense to output data in such way?
Does it make sense to output data in such way?