Skip to content

Bumped to version 0.16.0 and bumped dependencies - #41

Merged
evoggy merged 1 commit into
mainfrom
evoggy/release-0.16.0
Oct 9, 2026
Merged

evoggy merged 1 commit into
mainfrom
evoggy/release-0.16.0

Conversation

@evoggy

@evoggy evoggy commented Oct 9, 2026

Copy link
Copy Markdown
Member

Prepares the 0.16.0 release: PRs #21–#40 since 0.15.0. Most of them add features (swarms, signing in and sharing, stored lighthouse configs), and some text output changes (log print is a table now, new exit codes 50 and 60), hence a minor bump.

Changes

  • Version 0.16.0.
  • Dependencies pinned to their latest versions:
    • clap 4.6.7, clap_complete 4.6.11, tokio 1.53.2, reqwest 0.13.5, octocrab 0.54.3, rand 0.10.3, half 2.7.1, env_logger 0.11.11
    • zip 8.6 → 9.0: ZipFile::name() now returns a Result, so FirmwareArchive::from_zip reads the name once per entry and fails on a name that can't be decoded.
    • base64 0.22 → 0.23: no code change.
    • crazyflie-lib 0.8.2 and cfloader 0.1.0 are already the latest.
  • cargo update: the newer octocrab no longer pulls in a set of crypto crates, so Cargo.lock is about 575 lines shorter.

Testing

  • cargo build --release and cargo test (82 tests) pass. Clippy has no new warnings.
  • FirmwareArchive::from_zip read firmware-cf21bl-2026.08.zip with zip 9 and extracted all 7 binaries with their names and versions. This was a throwaway test, not committed.
  • Not tested on hardware.

Release notes (draft)

0.16.0 release notes

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 config manages them (list, select, create,
    delete, show, name, add, remove, rename, import, export,
    move), swarm scan shows which Crazyflies answer, and
    select --from-swarm CF-02 selects 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 answered
    

    swarm config add takes 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 to radio:/// 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, --exclude or --swarm:

    Command
    swarm platform info | reboot | power-off | sleep | wakeup
    swarm param get | set | store | clear without names, the parameters are picked from the first Crazyflie
    swarm log print streaming, or one row per Crazyflie with --once
    swarm deck list, swarm debug assert
    swarm bootload info | flash see below
    swarm rechannel see below
    swarm lh check | write see below

    Listings look like the normal ones with a CF column in front, and --csv
    rows start with cf,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     | 12
    

    Each 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 for swarm platform info on 3 Crazyflies).

  • Flashing a swarm — swarm bootload flash takes the same --release,
    --zip, --bin and --targets as bootload flash and 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 --zip stops the command instead of
    failing halfway. STM32 and nRF51 images given with --bin are only flashed
    when all the Crazyflies have the same platform; --platform flashes one
    platform at a time in a mixed swarm.

    swarm bootload info shows the bootloader versions of each Crazyflie and
    restarts it back into its firmware. Its Broadcast column 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,72 gives 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-run stops there, --yes skips 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 login signs 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/lab shares a local swarm, and moving it back takes
    it back. The default server is https://arc.bitcraze.io; --server signs 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 3
    

    With 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, pull and push sync 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, pull and
    push. display, write and check take 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 check compares every Crazyflie with it, and swarm lh write writes
    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 check compares 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. --csv is 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 --once reads one sample, prints it as a table
    and stops; --csv gives the header and the first row. See
    docs/logging.md.

  • Radio URIs of USB-attached Crazyflies — scan --from-usb reads the radio
    configuration of every USB-attached Crazyflie and prints its radio URI,
    without selecting it the way select --from-usb does:

    $ cfcli scan --from-usb
    > radio://0/90/2M/ABAD1DEA01 (usb://410050000551343036333233)
    
  • Restarting the STM32 into USB DFU — platform dfu restarts 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 reboot brings 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 info shows 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 flash and bootload info asked 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 read saved files as version: '2', which cflib refuses. Files are
    now written as version: '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 print printed each
    sample as LogData { 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;
    --csv is 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 with systemType: 1 is
    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 print prints a table instead of one LogData { … } line per sample.
    Scripts should use --csv, which is unchanged.
  • select --from-usb no longer prints the Read radio config: … line; the
    Selected: line after it has the same information.
  • bootload info reports 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 when lh config check or swarm lh check finds differences.
  • An unknown --platform for bootload flash --cold exits 30 (invalid
    value) instead of 1.

zip 9 returns the entry name as a Result, so the firmware archive reads
it once per entry and fails on a name that can't be decoded.
@evoggy
evoggy merged commit 562daab into main Oct 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant