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

Periodically switching into config mode on nRF51822 Beacon Kit

Hi,

I have implemented some code to periodically switching back and forth between the normal and the config mode. I can see that the handler function is being called, but the beacon does not switch into the config mode. The following is what I implemented:

beacon_mode_t beacon_mode = beacon_mode_normal;

static void config_mode_timeout_handler(void * p_context) {

	if(beacon_mode == beacon_mode_normal)
	{
		beacon_mode = beacon_mode_config;
	}
	else
	{
		beacon_mode = beacon_mode_normal;
	}
	
	advertising_init(beacon_mode);

}

Apparently calling advertising_init with beacon_config_mode is not enough to do this, but I don't know what other functions I should be calling for this. Thanks a lot in advance!

Related