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.

CC2538: ZStack 3.0.2 ZDO_NWK_ADDR_REQ callback is not as documented

Part Number: CC2538
Other Parts Discussed in Thread: Z-STACK,

Hi

According to SWRA198, Z-Stack Monitor and Test API.pdf

3.12.1.1 ZDO_NWK_ADDR_REQ

**Please tell me where "section 3.0.1.7" is located mention on Page79

3.12.2.1 ZDO_NWK_ADDR_RSP

Description: This command is issued by the tester to return the results from a ZDO_NWK_ADDR_REQ.

Usage AREQ: 1 1 1 1 8 2 Length = 0x0D-0x53 Cmd0 = 0x45 Cmd1 = 0x80 Status IEEEAddr NwkAddr

The callback command should be (0x4508)

However, I got the following in Z-tool2.0:

<TX>05:24:23.99 COM8 ZDO_NWK_ADDR_REQ (0x2500)
IEEEAddress: 0x00124B000FE9A950
ReqType: SINGLE_DEVICE_RESPONSE (0x0)
StartIndex: 0x00

<RX>05:24:24 COM8 ZDO_NWK_ADDR_REQ_SRSP (0x6500)
Status: afStatus_SUCCESS (0x0)

<RX>05:24:24 COM8 MT_ZDO_MSG_CB_INCOMING (0x45FF)
srcAddr: 0x0000
wasBroadcast: 0x00
clusterID: 0x8000
SecurityUse: 0x00
TransSeq: 0x00
macDestAddr: 0x0000
asdu: .P....K..M.. (0x00, 0x50, 0xA9, 0xE9, 0x0F, 0x00, 0x4B, 0x12, 0x00, 0x4D, 0x1C, 0x00)

Somehow MT_ZDO_MSG_CB_INCOMING (0x45FF) was returned.

I just want to make sure this is supposed to happen, not because I've modified the stack in an unintended way.

Cheers

Harry

  • I suggest you to use sniffer to check what happens over the air.

  • Hi Harry,

    The document meant 3.10.1.7, when I attempt similar I get the following:

    <TX>04:02:32.41 COM34 ZDO_NWK_ADDR_REQ (0x2500)
        IEEEAddress: 0x00124B001CA60D7F
        ReqType: SINGLE_DEVICE_RESPONSE (0x0)
        StartIndex: 0x00
    
    <RX>04:02:32.42 COM34 ZDO_NWK_ADDR_REQ_SRSP (0x6500)
        Status: afStatus_SUCCESS (0x0)
    
    <RX>04:02:32.46 COM34 ZDO_NWK_ADDR_RSP (0x4580)
        Status: ZDP_SUCCESS (0x0)
        IEEEAddr: 0x00124B001CA60D7F
        NwkAddr: 0xA072
        StartIndex: 0x1C
        NumAssocDev: 0x00
        AssocDevList

    My only change to the stack involves adding the following pre-defines:

    MT_APP_FUNC
    MT_SYS_FUNC
    MT_ZDO_FUNC
    MT_APP_CNF_FUNC
    MT_SYS_KEY_MANAGEMENT
    MT_UTIL_FUNC
    MT_ZDO_FUNC
    MT_ZDO_CB_FUNC

    Regards,
    Ryan

  • Hi YK

    I've attached the sniffer log. Line 88 shows that I did perform a ZDO_NWK_ADDR_REQ at 9:04:48.

    Here's the ZTool log

    <TX>09:04:48.68 COM8 ZDO_NWK_ADDR_REQ (0x2500)
    IEEEAddress: 0x00124B000FE9A950
    ReqType: SINGLE_DEVICE_RESPONSE (0x0)
    StartIndex: 0x00

    <RX>09:04:48.7 COM8 ZDO_NWK_ADDR_REQ_SRSP (0x6500)
    Status: afStatus_SUCCESS (0x0)

    <RX>09:04:48.7 COM8 MT_ZDO_MSG_CB_INCOMING (0x45FF)
    srcAddr: 0x0000
    wasBroadcast: 0x00
    clusterID: 0x8000
    SecurityUse: 0x00
    TransSeq: 0x00
    macDestAddr: 0x0000
    asdu: .P....K..Yh. (0x00, 0x50, 0xA9, 0xE9, 0x0F, 0x00, 0x4B, 0x12, 0x00, 0x59, 0x68, 0x00)

    The information return by the callback is correct, but just under the wrong callback (0x45FF)

    I've asked for IEEEAddress: 0x00124B000FE9A950,

    (0x45FF) returrned 0x00, 0x50, 0xA9, 0xE9, 0x0F, 0x00, 0x4B, 0x12, 0x00, and 0x59, 0x68, which are the correct Long and short address.

    NWK_ADDR_REQ.rar

  • Thanks.

    I will test this.

  • Hi Ryan

    When I add the MT_TASK flag, I get the following error:

    Error[Li006]: duplicate definitions for "MT_TransportAlloc"; in "C:\Texas Instruments\Z-Stack 3.0.2\Projects\zstack\ZNP\CC2538\CC2538ZNP-without-SBL\Obj\MT_TASK.o", and "C:\Texas Instruments\Z-Stack 3.0.2\Projects\zstack\ZNP\
    CC2538\CC2538ZNP-without-SBL\Obj\znp_app.o"

    The MT_TransportAlloc() function is defined twice, one in MT_TASK.c and one in znp_app.c. 

    Which one should I keep?

    I'm using ZStack 3.0.2 ZNP project without-BSL

    Cheers

    Harry

  • I think you only need to make sure you define MT_ZDO_FUNC and MT_ZDO_CB_FUNC in your project predefined symbols.

  • YK is correct, MT_TASK was included by accident and I have removed it from my original post.  I'm not sure what project I used yesterday or how my environment has changed, but behavior today with the default ZNP-without-SBL is as such:

    <TX>09:24:33.11 COM34 ZDO_NWK_ADDR_REQ (0x2500)
        IEEEAddress: 0x00124B001CA60D7F
        ReqType: EXTENDED (0x1)
        StartIndex: 0x00
    
    <RX>09:24:33.13 COM34 ZDO_NWK_ADDR_REQ_SRSP (0x6500)
        Status: afStatus_SUCCESS (0x0)
    
    <RX>09:24:33.15 COM34 ZDO_NWK_ADDR_RSP (0x4580)
        Status: ZDP_SUCCESS (0x0)
        IEEEAddr: 0x00124B001CA60D7F
        NwkAddr: 0x4EE6
        StartIndex: 0x1C
        NumAssocDev: 0x00
        AssocDevList
    
    <RX>09:24:33.15 COM34 ZB_FIND_DEVICE_CONFIRM (0x4685)
        SearchType: 0x01
        SearchKey: 0x4EE6
        Result: 0x00124B001CA60D7F

    Regards,
    Ryan