Hi.
I currently ran into an weird error. I wasn't able to send a Zstackapi_ZdoIeeeAddrReq.
The base of my project is the zc_ota_server example.
The problem occurs in the file "zstacktask.c" in the function "ZStackTaskProcessEvent":
//Line 730 switch ( pMsg->hdr.event ) { #ifdef NPI case MT_NPI_GENERIC_MSG: processNpiIncomingMsgInd( (uint8_t*)pMsg ); break; case MT_SYS_APP_MSG: case MT_SYS_APP_RSP_MSG: processSysAppMsgInd( (mtSysAppMsg_t*)pMsg ); break; #if defined OTA_SERVER case MT_SYS_OTA_MSG: processSysOtaMsgInd( (OTA_MtMsg_t*)pMsg ); break; #endif // OTA_SERVER #endif // NPI #ifndef ZNP_NPI // ZNP does not handle any of these cases in ZStackTask //Line 798 default: { // Assume it's a message from another thread send = appMsg( (uint8_t*) pMsg ); } break; #else // ZNP_NPI default: // discard unhandled messages break; #endif // ZNP_NPI
And in function "appMsg":
//Line 1056 static bool appMsg( uint8_t* pMsg ) { bool resend = TRUE; // default to resend to app task // Temp convert to get the event zstackmsg_sysResetReq_t *pReq = (zstackmsg_sysResetReq_t *)pMsg; uint8_t srcServiceTaskId = pReq->hdr.srcServiceTask; switch ( pReq->hdr.event ) { case zstackmsg_CmdIDs_DEV_REJOIN_REQ: case zstackmsg_CmdIDs_AF_INTERPAN_CTL_REQ: //Overlap with MT_SYS_APP_MSG // Not supported yet pReq->hdr.status = zstack_ZStatusValues_ZUnsupportedMode; break; //Line 1225 case zstackmsg_CmdIDs_AF_CONFIG_GET_REQ: //Overlap with MT_SYS_APP_RSP_MSG resend = processAfConfigGetReq( srcServiceTaskId, pMsg ); break; //Line 1243 #if defined (ZDO_IEEEADDR_REQUEST) case zstackmsg_CmdIDs_ZDO_IEEE_ADDR_REQ: //Overlap with MT_NPI_GENERIC_MSG resend = processZdoIeeeAddrReq( srcServiceTaskId, pMsg ); break; #endif
This happens when "ZNP_NPI" is not defined and "NPI" is defined (like in example).
I'm currently on version "4.40.04.04", I don't know if this already fixed in the new version.
If not, please do fix it in the next version.
BR
Mario