How to send AT command to zigbee device using Python

Hi, I’m completely new to Python programming and I’d appreciate any assistance and advices given.

I’m currently working on Zigbee device where I need to send a request command to get the result back. I have a python code that listens to the Serial com port but I need to rectify it so it would send the request command and send back the result.

The zigbee that I’m using is a normal zigbee not xbee’s zigbee, I’ve read that it is similar / compatible

This is an example of what I want it to do.
https://imgur.com/jp1mmjG.png

so I need my Python to send the at command “at+uc=2823,?”

which code should I use to fulfil my needs? and how do I write my codes?

Thank you :slight_smile:

I think you posted this at the wrong site. This site is for Digi International products and questions related to that.

when you recive a message you get an xbee_message object, first you must define a data receive callback function and add it to device . In that message you call remote_device_get_64bit_addr().

Python classes in Nashik

Just use pyserial library, open the connection on the COM (or ttys / stty) port and send and receive data. There is no magic here.

https://pythonhosted.org/pyserial/shortintro.html