#define DEFAULT_DISCOVERABLE_MODE GAP_ADTYPE_FLAGS_LIMITED
uint16 gapRole_AdvertOffTime = 15000;
GAPRole_SetParameter(GAPROLE_ADVERT_OFF_TIME, sizeof(uint16), &gapRole_AdvertOffTime);
GAP_SetParamValue(TGAP_LIM_ADV_TIMEOUT, 20);
我这么设置结果是广播20秒之后就彻底停止广播了,我想要的结果是广播20秒停止,再过15秒开启广播如此循环
请问我哪里设置错了吗
user4952053:
回复 Viki Shi:
uint16 gapRole_AdvertOffTime = 15000;
GAPRole_SetParameter( GAPROLE_ADVERT_OFF_TIME, sizeof( uint16 ), &gapRole_AdvertOffTime );
uint16 ADV_TIMEOUT = 20;
GAP_SetParamValue( TGAP_LIM_ADV_TIMEOUT, ADV_TIMEOUT );这么设置之后,CC2541在停止广播的这15秒超时时间内是不是就自动进入PM2模式了?