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.

SIMPLELINK-CC13X2-26X2-SDK: Overlap in ZStackTask Event ID

Part Number: SIMPLELINK-CC13X2-26X2-SDK

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

  • Hi Mario,

    Thank you for alerting us of this issue, there does appear to be overlap between the zcomdef.h definitions and zstack_CmdIDs in zstackmsg.h, particularly 0x21 through 0x27.  I recommend you modify 0x23 through 0x27 of zcomdef.h to a value not used, like 0x54 through 0x58.  As far as I can tell, this issue remains on the v5.10 SDK and as such I have requested that the Software Development Team further investigate.

    Regards,
    Ryan