I’m having a problem ATND command to know RSSI.
I have 3 zigbees network with the Coordinator sending packets to one router, the router sending it to end device and end device send the packets back to the coordinator. I need to know the RSSI of this network. I’m using this code:
# RSSI
tty = serial.Serial('/dev/ttyUSB0',timeout=4)
outb = '+++'
tty.write(outb)
inb = tty.read(2)
print inb
loop = 2
if inb == 'OK' :
outb = 'ATND'+chr(0x0d)
tty.write(outb)
for i in range(0,loop) :
inb = tty.read(24)
print 'inb:'
print inb
print inb[2:9]+' '+inb[10:18]
print '-'+str(int(inb[19]+inb[20],16))+'dBm'
print ' '
log.write('-'+str(int(inb[19]+inb[20],16))+'
')
But when i run this code two times i have different RSSI values.
There are the results:
inb:
EN6E7F54
13A200 406E7F54
-36dBm
inb:
4076F0CE
13A200
-64dBm
Running the program again i got:
inb:
RO76F6CB
13A200 4076F6CB
-36dBm
inb:
406E7F54
406200
-127dBm
Another time:
inb:
EN6E7F54
13A200 406E7F54
-41dBm
inb:
4076F0CE
13A200
-64dBm
Why am i having differente values to the RSSI?