Home/Support/Support Forum/How to get RSSI of latest packet received? (XBee3 + micropython)

How to get RSSI of latest packet received? (XBee3 + micropython)

0 votes

I need to get the RSSI of received packets. For a network with few devices, where all of them transmit once in a while I could use AT command 'DB' (page 146 of https://www.digi.com/resources/documentation/digidocs/PDFs/90002273.pdf) to show the RSSI of the latest packet received. But when the network has more devices and they could be transmitting at the same time, I think that I can't use that 'DB' command. Also "The XBee device has a MicroPython receive queue that stores up to four incoming packets" (Receive(), page 123 of https://www.digi.com/resources/documentation/digidocs/PDFs/90002219.pdf).

I'm using something like this:

while True:
....packet_recvd = xbee.receive()

....if packet_recvd is not None:
........rssi = xbee.atcmd("DB")
........process_packet(packet_recvd, rssi)

1.- In the code above, can I be sure that rssi has the RSSI of the packet received in packet_recvd during high XBee3 communication traffic?

2.- Is 'DB' updated as soon as a packet arrive at the device?

3.- Or, is 'DB' updated as soon as I use XBee.receive()?
asked Apr 29, 2020 in XBee3 802.15.4 by oiturra New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes

Yes, the RSSI would be of the last packet received. The DB value is updated when the packet is received and validated it is for that module.

Digi Support
answered Apr 29, 2020 by mvut Veteran of the Digi Community (14,294 points)
Hi. I'm a bit confused by the answer. Does that mean the DB value is not in any way related to xbee.receive() in the MicroPython code? Is there a reliable way to associate a packet from xbee.receive() with a RSSI value?
If you query the DB command just after reading the data port, then yes, they would co-inside with each other.