Hi everyone,
I want to update (change) the advertising interval from one value to another while the CC2541 is advertising.
The way I'm currently doing it is
//Set the advertising interval to the new value
GAP_SetParamValue( TGAP_GEN_DISC_ADV_INT_MIN, advInterval);
GAP_SetParamValue( TGAP_GEN_DISC_ADV_INT_MAX, advInterval);
GAP_SetParamValue( TGAP_CONN_ADV_INT_MIN, advInterval);
GAP_SetParamValue( TGAP_CONN_ADV_INT_MAX, advInterval);
GAP_SetParamValue( TGAP_LIM_DISC_ADV_INT_MIN, advInterval);
GAP_SetParamValue( TGAP_LIM_DISC_ADV_INT_MAX, advInterval);
// Restart advertising to accept the new values
uint8 status;
status = FALSE; GAPRole_SetParameter( GAPROLE_ADVERT_ENABLED, sizeof( uint8 ), &status );
status = TRUE; GAPRole_SetParameter( GAPROLE_ADVERT_ENABLED, sizeof( uint8 ), &status );
The last part, stopping and restarting the advertising, causes the CC to update the advertising interval. But it takes a long time so a delay of ~ 5 seconds occurs. Is there any way to do this faster? Any help is much appreciated.
Best Regards,
Philipp