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

Can I receive a device-generated command at the Zigbee CLI Agent?

I can send a command to a custom cluster through the Zigbee CLI, which is installed and running as a Coordinator on a nrf52840 dongle.

However, I must respond to commands with server generated commands.  Can I receive those commands at the Zigbee CLI asynchronously?  If so, to which endpoint and cluster must I direct the commands?

  • Can I receive those commands at the Zigbee CLI asynchronously?

     Do you mean that you want to "auto-respond" with some sort of function within the CLI example?

    And what do you mean by: "to which endpoint and cluster must I direct the commands"? I guess your custom cluster would need an endpoint which you can write to in order to send a response back to the device, or is that not what you mean?

  • Thanks for your response.

    What I would like is to receive commands originated from the devices (server generated).  Ideally the arrival of messages should trigger some sort of callback.  But having to poll the stream will do, nonetheless.

    Nordic has done a fantastic job creating the Zigbee python API, but I could not find any way to receive and process commands originated from the devices.  I have seen the commands originated from the device in wireshark, using a Bluetooth sniffer module, and would like a simple way to build a coordinator that doubles as a gateway to the Internet.

  • So you are using the CLI example from the SDK? You can look for the callbacks that print the reply from the commands, and try to add your custom function there, perhaps?

  • The problem is that I receive a default response, but not the command I send.  Thus when I send a command from the coordinator through the script, I get the following transaction:

    communicator.py: DEBUG: CLI::UartConn: /dev/ttyACM0@115200 TX: zcl cmd F4CE36E7389B99B0 10 F16F -p 0104 20
    communicator.py: DEBUG: CLI::UartConn: /dev/ttyACM0@115200 RX:  
    communicator.py: DEBUG: CLI::UartConn: /dev/ttyACM0@115200 RX: zcl cmd F4CE36E7389B99B0 10 F16F -p 0104 20
    communicator.py: DEBUG: CLI::UartConn: /dev/ttyACM0@115200 RX: Done

    Now, there is a response command sent from the end device (so server generated), which I see with a sniffer on Wireshark.  Can I read that server-generated command with the nordic CLI and have it available on a python script, at the PC side?

  • Arent those prints printed from the python script? Can you use those events to do what you want?

    I haven't used the zigbee python scripts. Which one are you using?

Related