Repository navigation
LibreTag 0.12.0 (first public release, preview)
First public release. This is a preview: it runs on the developer's tags and on the bench, battery life has not been measured yet, and some paths are marked as untested in the notes below.
Android app signing certificate SHA-256: 79750fb49349ec3729be5a3e825507a15e47c6d987e854ae91d5d50a20b3a24d. Checksums of all files are in SHA256SUMS.
Website: https://cypherpunk.today/libretag/ · Web app: https://cypherpunk.today/libretag/app/
LibreTag Android app 0.12.0 (first public release, preview)
The LibreTag app pairs tags over USB, shows where they are on a map, and sends them commands. It talks to the MeshCore network through your own node in MeshCore Open, and it also fetches reports and sends commands over Nostr relays, so a tag can be found outside the range of your own radio.
Signing certificate SHA-256: 79750fb49349ec3729be5a3e825507a15e47c6d987e854ae91d5d50a20b3a24d. Android 8.0 or newer.
What it does
- Pairing in four steps over a USB OTG cable: plug in, name, where the tag usually rests, done. The app reads the key, sets the radio and your Nostr npub, and locks the tag. From then on the key exists only in the app.
- Map and history (OpenStreetMap): the last position, the next expected report, a timeline you can scrub, GPX and CSV export.
- Commands: Lost (every 10 min for 24 h), Track (every 2 to 30 min, for 30 min to 24 h; one tap tracks for an hour every 5 min, and the dialog warns when a choice would hit the tag's daily transmission limit), Beep, stop, a Bluetooth scan, and opening the tag's Bluetooth console remotely. The app picks the route: its own radio, the Nostr mailbox for any bridge, or a Bluetooth advert when the phone is near the tag. It shows when a command went out and when the tag confirmed it.
- Places: GPS places tapped on the map, and Wi-Fi places for tags without GPS. The tag stays quiet inside a place. Each place can notify you when the tag leaves or arrives.
- Quiet near your devices: pick your ring, watch or other Bluetooth device from a scan, and the tag stays quiet while it is near.
- Position without GPS: an area (68 % and 95 %) from the repeaters the tag heard and a downloaded repeater map (about 60 MB, kept on the phone; the app never asks a server where a repeater is). Wi-Fi reports can be looked up through BeaconDB, the GrapheneOS proxy or Apple, only when you choose.
- When a tag is late: the app says the most likely reason in one sentence and shows what it is based on. It can see that the tag is in update mode on the cable, that it keeps restarting, that the phone itself is offline, that a bridge heard a report that never reached your relays, that the battery is probably empty, or that the schedule differs between the tag and the app. Each reason comes with the one action that settles it, such as "Check if it's here" over Bluetooth, "Finish the update" or "Add relay", and "All checks" lists everything the app looked at. One missed report on a shared mesh no longer counts as silent: an unguarded tag is reported silent after the second missed report. A guess (the tag may be quiet near you) never turns a warning off; only evidence does.
- Notice my tags over Bluetooth (Settings, on by default, Android 12+): a low-power background scan notices when one of your tags restarts near the phone. It needs no location permission.
- Alerts: not heard when expected, low battery (25 % in the app and as a Nostr DM; below 10 % the tag sends the DM itself), Lost mode, and Guard (the tag moved more than 300 m).
- Key backup: a 12-word recovery phrase, plus a copy encrypted to your npub on Nostr relays. The web app can restore from either.
- Firmware update of a Wio tag over the USB cable.
- English, Slovak, Czech, German, Spanish and Dutch.
What you need
- A tag with LibreTag firmware 0.9.0 or newer (0.9.4 recommended: it marks the first report after a restart).
- For the "own node" path: a MeshCore companion node and MeshCore Open with the Local API. Today that is the fork build at https://github.com/jooray/meshcore-open/releases/tag/localapi-test-9. The changes are proposed upstream in zjs81/meshcore-open pull requests #619, #628 and #670. Without it, the app still works over Nostr through public bridges.
Upgrading from earlier test builds
0.11.0 introduced the signed mailbox. Tags on firmware before 0.9.0 send reports this app cannot open; update them over USB from the tag's Service screen.
Known limits
- The phone's Bluetooth command advert has not been tested on air against a tag, nor has the extra advert for a report the phone may have missed.
- Restarting a Heltec ESP32 tag out of its download mode from the phone, and recognising that mode over the cable, have not been tried on hardware yet.
- No reproducible build yet. Check the certificate above before installing.
LibreTag tracker firmware 0.9.4 (first public release, preview)
The tracker firmware is a tracker role for ZephCore, the Zephyr port of MeshCore. The tag sleeps, wakes about once an hour, takes a GPS fix and sends one encrypted 45-byte report into the MeshCore network on the #libretag channel. After the report it listens briefly for a command from its owner. Nobody but the owner can read the report: it is sealed with keys made at pairing, and the tag carries no permanent MeshCore identity.
This is a preview. It runs on the owner's tags and on the bench, but battery life has not been measured, and some paths below are marked as untested.
Hardware
- Seeed Wio Tracker L1 / L1 Pro (nRF52840, SX1262, GPS). This is the main target.
- Heltec Wireless Stick Lite V3 (ESP32-S3, SX1262, no GPS). Bench only: it knows it is at home from the Wi-Fi networks it hears, and its reports carry Wi-Fi networks instead of a GPS fix.
What it does
- Reports every hour (±10 %), with the GPS search capped at 90 s. TRACK mode reports every 2 to 30 minutes for an hour, LOST mode every 10 minutes for 24 hours, and LOST survives a restart.
- Stays quiet when nothing needs saying: inside a home zone (a GPS circle or a Wi-Fi place), while one of the owner's Bluetooth devices is near, or when it has not moved. It still sends a heartbeat at least every 24 hours, and without a fix it always reports.
- Checks for commands between reports: at each wake-up it listens on the radio, and since 0.9.3 it also runs a 1.5 s Bluetooth scan for a command advertised by the owner's phone nearby.
- Reports without GPS carry up to five repeaters it heard and the last fix with its time, so the app can draw an area instead of a point.
- Picks the radio settings by country after each fix (SK, CZ, HU, NL, PT, CH presets, EU/UK Narrow elsewhere). Near a border it sends a second copy to the neighbouring network, but only when the home network is quiet.
- Sends a Nostr direct message to the owner when the battery falls below 10 %, signed by the tag's own key and carried by any bridge. At 25 % the app sends the alert.
- Caps its own airtime: at most 200 floods a day, at most one report per 120 s in TRACK and LOST, and no transmission below 3250 mV.
- After pairing, the USB console is locked: the key has left the tag, settings need the app's challenge and response. For 3 minutes after a boot the console is also reachable over Bluetooth with sealed frames, and the owner can reopen that window remotely with the
BLE_CONSOLEcommand (0.9.2).
Changes in 0.9.x
- 0.9.4: the first report after a restart is marked as such. Without a GPS fix it also carries why the tag restarted (reset button, power, a software reset, brown-out, watchdog or a crash) and how many times in a row it has restarted. The app uses this to tell a restart apart from lost reports.
- 0.9.3: every wake-up looks for the phone's command advert, including the listen-only wake-ups between reports.
- 0.9.2:
BLE_CONSOLEcommand (opcode 0x06) opens the Bluetooth console window. - 0.9.1: a reset by the owner (button, power-on, USB serial,
reboot,dfu) no longer counts as a reset loop. - 0.9.0: report sealing v2. Reports commit to the mailbox key of their counter, so bridges only deliver commands signed for that report. Apps before 0.11.0 and bridges before 0.5.0 (Python) or 0.4.0 (Android) cannot handle these reports.
Install
See "Installing the tracker firmware" in README.md: UF2 drag-and-drop or serial DFU for the Wio Tracker L1, esptool for the Heltec. The app can also update a Wio tag over the USB cable.
Known limits
- Battery life is an estimate (
uv run libretag energy), not a measurement. - Physical access to the tag gives access to its keys: APPROTECT is off and the bootloader accepts unsigned images. Zones and the last position are stored in plain form on the tag.
- Not tested on air: the phone's command advert (0.9.3), and the Heltec's command scan.
- The boot report (0.9.4) has only been tested against the reference vectors so far, not on a tag.
Source
ZephCore commit da3513aa6d08 (pinned in firmware/zephcore.lock) plus the 40 patches in firmware/zephcore-patches/. Licences of the bundled code: THIRD_PARTY_NOTICES.md.
Nostr bridge for Android 0.4.0 (first public release, preview)
The Nostr bridge (app.nostrmesh) turns a phone with MeshCore Open into a MeshCore to Nostr bridge. The radio stays in MeshCore Open and chat keeps working; the bridge uses its Local API.
What it does
- Radio to Nostr: LibreTag reports and Bluetooth packets from
#libretaggo up as kind 4243. The bridge cannot read them; it signs each event with a fresh random key and skips what is already on the relays. Roadstr road reports and messages from registered devices go up too, and low-battery DMs from any tag reach the owner's inbox relays. - Nostr to radio: commands from the LibreTag mailbox (kind 4244). Since 0.4.0 the bridge only sends entries signed with the key the tag's own report committed to (the signed mailbox, PROTOCOL.md 4.2), so a stranger cannot make it transmit. The bridge that heard the report directly sends zero-hop; others flood. DMs to registered devices are off by default.
- Staying up: an outbox that survives restarts, a radio watchdog after 30 minutes of silence, an hourly
status.jsonheartbeat, and a limit of 10 uplinks per minute per first hop on#libretag. - A bridge identity, announcements and optional "heard" receipts (kind 38244, off by default).
What you need
MeshCore Open with the Local API (fork build https://github.com/jooray/meshcore-open/releases/tag/localapi-test-9; upstream pull requests zjs81/meshcore-open #619, #628, #670) and a companion node.
Install
Download nostrmesh-bridge-0.4.0.apk from the release, check the certificate with apksigner verify --print-certs, install, then turn on the Local API in MeshCore Open and the switch in the bridge. MeshCore Open asks you to allow it and to add the #nostr and #roadstr channels.
Compatibility
Needs tags on firmware 0.9.0 or newer and the app 0.11.0 or newer for commands. Version 0.4.0 removed the older mailbox format and the proof of work.
Python bridge 0.5.0 and tools (first public release, preview)
The bridge announces itself as version 0.5.0 (BRIDGE_VERSION, the signed mailbox level), the same as the Python package.
host/ holds two command-line tools, run with uv from the repository:
nostrmesh: the MeshCore to Nostr bridge, the reference for the Android bridge.libretag: the reference implementation of the LT2 protocol, a tracker simulator, a base station, a battery estimator and the test vector generator.
The bridge
- Connects to its own MeshCore node over USB (companion protocol), to a KISS modem, or to MeshCore Open's Local API on a phone (
adb forward tcp:8787 tcp:8787). - Publishes LibreTag reports and Bluetooth packets as kind 4243, Roadstr road events, and messages and low-battery DMs from registered devices.
- Sends LibreTag commands from the signed Nostr mailbox (kind 4244): only entries signed with the key the tag's report committed to, zero-hop when it heard the tag directly, timed entries at the tag's next check.
- Optional: a bridge key with announcements and receipts (kind 38244), and relays to mesh DMs for registered devices (off by default).
- Airtime budget for the node's radio preset, per-first-hop limits, watchdog exit codes for a supervisor.
Run it
cd host
uv sync
cp bridge.example.toml bridge.toml # port, relays, region; [downlink] and [registry] optional
uv run nostrmesh listen -p /dev/ttyACM0 --add-channels
uv run nostrmesh run -c bridge.toml
As a service: host/deploy/nostrmesh.service (systemd user unit) or host/deploy/local.nostrmesh.plist (launchd). Steps in docs/nostr-mesh-bridge.md, section 8.11.
Requires Python 3.11 or newer and uv.