Quantcast
Channel: Wireless Connectivity
Viewing all articles
Browse latest Browse all 116964

Forum Post: Update the Advertising Interval while Advertising

$
0
0

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


Viewing all articles
Browse latest Browse all 116964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>