oid ble_service_update_advertising_data() {
ret_code_t ret_code;
ble_gap_adv_data_t new_data;
memcpy(&new_data,&(m_advertising.adv_data), sizeof(new_data));
uint8_t data[29] = "";
format_advertising_data(data);
new_data.adv_data.p_data = data;
new_data.adv_data.len = strlen(data);
ret_code = ble_advertising_advdata_update(&m_advertising, &new_data, true);
APP_ERROR_CHECK(ret_code);
}
<error> app: ERROR 8 [NRF_ERROR_INVALID_STATE] at the same line as
ret_code = ble_advertising_advdata_update(&m_advertising, &new_data, true);
APP_ERROR_CHECK(ret_code);
My code is based on
I am trying to add sensor data into the advertising field packet