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: Complications Using Z-Tool and Z-Stack to Create Network, Send and Receive Messages

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

Hi,

I've been trying to use Z-Tool to create a network and have searched a lot on the internet but haven't understood the way to do so. I have also worked very hard to understand Z-Tool Monitor and Test guide.

I have three CC2531 dongles with z-stack burned onto them. I want to create one of these as a coordinator while the other two as end devices. How to change the device type? As you can see, there is "None" written in the screenshot at present.

After that, I wish to send messages between these. Which commands from the z-tool shall I use to send messages? The guide doesn't explain parameters with examples, so it's getting really confusing.

If anyone can guide me through the process, it will be highly appreciated.

Looking forward to your help

Thank you!

  • Hi Jason,
    Thanks for taking time to answer my query. I have executed the commands as explained. I have been able to make one cc2531 dongle as router while the other as coordinator. According to the blog, a pop up should appear on the PC with the dongle that is now a coordinator as soon as the router is configured. However, it didn't happen in my case despite all of the steps happening with success. When I used used the device info, it says that the device type is a router. But I'm unable to send messages.

    <RX>01:29:26.21 COM10 UTIL_GET_DEVICE_INFO_RESPONSE (0x6700)
    Status: SUCCESS (0x0)
    IEEEAddr: 0x00124B000E896B43
    ShortAddress: 0x0000
    DeviceType: COORDINATOR, ROUTER, END_DEVICE (0x7)
    DeviceState: DEV_ROUTER (0x7)
    NumAssocDevices: 0x00
    AssocDevicesList

    Moreover, the "None" that I highlighted in the screenshot attached with the original question is still there; which I think should now be replaced with "Router". What could've gone wrong?

    Your help is highly appreciated.

    Many Thanks!
  • I don’t see there is any screenshot attached. According to your descriptions, it seems the setup is correct. How do you send messages?
  • Thanks for your reply, YiKai. The screenshot can be seen at the top of this thread, just above the first message.

    For instance, I make one zigbee as a coordinator while the other two as end devices. As soon as I do so, the  end devices will automatically join the network, is that right?

    Then I should be able to broadcast a message from the coordinator to all nodes in the network. Which command do I use for this purpose?

    Looking forward to your response

    Thanks

  • Also, as you can see, the number of associated devices is shown to be 0

    <RX>01:29:26.21 COM10 UTIL_GET_DEVICE_INFO_RESPONSE (0x6700)
    Status: SUCCESS (0x0)
    IEEEAddr: 0x00124B000E896B43
    ShortAddress: 0x0000
    DeviceType: COORDINATOR, ROUTER, END_DEVICE (0x7)
    DeviceState: DEV_ROUTER (0x7)
    NumAssocDevices: 0x00
    AssocDevicesList
  • It's correct to see the number of associated devices is 0 on router side. What's the UTIL_GET_DEVICE_INFO_RESPONSE on your coordinator?
  • Only the IEEE Address and device state are different; the rest is all same as on router side.

    <RX>01:29:26.21 COM10 UTIL_GET_DEVICE_INFO_RESPONSE (0x6700)
    Status: SUCCESS (0x0)

    ShortAddress: 0x0000
    DeviceType: COORDINATOR, ROUTER, END_DEVICE (0x7)
    DeviceState: Coordinator (0x7)
    NumAssocDevices: 0x00
    AssocDevicesList

    Thanks
  • It seems that your router turns to a distributed network router. When you invoke APP_CNF_BDB_START_COMMISSIONING on coordinator, you have to invoke APP_CNF_BDB_START_COMMISSIONING on router within 180 seconds before coordinator commission timeout. Try to do the test again to see if it works.
  • It might be the actual issue. I'll do this and will get back shortly.

    Meanwhile, could you please tell me the command that can be used to send a message to a particular device or broadcast a message in the network?

    Thanks
  • You can use AF_DATA_REQUEST to send message.
  • Hey YiKai,

    Just as you suggested, after I configured coordinator I configured end device within 180s, but the router didn't join the network which I observed when looked at associated devices where nothing was showing up. Also, here's what shows when completed the commissioning  commands and the announce is run

    <TX>11:45:19.67 COM10 ZDO_END_DEVICE_ANNCE (0x250A)

       NwkAddr: 0x0000

       IEEEAddr: 0x0000000000000000

       Capabilities: NONE (0x0)

    Moreover coordinator and router configured in separate PCs have the same short address i-e 0x0000. Do you think of it as an issue?

    Please suggest an alternate measure to configure devices correctly so they can join coordinator automatically.

    Thanks

  • Can you attach UART log of your coordinator and router?
  • Hi YiKai,
    Apologies for responding late, as I couldn't get a notification of your reply.

    The only way to share the log files that I could think of was a shareable google drive link. Please see the two log files labeled with their respective names (Coordinator and Router).
    drive.google.com/open

    I'm still unable to identify the problem. If you can help, it'll be highly appreciated.
    I shall wait for your reply.

    Many Thanks,
    - Arslan
  • I suspect your router has joined some Zigbee network and has the previous network information in NV so I suggest you to erase the chip and download ZNP to both coordinator and router to test again.
  • Hi,

    By "download ZNP", do you mean reflash with Z-Stack or just plug into the port and write the commands again?

    If latter is what you mean, then I've tried it many time by doing a hard reset. However, in the end the router doesn't join the network.

    Waiting for your response

  • I mean reflash with Z-Stack and remember to do erase before you reflash ZNP.
  • Alright. Thanks for your response. I'll do it and will reach back.