In keyfob code, the gapRole_AdvertOffTime is set to 0 in KeyFobApp_Init();
GAPRole_SetParameter( GAPROLE_ADVERT_OFF_TIME, sizeof( uint16 ), &gapRole_AdvertOffTime );
While Keyfob is set in limited discoverable mode
#define DEFAULT_DISCOVERABLE_MODE GAP_ADTYPE_FLAGS_LIMITED
which will stop advertising after 180s by the following parameter
#define TGAP_LIM_ADV_TIMEOUT 1 //!< Maximum time to remain advertising, when in Limited Discoverable mode. In seconds (default 180 seconds)
you can change by :
GAP_SetParamValue( TGAP_LIM_ADV_TIMEOUT, xxxxx );
In KeyFobApp_Init(); you will find code for setting the advertising interval
// Set advertising interval
{
uint16 advInt = DEFAULT_ADVERTISING_INTERVAL;
GAP_SetParamValue( TGAP_LIM_DISC_ADV_INT_MIN, advInt );
GAP_SetParamValue( TGAP_LIM_DISC_ADV_INT_MAX, advInt );
GAP_SetParamValue( TGAP_GEN_DISC_ADV_INT_MIN, advInt );
GAP_SetParamValue( TGAP_GEN_DISC_ADV_INT_MAX, advInt );
}
http://www.deyisupport.com/question_answer/wireless_connectivity/f/45/t/31153.aspx