Tool/software: Code Composer Studio
Hi
I am implementing a SED and would like to have communication period around every 15 min. In order to achieve best power saving I would like to increase polling period of the SED. I use SDK 3.40.
I do the following:
otLinkModeConfig aConfig;
aConfig.mRxOnWhenIdle = false;
aConfig.mDeviceType = false;
aConfig.mNetworkData = true;
aConfig.mSecureDataRequests = true;
OtRtosApi_lock();
otThreadSetLinkMode(OtInstance_get(), aConfig);
otThreadSetChildTimeout(OtInstance_get(), 5*60); // 5 min
OtRtosApi_unlock();
//initiate connection to mqttsn gateway
OtRtosApi_lock();
otLinkSetPollPeriod(OtInstance_get(), 500);
OtRtosApi_unlock();
// when connection is established change polling timeout
OtRtosApi_lock();
otLinkSetPollPeriod(OtInstance_get(), 10000); // << this timeout always works
//otLinkSetPollPeriod(OtInstance_get(), 20000); // << this timeout never works
//otLinkSetPollPeriod(OtInstance_get(), 30000); // << this timeout never works
//otLinkSetPollPeriod(OtInstance_get(), 60000); // << this timeout never works
OtRtosApi_unlock();
while(true)
{
//do publishing data
...
OtRtosApi_lock();
otLinkSendDataRequest(OtInstance_get());
OtRtosApi_unlock();
// sleep here for xxx seconds
}
When I use poll timeout 10 sec then everything works as expected. When I use e.g. 20 or 30 or more seconds - strange things are happening. Seems like device goes into some loop, power consumption is sky high and nothing happens on radio side.
See attached wireshark log.