This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Zigbee CLI communication failure

Hello,

I am able to use the Zigbee CLI Agent and send some commands. I am using the zb-cli-wrapper python package to send commands from python. I wrote an application that configures the module as a zigbee coordinator. If it is already configured as such, that means if the zigbee stack is already running, I just connect the cli with bdb start command (so it will not create a new network). Then, when nodes join the network, I retrieve some information using simple descriptor command. Once I have all the informations about the network, I want to be able to control and monitor the nodes.

But for some reason that I don't understand, after sending some commands to the CLI, the communication stops working. I can not communicate with the CLI until I reset the module. What could be the issue? Do you think that I am sending commands too fast? Because when I send commands manually using Minicom, it never crashes or hangs.

Best regards,

Damien

Parents
  • Hi,

    Do you think that I am sending commands too fast?

    I don't think this should be a problem.

    What SDK version are you using? Can you post the python script you are using?

  • Hi,

    I am using the nRF5 SDK Thread and Zigbee v4.0 and zb-cli-wrapper 3.0 (that I modified because it is not complete).
    The python script that uses zb-cli-wrapper is a component of a quite big event based application that implements different protocols. I don't think posting it here will help since it is quite big and maybe complicated to understand if you don't know how the application is working.
    But what my component is doing is basically:
    - Create a network by configuring the zigbee module as coordinator or connect to the CLI if the Zigbee Stack is already running (bdb start).
    - Get all the information about the coordinator (panID, ieee, nwk, channel...)
    - Get lqi entries (zdo mgmt_lqi) to get the nodes in the network.
    - Create node objects for each lqi entry with their infos (nwk, ieee, ...)
    - Create endpoint objects for each active endpoint of a node. (zdo active_ep)
    - Create cluster objects for each cluster supported by an endpoint. (zdo simple_desc)
    - Go through the network to check the device types of the nodes in the network. For example if a thermostat cluster is found, I create an entity that will then use zcl to send commands with zcl cmd...
    - Same with attribute reading...

    Creating the network tree containing all these objects works good. But then when I try to send commands, it has strange behaviors sometimes. Also, I use asynchronous programming. I probably do something wrong that makes the CLI on the module side to crash, because sometimes it just doesn't reply until I reset the module.

  • Hi,

    What kind of "strange behaviors" does the coordinator have? Have you check with a sniffer trace to see that you are able to send the ZCL commands?
    Have you seen the readme.md file inside the wrapper folder for documentation on how to send generic commands?
    I don't know if I have any more ideas on what could be failing without having more information. Perhaps you can try to strip the python script of everything that doesn't involve the communication with the CLI module and see if the problem persists or send me the modified script?

    Best regards,

    Marjeris

Reply
  • Hi,

    What kind of "strange behaviors" does the coordinator have? Have you check with a sniffer trace to see that you are able to send the ZCL commands?
    Have you seen the readme.md file inside the wrapper folder for documentation on how to send generic commands?
    I don't know if I have any more ideas on what could be failing without having more information. Perhaps you can try to strip the python script of everything that doesn't involve the communication with the CLI module and see if the problem persists or send me the modified script?

    Best regards,

    Marjeris

Children
Related