Skip to content

v0.6.0-alpha.1

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 17 Nov 22:05
· 130 commits to main since this release
d19df10

The first alpha of 0.6 lets a phone update an nRF52840 board, the Heltec T114 and the Seeed
SenseCAP T1000-E, over Bluetooth, through the board's bootloader. It also redraws the screen: five
pages and a menu in place of nine pages in a row, and a layout of its own on the T114's colour
panel. A board without a screen now pairs with 123456 until a phone sets its own passkey.

It is an alpha. The protocol is a draft and will change, and a later build may not talk to this
one or keep its sessions. Nobody outside the project has reviewed the cryptography. Do not rely
on it for anything that matters.

What changed

  • nRF52840 boards updated over Bluetooth. Such a board has room for one image, not two, so it
    cannot take an update over its companion link as an ESP32 board does. A client now asks it to
    restart into its bootloader (companion version 12, UPDATE_BOOTLOADER), and the bootloader takes
    the new image over Bluetooth. The release carries a DFU package, tern-<board>-<region>-<version>.zip,
    next to each .uf2, and tools/companion.py update <package>.zip does the whole update from a
    computer. It takes four to six minutes, and the board keeps its address, sessions, contacts,
    groups, messages, settings and paired phones.
  • Only with the OTAFIX bootloader. The board offers this only if its bootloader is the
    OTAFIX build of Adafruit's nRF52 bootloader, which the Heltec T114 ships with. The T1000-E's stock
    bootloader accepts the start of an update and then never answers; install OTAFIX on it once over
    USB (ports/nrf52/README.md says how). INFO's new update field tells an app which way a board
    is updated: over the link, by its bootloader, or neither.
  • The screen. A press goes round five pages, Home, Messages, Nearby, My code and More, with dots
    saying which is shown; a hold on More opens a menu of the rest. The T114 draws in its own
    layout, with smooth type and icons, the battery, a phone and new messages at the head of every
    page, and signal bars on Nearby. This node no longer shows the address as sixty-four hex digits.
  • Pairing a board without a screen. It pairs with 123456, as on its stock firmware, until a
    client sets its own passkey; SELF says which it pairs with (companion version 11).
  • The Bluetooth name. A board that sends cards advertises as its card name.

First contact, sessions, messages, groups, positions, cards and routing are unchanged on the air
from 0.5.0-alpha.3. The companion protocol is now version 12; a client of version 10 or 11 still
works with it.

What was tested, and what was not

CI built every image of this release for every board and region, and ran the firmware test
suite, including new tests for UPDATE_BOOTLOADER and INFO's update. Before the release, a Heltec
T114 was updated over Bluetooth three times and a T1000-E, with OTAFIX installed, twice, each from a
Mac with tools/companion.py; each kept its identity, sessions, contacts and messages. A T1000-E
with its stock bootloader failed every time, as described above, and was restored over USB. A
build of the Android app from ternmesh/android#28 also updated the T1000-E from a Pixel 7, in about
eight minutes from start to the node running the new release, and reconnected to it without pairing
again. The new screen was run on a Heltec T114, V3 and V4. The phone apps' support for updating an
nRF52840 board comes in their own releases. The images have not been run on every physical board as part
of this release.

Updating

An ESP32 board on 0.2.0-alpha.1 or later takes this release over the link once ternmesh.org lists
it, and keeps its saved state:

tools/companion.py --port <port> update tern-heltec-v3-<region>-0.6.0-alpha.1-app.bin

An nRF52840 board on an earlier release needs this one installed over USB once: put it in its
bootloader, by pressing RST twice or by opening its port at 1200 baud, and copy the matching
.uf2 to the drive that appears. From then on, if its bootloader is OTAFIX, it can be updated
over Bluetooth:

tools/companion.py --port <port> update tern-heltec-t114-<region>-<version>.zip

For a new node, or to start a board afresh with a new address, write the full image at 0x0 on
an ESP32 board, or copy the .uf2 on an nRF52840 board. Never power a board with nothing on the
antenna connector. SHA256SUMS has the SHA-256 of every image and package.

What to know

  • An update is not signed. Anyone who has paired with a board can give it firmware, or turn
    it off, as they can change its region. That now includes restarting an nRF52840 board into its
    bootloader, where anyone in range can send it firmware while it waits there.
  • Saved messages and keys are not encrypted, a group's secret among them. Anyone holding the
    board can read them, and the cards it has heard.
  • A join code is a group's secret. Share it as you would the group itself.
  • A card is public. Its name goes to every board within two hops, unsealed, and a board that
    sends cards now advertises it over Bluetooth too.
  • The rules are yours to keep. The regions follow each country's rules as written, but
    nothing here is certified, and whoever operates a radio answers for it.
  • The classic ESP32 boards are short of memory. The Heltec V2 and V2.1, LilyGo T-Beam, and T3
    V1.6.1 have about 900 bytes of static RAM to spare in this build.