This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hi,
We are testing CC1352P and TI-15.4 Non-beacon mode based network and found some weird behavior after a collector node is reset. Most of the time and most of sensor node radios can automatically re-join network after collector node is reset, either caused by power cycle or trigger by external RST pin signal, or a timer triggered system reset through:
SysCtrlSystemReset();
Occasionally some sensor node in the network can re-join network, but cannot receive any application layer data packet other than tracking packets, sometimes a sensor can re-join network, even receive application layer data a collector node sends to it, but the data packet sensor node sends to collector will not be received by collector node. When this happens, the status code returned by:
/*! * @brief MAC Data Confirm callback. * * @param pDataCnf - pointer to the data confirm information */ static void dataCnfCB(ApiMac_mcpsDataCnf_t *pDataCnf)
remains 0x00/success
If this happens, if we manually restart the affected sensor nodes, everything will go back to as expected. But because the returned status code remains 0x00, sensor node itself has no idea those data packets are not actually received by collector. This makes it impossible to manage with code.
My question is, how could this happen? My suspicion is collector node receives those packets but fail to decrypt.
Please advise,
ZL
Hi ZL,
Can you please provide a sniffer log which demonstrates the erroneous behavior? Also, it would be helpful to have the SimpleLink F2 CC13XX / CC26XX SDK version and information as to your network size and any changes which have been made to the default sensor/collector examples.
Regards,
Ryan
Hi Ryan,
Thanks for your reply.
The SDK version is v7.41.00.17, with non-beacon mode, and custom-phy. But we had similar problems with CC1310 + CC1190 radio in frequency hopping mode and SDK v4.20. I don't have sniffer log yet, will post back once I have them.
I also added some debug output in collector node code:
/*! * @brief MAC Data Indication callback. * * @param pDataInd - pointer to the data indication information */ static void dataIndCB(ApiMac_mcpsDataInd_t *pDataInd) { if((pDataInd != NULL) && (pDataInd->msdu.p != NULL) && (pDataInd->msdu.len > 0)) { Smsgs_cmdIds_t cmdId = (Smsgs_cmdIds_t)*(pDataInd->msdu.p); char debugInfo[128]; #ifdef FEATURE_MAC_SECURITY { if(Cllc_securityCheck(&(pDataInd->sec)) == false) { memset(debugInfo, 0x00, sizeof(debugInfo)); sprintf(debugInfo, "SC failed, srcAddr =%04X", pDataInd->srcAddr.addr.shortAddr); atUartOutputDebugInfo(debugInfo, strlen(debugInfo)); /* Reject the message */ return; } } #endif /* FEATURE_MAC_SECURITY */ if(pDataInd->srcAddr.addrMode == ApiMac_addrType_extended) { uint16_t shortAddr = Csf_getDeviceShort( &pDataInd->srcAddr.addr.extAddr); if(shortAddr != CSF_INVALID_SHORT_ADDR) { /* Switch to the short address for internal tracking */ pDataInd->srcAddr.addrMode = ApiMac_addrType_short; pDataInd->srcAddr.addr.shortAddr = shortAddr; } else { /* Can't accept the message - ignore it */ memset(debugInfo, 0x00, sizeof(debugInfo)); sprintf(debugInfo, "Addr ET failed, srcAddr =%04X", pDataInd->srcAddr.addr.shortAddr); atUartOutputDebugInfo(debugInfo, strlen(debugInfo)); return; } } switch(cmdId) { case Smsgs_cmdIds_configRsp: processConfigResponse(pDataInd); break; case Smsgs_cmdIds_trackingRsp: processTrackingResponse(pDataInd); break; case Smsgs_cmdIds_IdentifyLedReq: processIdentifyLedRequest(pDataInd); break; case Smsgs_cmdIds_toggleLedRsp: processToggleLedResponse(pDataInd); break; case Smsgs_cmdIds_sensorData: processSensorData(pDataInd); break; case Smsgs_cmdIds_rampdata: Collector_statistics.sensorMessagesReceived++; break; #ifdef FEATURE_SECURE_COMMISSIONING case Smgs_cmdIds_CommissionMsg: /* Process Security manager commissioning data */ SM_processCommData(pDataInd); break; #endif /* FEATURE_SECURE_COMMISSIONING */ #if defined(DEVICE_TYPE_MSG) case Smsgs_cmdIds_DeviceTypeRsp: processDeviceTypeResponse(pDataInd); break; #endif /* DEVICE_TYPE_MSG */ // Customized Smsgs_cmdIds case Smsgs_cmdIds_PassThroughMessageReq: case Smsgs_cmdIds_PassThroughDataReq: // This sends data out to external MCU via UART processDataPassThrough(pDataInd); break; default: /* Should not receive other messages */ /* Can't accept the message - ignore it */ memset(debugInfo, 0x00, sizeof(debugInfo)); sprintf(debugInfo, "Unknown cmdIds = %02X, srcAddr =%04X", cmdId, pDataInd->srcAddr.addr.shortAddr); atUartOutputDebugInfo(debugInfo, strlen(debugInfo)); break; } } }
When a sensor joins network, sometimes even receives data from collector, but the data sent by this sensor node fails to show up on the MCU external to collector radio, I don't observe any of those debug output, indicating dataIndCB is not being called at all.
Meanwhile, all the status code returned by the following function remains 0x00.
/*! * @brief MAC Data Confirm callback. * * @param pDataCnf - pointer to the data confirm information */ static void dataCnfCB(ApiMac_mcpsDataCnf_t *pDataCnf)
Taken together, my suspicion is that all the data packets sent by sensor node are somehow lost between MAC and application layer on collector node.
I recall stumbling upon some post here stating that there is an edge case that if collector resets, sensor nodes may appear to be able to rejoin a network but cannot actually send data, but I couldn't locate that post.
Regardes,
ZL
The other information that might be relevant is: MAX_DEVICE is set to 150, NVS size is left as default.