如何让CC2541 一直广播下去,不进入休眠状态,请大神指教
不想让CC2541进入睡眠和休眠,想让其一直广播下去,
关闭了POWER_SAVING宏开关后
#define DEFAULT_DISCOVERABLE_MODE GAP_ADTYPE_FLAGS_GENERAL //非限制广播
static uint8 advertData[] =
{
// Flags; this sets the device to use limited discoverable
// mode (advertises for 30 seconds at a time) instead of general
// discoverable mode (advertises indefinitely)
0x02, // length of this data
GAP_ADTYPE_FLAGS, //无限广播
DEFAULT_DISCOVERABLE_MODE | GAP_ADTYPE_FLAGS_BREDR_NOT_SUPPORTED,
// service UUID, to notify central devices what services are included
// in this peripheral
0x03, // length of this data
GAP_ADTYPE_16BIT_MORE, // some of the UUID's, but not all
LO_UINT16( SIMPLEPROFILE_SERV_UUID ),
HI_UINT16( SIMPLEPROFILE_SERV_UUID ),
};
并且里面有一个1S计时的任务,但是几个小时之后,仍然会搜索不到广播信息,请大神指教一下,怎样使CC2541无限广播,这个不计功耗
这个问题终于找到原因了
能分享一下吗?
刚才一直在测试,其实这个设置没有问题,是我设置在CC2540上,用在CC2541上面的工程文档,忘记改过来了。上面设置是可以的