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: Select network topology when starting a new network as zigbee coordinator

Part Number: CC2531
Other Parts Discussed in Thread: Z-STACK

Hi all,

I have successfully managed to configure CC2531 as ZigBee Coordinator using Monitor and Testing Interface.

Is it somehow possible to configure the underlying network topology when setting up the ZC. ? (somehow telling the coordinator to use, for example, star network topology or tree network etc.)

Looking forward for your answers.

Thank you !

  • Hi Neugen,

    Which SDK version are you using? For the latest one, 3.4, this feature was deprecated, but in some of the older versions it is possible.

    To change it in the older versions using the Monitor and Test API, you can alter the ZCD_NV_NWK_MODE (Item ID found in zcomdef.h).

    The controls for the operational mode are found in the zwk_globals.h file (snippet below):

    // Controls the operational mode of network
    #define NWK_MODE_STAR         0
    #define NWK_MODE_TREE         1
    #define NWK_MODE_MESH        2

    Best Regards,

    Marlyn

  • Hi Marlyn,

    Thank you very much for your answer.

    I've flashed the CC2531 with the CC2531ZNP-without-SBL.bin firmware which is bundled with Z-Stack 3.0.2.

    I'm using Z-Tool to send Monitor and Test API commands to the USB dongle.

    Please find below the SYS_VERSION_RESPONSE:

    TransportRev: 0x02
    Product: 0x00
    MajorRel: 0x02
    MinorRel: 0x07
    HwRev: 0x02

    I really hope that this answers your question about the SDK version that I'm using (otherwise, please let me know how can I get this information).

    So, if I got it right, when configuring the USB dongle as ZigBee coordinator, I can issue a MT SYS_OSAL_NV_WRITE(Id: ZCD_NV_NWK_MODE_ID, Offset: 0x00, Len: 1, Value: NWK_MODE_STAR) prior to commissioning in order to use star topology. Right ?

    Many thanks !

  • Hi neugen,

    You cannot modify the Zigbee mesh topology in Z-Stack 3.0, especially using MT commands with an out-of-box ZNP image.  What is your application?  If you are only connecting ZEDs then a star topology will be formed regardless since there are no ZRs present in the network.  You could disallow ZRs from joining by setting NWK_MAX_ROUTERS to zero but this would involve modifying the ZNP firmware.

    Regards,
    Ryan

  • Hi Ryan, 

    Thank you for your answer.

    I'm developing a test PC application (acting as ZAP) and I'm using CC2531 USB dongle as ZNP.

    The goal is to establish a network, allow devices to join and control/monitor them. Communication with the CC2531 is based on MT API.

    I'm a ZigBee newbie, so maybe my approach has some flaws, or it might be completely wrong. 

    So, the default network topology is mesh, and, if one wants to modify the topology, one needs to build a custom ZNP firmare for this. Is my understanding correct ?

    Thank you,

    Eugen

  • The default network is mesh, this is correct. And if you only want to use star topology, you can just use end devices in the network and all the end devices would connect to coordinator using star topology.

  • What about the MT  SYS_OSAL_NV_WRITE(Id: ZCD_NV_NWK_MODE_ID, Offset: 0x00, Len: 1, Value: NWK_MODE_STAR)  command ?

    Does it have any effect on the ZNP ?

  • I think you use pretty old Z-Stack version. Where do you see this information?

  • Please see Marlyn's answer above (first reply in the discussion) where it is mentioned ZCD_NV_NWK_MODE.

    Thanks,

    Eugen

  • I don't think you can change ZCD_NV_NWK_MODE using MT command in current Z-Stack. Current Z-Stack uses mesh by default.

  • Hi Eugen,

    YK is right and your understanding about needing custom ZNP firmware to affect topology is also correct.  Don't allow routers to join and only commission end devices.

    Regards,
    Ryan