I'm trying to use new SD140-6 function sd_ble_gap_adv_set_configure() , according to spec. if last PARAM is NULL, function behavior : "When this function is used to update advertising data while advertising, this parameter must be NULL. See @ref ble_gap_adv_params_t."
to UPDATE advertising data in realtime:
// UPDATE the data during advertising!
ret = sd_ble_gap_adv_set_configure(&m_adv_handle[server_0], &advdata_raw , NULL /*&advparam*/);
But ERROR (8) returns. WHY ?
Error code 8 is NRF_ERROR_INVALID_STATE. Looking at the documentation for sd_ble_gap_adv_set_configure, we have the following statement: "It is invalid to provide the same data buffers while advertising. To update advertising data, provide new advertising buffers."
So you need to provide new advertising buffers if you want to update advertising data while advertising.
what does it means new buffer , new Address p_data ?
Yes, that is correct.
I am providing different data during the advertising, but still getting Error Code 8.
You need to provide a completely new buffer, it is not enough to just change the data in the buffer. If you still have problems with this, please create a new question.