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.

CC2530: Change from end device to router 、 coordinator

Other Parts Discussed in Thread: Z-STACK, CC2530

The current code writes all Zigbee node types in the .cfg file. You can choose the corresponding .cfg file for burning to select the desired type directly. Is there a way to wirelessly control Zigbee end nodes to transform them into router nodes and new coordinator nodes?

  • I would suggest you to use ZNP + host for such application so you can change device type from your host application.

  • Thank you for your reply. If there is a large area with a significant number of nodes, and a single Zigbee network cannot accommodate all these nodes, I need a new Zigbee network. Initially, all nodes are identical. Through communication between nodes (to save manual costs, the code burned into these nodes is the same, meaning it is not possible to pre-specify which one will be the next coordinator), I aim to designate a terminal node, located far from the initial coordinator, as the new coordinator to control the new area. Is it possible to achieve this approach?

  • If you use ZNP+host mode, I think it should be feasible.

  • The protocol stack version I am currently using is 2.5.1a. Is it possible to implement the ZNP + host mode? Due to my limited knowledge in this area, I am not quite sure. Could you please guide me on where to start as a beginner?

  • For ZNP+Host, you can refer to CC2530ZNP Interface Specification.pdf in Z-Stack 2.5.1a document folder. For your application logic, I cannot help much.

  • Hi,About the functionality of converting end node devices into router node devices and router nodes into coordinator nodes

    1. Have you ever completed these tasks before?

    2. Is it easy to resolve for a beginner?

  • 1.Yes, it can be done with ZNP. You only need to reset device and configure ZNP to act as end device, router or coordinator in your application.

    2.I suppose this depends on the ability of beginner.

  • Hi,Chen.Thank you very much for your valuable advice. After consulting relevant information, I have gained a better understanding. Does the ZNP (Zigbee Network Processor) solution with CC2530+MCU mean that, in addition to the CC2530, an additional chip is required?

  • Yes, ZNP+host means CC2530 acts as ZNP and you need an extra MCU for application code.

  • Hi qd,

    Here is a relevant E2E thread you might find useful: https://e2e.ti.com/f/1/t/708833

    Regards,
    Ryan

  •  Hi, Mr. Chen, I came across your post about configuring the network on Z-Tools in a forum. I couldn't find the post that mentioned the steps you discussed. Could you provide a link to that post? I would greatly appreciate it.

  • Try to refer to https://sunmaysky.blogspot.com/2017/02/use-ztool-z-stack-30-znp-to-set-up.html which shows you how to set ZNP from Z-Tool to act as coordinator and router.

  • Thank you very much. I will try it now.

  •  Hi,Chen,You're welcome! Now that I can set the device as a coordinator and router using commands. When I attempt to set the device as an end device, it does not successfully join the network and remains in the state "DeviceState: DEV_NWK_DISC (0x2)."

  • Did you already establish or join a network with DEV_NWK_FORM when the device was a Coordinator or Router, before switching to the End Device role?  If so then please make sure to clear NV flash memory and reset before continuing.  Otherwise, if using a new ZNP image with cleared NV contents, confirm that the separate Zigbee Coordinator is open for joining and using the same channel which the End Device is attempting to scan.

    Regards,
    Ryan

  • I agree with Ryan that you should clear NV to reset ZNP before you start new end device to join network. If it doesn’t work, I would suggest you to setup sniffer to check what exactly happens over the air.

  • Thank you for your previous assistance; I have learned a lot. Now I have some more questions: When my router or terminal starts to join the network, it seems like the coordinator is no longer accepting new nodes. When I send the (0x02) Network Steering (0x2) command to the coordinator, and immediately have the router and terminal send this command as well, the devices successfully join the network. I have three questions regarding this:

    1. How can I configure the coordinator to always accept the joining of new nodes?
    2. When a device is configured as an end device through a command, the end device can receive broadcast messages from the coordinator. However, when sending commands to the end device, there is no response. The end device can still receive broadcasts and display them through the serial port. After a while, the end device exits the network, and when scanning for devices, it shows "no devices found."
    3. When the coordinator broadcasts a message, both router and end device nodes can receive it. However, when I set DstAddr to a specific node's nwkAddr (without changing other parameters), the coordinator receives:
      <RX> 10:08:52.04 COM5 AF_DATA_CONFIRM (0x4480)
      Status: afStatus_NO_ROUTE (0xCD)
      Endpoint: 0x01
      TransID: 0x00

    These are the issues I am currently facing. Do you have any solutions or suggestions for these problems? Looking forward to your response!

  • Thank you for your response. It appears that the coordinator temporarily disabled the functionality allowing nodes to join.

  • After you send the (0x02) Network Steering (0x2) command to ZNP, it will open network for 180 seconds for new device to commission. So, you have to add new device in this windows. If not, you have to start network steering again.

  • 1. Answered by YK.  The maximum BDBC_MIN_COMMISSIONING_TIME is 254, this is defined by the Zigbee 3.0 Specification.
    2. If the End Device sets RFD_RCVC_ALWAYS_ON to FALSE in f8wConfig.cfg (default) then the device is sleeping in between polls and unable to receive broadcast messages.
    3. You are likely sending the incorrect DstAddr based on an understanding of the MT interface, please try to reverse the bit order (LSB instead of MSB or vice versa for example 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00 instead of 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07).

    Regards,
    Ryan

  • Hi,Ryan Brown1.

    Now it is possible to send commands to CC2530ZNP via Z-tool using a PC. How can I replace the PC with an external MCU, and what should I do in the external MCU? Is there any relevant documentation available?

    Regards,

    qd

  • You can run the same ZNP/MT command as you used on Z-tool to run on MCU to make this work.

  • Thank you for your help. With the help of the serial port monitoring software, I will send the captured hexadecimal instructions to ZNP, and the device has been successfully initialized. As shown in the previous code, I can receive messages from other devices. So, here with ZNP, can I process messages between devices? If so, where should I operate?

  • I suppose you need to use AF_Register to regiter endpoint for your ZNP to communicate with other device.