Repository navigation
0.16.0
This release is mostly about swarms. cfcli can now store lists of Crazyflies,
run commands on all of them at once, and share swarms and lighthouse
configurations with the people you fly with.
New features
-
Swarms — a swarm is a named list of Crazyflies, each with a short name,
stored in the same YAML format as
Swarmkeeper so a file can move
between the two.swarm configmanages them (list,select,create,
delete,show,name,add,remove,rename,import,export,
move),swarm scanshows which Crazyflies answer, and
select --from-swarm CF-02selects one of them for all the other commands.
See docs/swarm.md.$ cfcli swarm config import ~/Documents/Swarmkeeper/swarms/lab.yaml Imported swarm 'lab' from …/lab.yaml (3 Crazyflies), 3 URIs now use radio:/// (any Crazyradio) Selected swarm 'lab' (3 Crazyflies) $ cfcli swarm scan CF | URI | Radio | Online ------+---------------------------+-------+-------- CF-01 | radio:///80/2M/E7E7E7E701 | 1 | yes CF-02 | radio:///90/2M/ABAD1DEA01 | 0 | yes CF-03 | radio:///90/2M/ABAD1DEA02 | 0 | yes 3 of 3 Crazyflies answeredswarm config addtakes URIs,--scan, or--from-usb(the one
USB-attached Crazyflie), and asks for a name when a single Crazyflie is added.
Swarm IDs and Crazyflie names complete in bash, zsh and PowerShell. -
Any Crazyradio:
radio:///— a URI with the radio left empty means "any
Crazyradio". A single Crazyflie gets the first Crazyradio that can be opened,
so cfcli keeps working while another program holds radio 0. A swarm is spread
over all attached Crazyradios, and Crazyflies on the same channel, or on
channels less than 2 apart, always share one, so two radios never transmit on
the same channel.radio://0/is rewritten toradio:///when Crazyflies are
imported or added to a swarm; other radio indices are kept. -
Commands on a whole swarm — these run on every Crazyflie in the selected
swarm, or on the ones picked with--cf,--excludeor--swarm:Command swarm platform info | reboot | power-off | sleep | wakeupswarm param get | set | store | clearwithout names, the parameters are picked from the first Crazyflie swarm log printstreaming, or one row per Crazyflie with --onceswarm deck list,swarm debug assertswarm bootload info | flashsee below swarm rechannelsee below swarm lh check | writesee below Listings look like the normal ones with a
CFcolumn in front, and--csv
rows start withcf,uri. A Crazyflie that fails doesn't stop the others; its
error goes to stderr with its name in front. The exit code is 0 when all
succeed, the usual code when all fail the same way (10 when none answer), and
the new 50 otherwise.$ cfcli swarm platform info CF | Platform | Firmware | CRTP protocol ------+-------------------------+-------------+--------------- CF-BS | Crazyflie 2.1 Brushless | 2026.08 +84 | 13 CF-01 | Crazyflie 2.1 Brushless | 2026.08 | 12 CF-02 | Crazyflie 2.1 Brushless | 2026.08 | 12Each Crazyradio talks to up to 8 Crazyflies at a time, and log and parameter
TOCs are downloaded once per firmware instead of once per Crazyflie (3.2 s
cold and 0.6 s warm forswarm platform infoon 3 Crazyflies). -
Flashing a swarm —
swarm bootload flashtakes the same--release,
--zip,--binand--targetsasbootload flashand flashes the
Crazyflies one after another, with a summary table at the end. A release is
downloaded for each platform in the swarm, and everything is prepared before
the first Crazyflie is touched, so a wrong--zipstops the command instead of
failing halfway. STM32 and nRF51 images given with--binare only flashed
when all the Crazyflies have the same platform;--platformflashes one
platform at a time in a mixed swarm.swarm bootload infoshows the bootloader versions of each Crazyflie and
restarts it back into its firmware. ItsBroadcastcolumn tells whether both
bootloaders support broadcast flashing (bootloader protocol 0x11), which is in
preparation; this release flashes one Crazyflie at a time. -
Spreading a swarm over several channels — Crazyflies on one channel share
one Crazyradio, so a swarm on a single channel can only use one.
swarm rechannel --count 3(channels 80, 78 and 76) or
--channels 80,76,72gives each channel an equal share, keeps Crazyflies
that are already on one of the channels where they are, and refuses a plan
that would put two Crazyflies with the same address on one channel. The plan
is shown and confirmed first (--dry-runstops there,--yesskips the
question). Each Crazyflie that moves is reprogrammed, rebooted and found on
its new channel before its URI in the swarm file changes, so running the
command again after an interruption finishes the job. -
Sharing swarms and lighthouse configurations —
auth loginsigns cfcli in
to a server through the browser, with nothing to copy (auth status,
auth logout). Signed in, swarms on the server sit next to the local ones as
<organization>/<swarm>, and every swarm command takes either kind of ID.
swarm config move lab org/labshares a local swarm, and moving it back takes
it back. The default server is https://arc.bitcraze.io;--serversigns in to
another one. See docs/auth.md.| ID | Name | Crazyflies | Stored --+-------------------+-------------+------------+---------------------------- * | lab | Lab | 3 | this computer | bitcraze-lab/cage | Flight cage | 8 | arc.bitcraze.io, revision 3With sync on (
settings sync on, the default), commands check the server
first and upload changes right away, and a change someone else made in between
is kept. With sync off,pullandpushsync by hand. Without the server,
commands work on this computer's copies and upload the changes later, so
working with the Crazyflies never waits for the network. When you change your
ID for an organization on the server, cfcli moves its copies and the selected
swarm to the new ID. -
Stored lighthouse configurations — lighthouse configurations can be stored
like swarms, locally as<config>or shared as<org>/<config>:
lh config list,save(the Crazyflie's configuration),import,export
(a file the Crazyflie client opens),name,delete,move,pulland
push.display,writeandchecktake a stored configuration, a file
(-i) or YAML on stdin. See docs/lighthouse.md.A swarm can name the configuration it flies in (
swarm config lh).
swarm lh checkcompares every Crazyflie with it, andswarm lh writewrites
it to the Crazyflies that don't have it yet and reads it back:$ cfcli swarm lh check Lighthouse config 'lab/cage' (revision 3): base stations 0, 1, 2, 3 CF | Lighthouse ------+------------------------------------------ CF-01 | up to date CF-02 | BS 2 moved 4.1 cm, turned 0.62° CF-03 | no position for BS 0, 1, 2, 3 Error: differs: 2 of 3 Crazyflies have another lighthouse configuration; 'cfcli swarm lh write' gives them this one -
Comparing lighthouse configurations —
lh config checkcompares the
Crazyflie's configuration with a file or a stored one, per base station: how
far the geometry moved and turned, and whether the calibration belongs to
another base station. A difference exits with the new code 60, so a
script can act on it.--csvis supported.BS | Geometry | Calibration ---+----------------------+------------------------------------------------------------------------- 0 | not on the Crazyflie | other base station: 0x00BC614E in the file, 0xE8781C12 on the Crazyflie 1 | - | same -
One log sample —
log print --oncereads one sample, prints it as a table
and stops;--csvgives the header and the first row. See
docs/logging.md. -
Radio URIs of USB-attached Crazyflies —
scan --from-usbreads the radio
configuration of every USB-attached Crazyflie and prints its radio URI,
without selecting it the wayselect --from-usbdoes:$ cfcli scan --from-usb > radio://0/90/2M/ABAD1DEA01 (usb://410050000551343036333233) -
Restarting the STM32 into USB DFU —
platform dfurestarts the STM32 into
its ROM bootloader over the radio, without holding the power button, and
waits for it to show up on USB (0483:df11).platform rebootbrings it back.
This needs nRF51 firmware with
crazyflie2-nrf-firmware#126,
which is not in a firmware release yet. See docs/platform.md. -
GAP8 as a flash target — the AI-deck's GAP8 (
bcAI:gap8-fw) can now be
flashed.
Bug fixes
-
bootload infoshows the real bootloader protocol version — the version
was read from the byte that echoes the command, so every bootloader reported
Protocol Version: 16(0x10). It is now read from the right byte (0 for
bootloaders from before it existed), and the CPU ID is shown in full instead
of its first 2 bytes. -
Entering the bootloader no longer hangs — the warm boot behind
bootload flashandbootload infoasked the firmware for its bootloader
once, and could wait forever if that request or its answer was lost. It now
asks again every 200 ms and gives up with an error after 2 s. -
The AI-deck boot delay is applied when flashing decks — the AI-deck was
never detected, so the delay it needs to boot between deck flashes was
skipped. It is now detected from the deck's 1-wire memory, the same way the
nRF51 firmware does. -
Lighthouse configuration files open in the Crazyflie client —
lh config readsaved files asversion: '2', which cflib refuses. Files are
now written asversion: '1'(the format is the same), and files written by
earlier versions are still read.
(#34)
Improvements
-
Streamed log samples are printed as a table —
log printprinted each
sample asLogData { timestamp: …, data: {…} }, with the variables in a
different order on every line. It now prints a header once and a row per
sample, with the Crazyflie's time and the values in the order they were asked
for. Floats get 3 decimals and are right-aligned so the columns don't jump;
--csvis unchanged and keeps full precision.$ cfcli --timeout 1500 log print acc.x,pm.state,motor.m1,stateEstimate.az -p 200 Time (ms) | acc.x | pm.state | motor.m1 | stateEstimate.az -----------+----------+----------+----------+------------------ 13947058 | -0.012 | 2 | 0 | -0.002 13947258 | -0.012 | 2 | 0 | 0.001 -
A protocol version mismatch now says how to recover — firmware too old
for this cfcli can't be asked to reboot into its bootloader over a link that
won't come up, so the error is now followed by a hint to flash it cold:Error: connection error: connecting to usb://4A002B0007504B5957333720: Protocol version not supported: supported range is 12-13, found 7 Hint: the firmware is too old for this cfcli. It cannot be asked to reboot into its bootloader over a link that will not come up, so flash it cold: cfcli bootload flash --release --cold Power the Crazyflie off, then hold the power button for a few seconds until the blue LEDs blink to enter the bootloader before flashing.Firmware newer than the CLI gets the opposite advice: update cfcli. The exit
code is unchanged at 10. -
Lighthouse configuration files are checked before connecting — the type,
the version and the base station IDs and values are checked first. Only
Lighthouse V2 base stations are supported, so a file withsystemType: 1is
refused. cfcli reads the number of base stations the firmware supports (4 by
default, up to 16) from the lighthouse memory, and refuses to write IDs the
firmware doesn't have before writing anything. Base stations are written in ID
order, so reading the same configuration twice gives the same file. -
Updated dependencies — including zip 9 and base64 0.23. No change in
behaviour.
Changes that can affect scripts
log printprints a table instead of oneLogData { … }line per sample.
Scripts should use--csv, which is unchanged.select --from-usbno longer prints theRead radio config: …line; the
Selected:line after it has the same information.bootload inforeports the real bootloader protocol version instead of
always 16.- New exit codes: 50 when a swarm command fails on some of the Crazyflies,
and 60 whenlh config checkorswarm lh checkfinds differences. - An unknown
--platformforbootload flash --coldexits 30 (invalid
value) instead of 1.