TL;DR
- The mesh is MeshCore, not Meshtastic (ADR 0011). Still my own firmware, not a fork: MeshCore's protocol core is vendored as a library, about 3,500 lines, on my own radio service.
- M4, listening (v0.26.0): a Mesh Service in the background, a node list whose adverts are signature-checked, Public, hashtag and private channels, history on the card, and a Mesh App.
- M5, sending (v0.27.0): Settings → Mesh is Off, Listening (the default) or Sending. Sending makes the device's own Ed25519 key, advertises it, posts on channels and sends private messages that come back delivered, or failed after three tries.
- 10% of any hour, at +22 dBm, at most. Checked against the regulation itself, enforced in the radio service, and guarded so that a release can't be built with anything else.
- SSH got 90.7 KB smaller on the way, because libssh and MeshCore now share one Ed25519.
- Things went wrong in public: a screen that turned 90°, two new builds that crashed and rolled themselves back, one trip to Safe Mode, a stack smashed by a library talking to its own twin, and a retry loop that took the free memory down to 2.7 KB.
- 764 host tests, two releases, one desk.
The cast
- MeshCorethe mesh people around here actually run
- A LoRa mesh with repeaters, signed adverts and private messages that come back acknowledged. MIT-licensed. Heard by this device within minutes, where Meshtastic was heard for zero minutes in an hour.
- The Heltec V4the second node, at last
- Running MeshCore's own companion firmware, driven from MeshCore's phone app. Every test in this post was checked against it. It has no battery, so it never left the desk, and neither did the range test.
- libsodiumlinked twice, on purpose and by accident
- Once from WireGuard's library, once from ESP-IDF. Both are fine on their own. Together they disagree by a few bytes about how big a SHA-512 state is, and one of them got to write it.
- The 10%ERC/REC 70-03, Annex 1, band h1.7
- 869.4 to 869.65 MHz: 500 mW, and at most a tenth of any hour on the air. 360 seconds. MeshCore's own default would allow half. In this firmware it is a constant, and a release that changes it doesn't compile.
- RadioLib's transmit()fine five times, then not
- Sent a packet and waited for the radio to say it was done. One time in six to twelve, the radio never said, and the evidence was cleared on the way out.
A month of silence, then a change of mind
The radio milestone ended with an hour outside, listening on Meshtastic's LongFast, and zero packets. Its rule was that the next milestone would wait for a Meshtastic node of my own.
Before buying one, I tried MeshCore's European setting in the Scanner: 869.618 MHz, 62.5 kHz wide, spreading factor 8. Two packets in four minutes. Not many, but two more than LongFast had managed in an hour. Somebody in Brussels runs MeshCore, and nobody near me runs Meshtastic, or not loud enough for a receiver that is 15 dB deaf from its own electronics.
The plan from the first post said "a Meshtastic-compatible messenger". A messenger for a network nobody nearby uses is a messenger with nobody to talk to. So the first decision of the day replaced that line: MeshCore is the mesh, Meshtastic stays as a preset in the Scanner. And a Heltec V4, flashed with MeshCore's own firmware, became the second node on the desk.
Not a fork, a library
The first ADR said "own firmware, not a fork", and that still holds. But writing MeshCore's routing, path learning, acknowledgements and pacing from scratch, then hoping they match the real network, is a way to spend a month finding out what everyone else already agreed on.
So MeshCore's protocol core is vendored at a pinned commit, unchanged: the dispatcher, the mesh, packets, identities, the chat layer. About 3,500 lines, MIT. Its hardware hides behind a few small interfaces (a radio, two clocks, a random source), and those are mine, on top of the radio service from M3. Upstream's files have no changes. What it builds with does: a port/ folder stands in for the three libraries it expects, using my own SHA-256 and AES-128, and libsodium for Ed25519.
That last one had a side effect. libssh carries its own Ed25519, with the same function names as libsodium's, and the linker refuses two of each. libssh's copy went, libssh uses libsodium's now, and the firmware lost 90.7 KB, mostly a 109 KB table libssh kept for itself. My SSH key still logs in. I checked, against a real server, before believing it.
Designed by interrogation, all day
Thirty-two decisions, Q287 to Q318, each with a recommended answer to accept or overrule. Most were accepted. A few weren't, and the best ones came from measuring:
- How many nodes to keep in memory was 100 in the morning, 50 after the first measurement (100 would have been 20 KB, not the 10 I'd guessed), and 24 after the second (the mesh, the VPN and IRC on TLS didn't fit together).
- When the device may transmit got a third answer. "Once the region is confirmed" would have made every updated device start talking by itself. So Settings → Mesh has three values, and Listening is the default: nothing goes on the air until you choose Sending.
- Where an advert says you are is nowhere by default. Opting in gives exact, or rounded to 0.01°, about a kilometre. An advert travels far, and every node that hears it keeps it.
- Transmit power is +22 dBm, the chip's most, because a receiver that is already deaf shouldn't also whisper.
Listening (M4)
A Mesh Service runs in the background while Mesh is on. It reads what the radio service hears on MeshCore's setting and hands it to the vendored chat node, which does the hard parts: it checks every advert's Ed25519 signature, drops replays and copies, keeps the most recently heard nodes, and decrypts the channels it follows. The Scanner and the mesh share the radio: on the same setting they hear the same packets, and when the Scanner wants another setting, the mesh pauses and says so.
The first real advert from the Heltec arrived at -34 dBm, SNR 13.2, which is what a metre of desk sounds like. Its messages came through on Public, on a hashtag channel (whose key is worked out from its name, the way MeshCore's app does it), and on a private channel whose secret I typed in. They are now host tests, five packets from a real node, minus its adverts, since those say where it is.
L says something is unread, whatever App is open.The 10%, from the text itself
The band MeshCore uses here is 869.4 to 869.65 MHz. I had a figure from memory: 500 mW, 10%. The first step of M5 was to read it where it is written, in ERC Recommendation 70-03, edition of February 2025: Annex 1, band h1.7, 500 mW e.r.p., "≤ 10% duty cycle or LBT+AFA". Appendix 5 says how it is counted: transmitting time over observation time, and "unless otherwise specified, Tobs is a continuous one hour period". So, 360 seconds in any hour.
MeshCore's own default allows 50%. That isn't a mistake on their part: one firmware runs everywhere, and each operator is expected to set it for their region. Here it's set once, for everyone:
MESH_AIRTIME_CAP_PERMILLEis 100, a build-time constant. No setting, no file, no console command changes it.- The radio service counts the last hour in 60 one-minute buckets (240 bytes) and refuses whatever would go past it. It may count a minute too many, never too few.
- MeshCore's pacing factor is derived from it: after sending for T, wait 9T. So MeshCore slows itself down long before the hard limit is reached.
- A release is built with
RORO_RELEASE_BUILD, and with that flag any other cap is a compile error. CI checks that the guard still guards.
A development build has 0.1% instead, 3.6 seconds an hour, to see the limit reached in six packets rather than six hundred. The App then says how long to wait:
First words, to myself
The first transmission was 53 bytes on my private test channel, routed direct with an empty path, so no repeater would pass it on, and the only node that could read it was the Heltec. Not on Public, where the first words of a new device would go to strangers. It read: "Cardputer: first words on the air". The phone app showed it. The device had transmitted for 0.6 seconds, after a month of only listening.
Then the device made its key, and its first advert went out zero-hop: heard only by nodes in direct range. The Heltec listed "roro9stack proto" as a contact. With Mesh position set to Rounded, the next advert waited for a GNSS fix, sent a position rounded to two decimals, and the Heltec put the contact on its map, a few hundred metres off, on purpose.
Delivered, failed, delivered
A private message in MeshCore is encrypted to one node and expects an acknowledgement back: four bytes of SHA-256 over the message and the sender's key, which only the real recipient can compute. The first one goes everywhere (flood); its acknowledgement comes back with the way back, and the next ones go straight there.
MeshCore leaves retries to the application, so the node keeps one private message in flight at a time, up to three attempts, flood after a direct one fails. There is one trap in upstream's loop: it clears its single send timer after calling back into my code with an acknowledgement or a timeout. Send the next message from inside those callbacks, and its timer is wiped before it starts. So the callbacks only write down what happened, and the loop sends afterwards.
Two nodes talking through a link the test controls caught the other trap before the device did: when acknowledgements are lost, every retry is a new packet, and the receiver showed the same message three times. It shows it once now, and still acknowledges each copy.
Then I unplugged the Heltec and sent another. Three attempts, about thirty seconds, then:
What went wrong
The screen turned sideways. After the first new build, the display was rotated a quarter turn, and stayed that way after a restart. Nothing in the firmware rotates the screen. My machine had no build folder, so the first build fetched the newest display library, 0.3.0, where every release had used 0.2.33. The board's library asks for "any version" of it. Both are pinned now, and the screen is the right way up.
libsodium had nowhere to get random numbers from. Its first sodium_init() reads /dev/urandom, which an ESP32 doesn't have, and aborts. The device rebooted, saw that a firmware still on probation had crashed, and went back to the previous one by itself. libsodium now gets the chip's hardware generator at boot.
Two libsodiums, one struct. The first advert crashed with "stack smashing protect failure" in my own signing code. The firmware links two libsodiums, and ESP-IDF's computes SHA-512 with mbedTLS, whose state is larger than the header I compiled against declares. My code kept that state on the stack, their code filled it, and the canary behind it died. That build rolled itself back too. Signing now hashes in one call, so the state lives inside the library's own function.
A key check too deep for the stack. mesh status re-validated the stored key with MeshCore's own test: two key exchanges, each with deep curve arithmetic. Called from inside a console command, it overflowed the main loop's 8 KB stack. Three status commands in a row, three crashes, Safe Mode: the device stops starting what keeps crashing and waits for an update, which came with the fix. A key already checked isn't checked again now, and making one runs on its own task with its own stack.
Started in the wrong place. Even without that, starting the mesh inside setup() left 536 bytes of the main loop's stack, against 1,796 when started a moment later. It starts a moment later.
A retry loop. With IRC on TLS taking most of the memory, the mesh couldn't start, and tried again every 100 ms, saying so each time. Free memory went down to 2.7 KB. It now waits 30 seconds between tries and says so once.
The radio that didn't say it was done. One transmission in six to twelve timed out: the chip never raised "sent", and RadioLib's transmit() cleared the flags that would have said why before returning. The radio task now starts the transmission and waits for it itself, a millisecond at a time. 40 out of 40 since. The cause isn't proven, so a failure now prints the chip's mode and error flags.
The screenshots tore, again. One conversation came out with its first and last lines cut in half. The screen was fine: the screenshot over Wi-Fi copies the frame while the main loop may be drawing it. The games post found the same. Three in a row agreeing is still the test.
What I checked, and what I didn't
Checked on the device, against the Heltec: its adverts and messages on Public, a hashtag channel and a private one; the mesh pausing for the Scanner and coming back; reading with the screen off and IRC connected; no card, and "not saved"; the first transmission; the device's advert, with and without a position; private messages delivered both ways, from the console and from the App; a message failing with the Heltec unplugged, and sent again; the 0.1% limit reached.
Checked on the PC, by 764 tests: RFC 8032's signatures through the port, the five packets the Heltec sent, two nodes delivering, retrying, failing and queueing, the airtime budget across the 49-day wrap of the millisecond counter, and the release guard.
Not checked: range, since the Heltec has no battery. A flood advert and posts on Public, which would make the device a visible node to everyone around; I'd rather do that on purpose than as a test. The key's export over USB. And memory with everything on: with Mesh on Sending, the VPN up and IRC connecting over TLS, free memory touched 4.5 KB once. It didn't crash. It is written down as a known risk, not a solved one.
By the numbers
| Releases | 2 (v0.26.0, v0.27.0) |
| Design decisions | 32 (Q287 to Q318) |
| MeshCore core, vendored | about 3,500 lines, 0 changed |
| Flash freed by sharing Ed25519 with SSH | 90.7 KB |
| The mesh's memory | about 16 KB |
| Nodes kept in memory | 24 (planned: 100) |
| Airtime allowed | 360 s in any hour |
| MeshCore's own default | 1,800 s |
| Transmit power | +22 dBm |
| First transmission | 53 bytes, 0.6 s |
| Attempts before "failed" | 3 |
| Builds that rolled themselves back | 2 |
| Trips to Safe Mode | 1 |
| Screens turned sideways | 1 |
| Host tests | 764 |
Where it stands
-
M0 and M1: the skeleton, Wi-Fi, IRC, Wi-Fi Tools.v0.1.0 to v0.2.1, the first post. -
Updates and debugging over the air.v0.3.0, Look, no cables. -
M2: GNSS.v0.4.0, Seventeen satellites. -
G1: Gemini.v0.5.0, A browser in the RAM IRC left over. -
M3: the LoRa radio, listening.v0.6.0, The loudest thing it hears is itself. -
S1: the card, fixed addresses, the System App.v0.6.1 to v0.8.1, One byte too early. -
F1 and the start of R1: files, notes, signed releases, updates from Gitea.v0.9.0 to v0.11.0, 836 bytes. -
W1: the website, and one firmware with the Debug Console in it.v0.12.0, It was off. -
A help key, the Shell, notes of any size.v0.13.0 to v0.15.0, It said "No". -
Pictures, a screenshot key, the card in a phone's browser.v0.16.0 to v0.18.0, Press w. -
A WireGuard tunnel, and nine commands for a bad network day.v0.19.0 to v0.21.0, Six releases behind. -
SSH, MeshCore in the Scanner, icons and themes.v0.22.0 to v0.23.0. -
A compass, updates that install themselves, and games.v0.24.0 to v0.25.0, Not finished until it plays Tetris. -
M4: the MeshCore mesh, listening.v0.26.0, this post. -
M5: the mesh, sending.v0.27.0, this post. -
Next: a battery for the Heltec and a walk, to find out how far a deaf receiver at +22 dBm reaches. Then M6: a repeater, a room server, and MeshCore's phone app driving the device.
A month ago the radio's best moment was proving that its silence was real. Today it said fifty-three bytes to a box on the same desk, and a little later, to a private message, the box answered "Cool man, received". Neither of them was far away, and both were mine. It still counts.