Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example reading RSSI measurement from Crazyflie 2.0
# cflib can be installed via 'pip install cflib'
import cflib.drivers.crazyradio as crazyradio
cradio = crazyradio.Crazyradio()
# Connection parameter for the CF2
for _ in range(10000):
pk = cradio.send_packet((0xff, ))
# Filter for NULL packet that includes a RSSI measurement
# -> Null packet have a header of 0xF3, with a mask of 0xF3
# -> RSSI NULL packets have 1 after the header, and the RSSI after
if pk.ack and len( > 2 and \[0] & 0xf3 == 0xf3 and[1] == 0x01:
print("RSSI: -{}dBm".format([2]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment