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.

CC2531: Linux Gateway code how to process the Node Descriptor Req from a remote device

Part Number: CC2531

Hi All,

I check the code in the latest Linux Gateway(Sensor-to-Cloud). 

I didn't find how the Linux Gateway process the incoming Node Descriptor Request sent from a remote device over the air and response the Node Descriptor Response.

I only see the Linux Gateway transmit the Node Desc Request by calling sendZdoNodeDescReq and process the Node Desc Response in sendSimpleDescRsp.

Need your support.

Best Regards.

Thanks.

  • Hi,

    Please see the following code, found in Projects/zstack/linux/zstackpb/zstackpb.c:

          case ZSTACK_CMD_IDS__ZDO_NODE_DESC_REQ:
            {
              ZdoNodeDescReq *pReq;
              pReq = zdo_node_desc_req__unpack( NULL, len, pData );
              if ( pReq )
              {
                processZdoNodeDescReq( connection, pReq );
                zdo_node_desc_req__free_unpacked( pReq, NULL );
              }
            }
            break;

    Regards,

    Toby

  • Hi Toby,

    The code you provide seems processing the ZDO Node Req command from uplayer.  Not the ZDO Node Req processing from the remote device.

    Please double confirm on it. 

    static void processZdoNodeDescReq( int connection, ZdoNodeDescReq *pMsg )
    {
      uint8 status;
      zAddrType_t dstAddr;
    
      dstAddr.addrMode = Addr16Bit;
      dstAddr.addr.shortAddr = pMsg->dstaddr;
    
      status = ZDP_NodeDescReq( &dstAddr, (uint16) pMsg->nwkaddrofinterest, FALSE );
    
      sendDefaultRsp( connection, pMsg->cmdid, (ZStatusValues) status );
    }
    #define ZDP_NodeDescReq( dstAddr, NWKAddrOfInterest, SecurityEnable ) \
                              ZDP_NWKAddrOfInterestReq(  dstAddr, \
                                  NWKAddrOfInterest, Node_Desc_req, SecurityEnable )

    Thanks.

  • Yes, you're right.

    I believe the ZNP (rather than the gateway) will handle this in ZDO_ProcessNodeDescReq (you can find the znp project in the CC13x2/CC26x2 SDK).