The cr command provides direct access to the Crazyradio dongle for operations that do not require a connection to a Crazyflie. This includes listing connected dongles, sniffing radio traffic and broadcasting packets.
To list all connected Crazyradio dongles:
cfcli cr listThis will show information about each dongle including serial number, firmware version and USB bus location.
To sniff broadcast packets on a given channel and address:
cfcli cr sniffBy default this listens on channel 80, datarate 2M and address E7E7E7E7E7.
These can be changed with the --channel, --datarate and --address options:
cfcli cr sniff --channel 78 --datarate 2 --address FFE7E7E7E7Received packets are printed with pipe, RSSI, timestamp and payload data.
To broadcast a packet (without acknowledgement) on a given channel and address use the broadcast subcommand. Data can be provided either inline or from a file.
Provide bytes as a comma-separated list using --data. Both decimal and
hexadecimal (prefix 0x) values are supported:
cfcli cr broadcast --data 0x8F,0x07,0x00,0x00,0x00,0x00,0x3F,0x00Provide raw binary data from a file using --input (or -i):
cfcli cr broadcast --input packet.binAll broadcast options with their defaults:
| Option | Description | Default |
|---|---|---|
--radio, -r |
Crazyradio index (0-based) | 0 |
--channel, -c |
Radio channel (0-125) | 80 |
--datarate, -d |
Datarate: 0=250K, 1=1M, 2=2M | 2 |
--address, -a |
5-byte broadcast address (hex) | FFE7E7E7E7 |
--data |
Comma-separated bytes to send | |
--input, -i |
File to read raw binary data from |
Either --data or --input must be provided.