各位大牛,请教大家一个问题,我想尽可能延长蓝牙广播包的心跳,用的定时器是osal_start_timerEx,但是发现在30s之内是非常准的,我设置60s就抓不到广播包了(用抓包工具),请问我问题出在哪里?
Yue TANG:
蓝牙广播?为什么要用osal_start_timerEx?
// What is the advertising interval when device is discoverable (units of 625us, 160=100ms)#define DEFAULT_ADVERTISING_INTERVAL 160
// 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 ); }
da qin zheng sheng:
可以参考broadcast和beacon,一直在广播的。