Hi, i’m a newbee girl in here and i would like to know something,
For now I have three xbees (two pro s2c and one s2c). I have set the xbees to a coordinator (pro s2c), a router (pro s2c), and a end device (s2c). I have a project for them.
I want to link the coordinator to my computer, and the rooter and end device would be remote devices. I want to know the rssi value between the router and the end device, and I would like to know if, first, that’s possible, and then what kind of command (and in which mode : API so a frame, or AT) the coordinator can send in order to have a response from the router. Once this is done, I would like to put these values in a python program, or even send the command thanks to a python program too.
I have one (i found on a website called http://8p-tech.net/?p=448&lang=fr) here it is :
from time import time
ser = serial.Serial(port=‘/dev/ttyUSB0’, baudrate=9600, timeout=1)
log = open(“xbee_rssi_”+str(time())+“.log”, ‘w’)
if ord(ser.read())==0x7E: #start byte
length=(ord(ser.read())<<8 ) | (ord(ser.read()))
rssi=ord(ser.read()) #RSSI (Received Signal Strength Indicator)
log.write(‘%d ’ %rssi)