hello:
In nrf5,the content of this struct variable can be easily modified to change the advertising data even during advertising,just like this:
ble_gap_adv_data_t m_adv_data =
{
.adv_data =
{
.p_data = ADV_DATA,
.len = ADV_DATA_LENGTH
},
.scan_rsp_data =
{
.p_data = NULL,
.len = 0
}
};
void update_exp_info(uint16_t exp_count, uint16_t exp_spend_time_ms){
m_adv_data.adv_data.p_data[EXP_COUNT_OFFSET] = exp_count % 256;
m_adv_data.adv_data.p_data[EXP_COUNT_OFFSET + 1] = exp_count / 256;
m_adv_data.adv_data.p_data[EXP_TIME_MS_OFFSET] = exp_spend_time_ms % 256;
m_adv_data.adv_data.p_data[EXP_TIME_MS_OFFSET + 1] = exp_spend_time_ms / 256;
}
Is there a similar method in NCS? Or how can the broadcast data be easily modified (during the broadcasting process) in NCS?
Looking forward to your help.