Home/Support/Support Forum/how to send remote AT command to xbee device using python digi-xbee library
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

how to send remote AT command to xbee device using python digi-xbee library

0 votes
as the title said, i'm looking for a way to send an AT command to a remote xbee and read the response. my code is in python and i'm using digi-xbee library.

another question: my goal of using AT command is to get the node ID of that remote xbee device when this last one send me a message, i don't want to do a full scan of the network, i just want to get its node id and obviously the node id doens't come within the frame. so i had to send to it an AT command so he send me back its node ID. if you have any suggestions that may help, please tell me, i'm open to any helpful idea.

PS. i tried to use read_device_info() within the callback function that launch when a data received but it didn't work. it works outside the function but inside no!

thanks in advance
asked Mar 5, 2018 in Python by shadookane New to the Community (0 points)

Please log in or register to answer this question.

4 Answers

0 votes
In the callback, what you need is
"address = xbee_message.remote_device.get_64bit_addr()"
if you want to get the address of the sender.
And if you want to send back an AT command to the sender, for example, to set a pin to digital output high, use the local Xbee to send a RemoteATCommandPacket to the local.
Here is an example: (set D4 of remoted Xbee to high)

#make an AT Command Packet
ATcommand = RemoteATCommandPacket(1,address_of_remoted_Xbee,XBee16BitAddress.from_hex_string("FFFE"),
2,"D4",bytearray([0x05]))
#then send the packet from local_Xbee
local_Xbee.send_packet(ATcommand)

Good luck!
answered Oct 25, 2018 by habom2310 New to the Community (2 points)
0 votes
Did it work, OP?
answered Jun 29 by edunn106 New to the Community (22 points)
0 votes
Your thoughts may be in order but when it comes to translating them to words on paper that have a flow and consistency as well as perfect grammar, this is beyond most students.
https://onlineassignmenthelpaustralia.com/
answered Jun 29 by stanlyrayely230 New to the Community (1 point)
0 votes
Your ideas might also be in order however when it comes to translating them to phrases on paper that have a waft and consistency as properly as ideal grammar.
answered Jul 1 by Bears New to the Community (3 points)
...