hi, all
将CC2640R2F 处于scanner模式,TGAP_GEN_DISC_SCAN_WIND 和 TGAP_GEN_DISC_SCAN_INT 均配置为16。也就是说scan window和scan interval配置为相同值,希望得到一个始终处于接收状态的scanner模式,提高收包效率。
但是实际测试下来,该配置并没有使CC2640R2F一直处于接收状态。频谱测试结果如下图:
delta2 为开窗时间,delta4为休息时间,与预期配置不太一样。如果我们想一直处于rx状态,该如何处理呢?尝试了调整参数值,跟预期有较大差异,请帮忙解答,感谢!
Kevin Qiu1:
用GapScan_enable(0,0,0)试试
* Start scanning.** If duration is zero period shall be ignored and the scanner will continue* scanning until @ref GapScan_disable is called.* If period is zero and duration is non-zero, the scanner will scan once* until duration has expired or @ref GapScan_disable is called.* If both the duration and period are non-zero, the scanner will continue* scanning periodically until @ref GapScan_disable() is called.** @param period - Scan period. Ignored if duration is zero. 1.28 sec unit.*Range: 0x00-0xffff, where 0x00 is continuously scanning.* @param duration - Scan duration. 10 ms unit. The time of duration shall be*greater than the time of scan interval set by @ref GapScan_setPhyParams.*Range: 0x00-0xffff, where 0x00 is continuously scanning.* @param maxNumReport - If non-zero, the list of advertising reports (the number*of which is up to maxNumReport) will be generated and come with*@ref GAP_EVT_SCAN_DISABLED.** @return @ref SUCCESS* @return @ref bleNotReady* @return @ref bleInvalidRange* @return @ref bleMemAllocError* @return @ref bleAlreadyInRequestedMode* @return @ref bleIncorrectMode*/ status_t GapScan_enable(uint16_t period, uint16_t duration,uint8_t maxNumReport);
user6073138:
回复 Kevin Qiu1:
GapScan_enable 这个API是哪里的呢?linking的时候找不到这个符号,
我使用的sdk是2.30版本谢谢!
Kevin Qiu1:
回复 user6073138:
在gap_scanner.h下,没有的话升级到最新版的SDK
user6073138:
回复 Kevin Qiu1:
我们在2.30 SDK上进行了大量开发,升级的话目前看来并不太容易,有较大风险。
目前版本上有办法解决这个问题么?或者有类似功能的接口供使用?感谢!