This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How can I update advertising data without restarting advertising process ?

Currently, if I want to update the advertising data, firstly, I use sd_ble_gap_adv_stop, then update the advertising data with ble_advdata_service_data_t, then advertising_init, at the end, ble_advertising_start.

Is it possible update the advertising data without restarting advertising ?

I found sd_ble_gap_adv_data_set, but ble_advdata_service_data_t is defined as:

/**@brief Service data structure. */
typedef struct
{
    uint16_t                     service_uuid;                        /**< Service UUID. */
    uint8_array_t                data;                                /**< Additional service data. */
} ble_advdata_service_data_t;

And sd_ble_gap_adv_data_set

uint32_t sd_ble_gap_adv_data_set	(	uint8_t const * 	p_data,
                                    uint8_t 	dlen,
                                    uint8_t const * 	p_sr_data,
                                    uint8_t 	srdlen 
                                    )

They are a little different, I don't know how to use.

Any suggestion guys !?

Thanks.

Related