LORA Tunnel installer

Release 0.6.1 · c45a40bd9a16

Meshtastic and MeshCore messaging

Wio Tracker L2 Pro uses the same messaging engine and touchscreen keyboard. WAKE moves focus, U/B selects, and holding U/B goes back. Wio setup and validation

LORA Tunnel 0.6.1 provides channel and private messaging on Heltec V4-R8 / Expansion Kit V2, Cardputer ADV + U214 and Wio Tracker L2 Pro. See the release notes for board-specific testing.

Open a chat on 0.6.1

Open Home → Messages or Wardriver → LoRa → Open Messages. On Cardputer, press C from Home or the LoRa tab. If capture is running, choose Stop + save capture, wait for the channel choices, then select one.

Choice Channel and radio
Meshtastic / LongFast public Standard LongFast public channel and key on the region's automatic LongFast slot. In the US this is 906.875 MHz, 250 kHz, SF11, CR 4/5.
Meshtastic / LongTurbo public Standard LongTurbo public channel and key on the region's automatic LongTurbo slot. In the US this is 908.750 MHz, 500 kHz, SF11, CR 4/8. A region needs enough bandwidth for this preset.
Meshtastic / saved channel Uses the saved preset, channel, key and slot.
MeshCore / saved channel Uses the saved MeshCore profile and group key. The default US profile is US-NARROW at 910.525 MHz, 62.5 kHz, SF7, CR 4/5. The default group is Public.

The public shortcuts last for the current chat session. One SX1262 listens to the selected network and preset while Messages is open. Match the second radio to the same profile and channel.

Channel messages appear on the chat screen as they arrive. Choose Write to compose. The first write asks permission to transmit before opening the keyboard. Send once or Enter queues the text. Tap a message to read it in full and reply. DMs shows one conversation per peer. Open a conversation and choose Reply or choose New DM to find a contact. The firmware checks the peer's current verified key before sending a private reply. On Cardputer the shortcuts are W to write or reply, D for DMs or channel, and O for options.

Return Home to keep the radio listening. Wardriver → LoRa then previews the latest channel message. During a drive the same area previews the latest decoded channel text from capture. Stop chat releases the radio for capture. Options → Change protocol or Stop messages / Home ends the current session and clears its in-memory history. Options also contains messaging settings, identity, key review and transmit controls.

Controls and configuration

The 0.6.0 Heltec and Cardputer releases use Messages → Inbox / sent messages, Write to channel and Contacts. Enable transmission in that menu before composing. Their Back control in the Messages menu stops the radio. Heltec and Wio use touch, and Cardputer uses its keyboard. All support 120 printable ASCII bytes per message.

Match the peer radio's region, modulation preset and frequency slot in Settings → Mesh radio / decode settings before opening Messages. A channel name/key and a radio preset are different settings. My identity / radio shows the current channel, radio profile and local public identity; none of these screens expose private identity seeds.

The messaging object in /lora-tunnel/config.json contains:

"messaging": {
  "name": "LORA Tunnel",
  "meshtastic_channel": "",
  "meshtastic_key_hex": "",
  "meshcore_key_hex": "",
  "hop_limit": 3
}
Setting Accepted value and meaning
name 1–31 printable ASCII bytes without a colon. Display names are not authenticated identities.
meshtastic_channel Up to 39 printable ASCII bytes, case-sensitive. Blank is AUTO: the selected preset's default channel name.
meshtastic_key_hex Blank selects the published Meshtastic default channel key. A custom key is exactly 32 or 64 hexadecimal digits. Blank does not select plaintext.
meshcore_key_hex Blank selects the published MeshCore Public group key. A custom key is exactly 32 or 64 hexadecimal digits.
hop_limit Integer 0–7 for Meshtastic. It does not change MeshCore routing.

These are independent from the receive-only decoder's lora.meshtastic_keys and lora.meshcore_keys lists, and from home Wi-Fi/upload credentials. Key editors always start blank, mask typed values, and explain that saving blank restores the public default. Saved custom channel keys are plaintext on the private SD card. Public source/starter packaging rejects any nonempty messaging key, including an explicitly expanded public key; leave both example fields blank.

TX permission is runtime-only and starts OFF for each messaging session and boot. Enable it through the separate confirmation screen before sending or announcing. Config files cannot authorize TX: imported enabled and tx_enabled fields are ignored by the firmware, and the public schema rejects true values. Switching protocol or stopping Messages clears transmit permission. With TX disabled the firmware does not send announcements, messages, retries or receipt replies.

Contacts, trust and delivery

The firmware keeps up to eight contacts shared between both protocols. An observed name or announcement does not establish who controls a device. Open a contact, compare its entire 32-byte public key with its owner through a trusted route, and explicitly confirm Review / trust public key. A changed key is shown as changed and blocks private composition until reviewed again. Trust/forget actions bind the displayed key as well as the slot, so a changed contact cannot silently reuse a queued decision. The key under review is frozen; a changed, removed or moved contact must be reopened before it can be trusted. Select the contact's protocol before composing privately.

Local Meshtastic/MeshCore identity material and contact/trust records use the application's lt-chat NVS namespace. They survive normal restarts and application changes that preserve NVS. They are private device data, not release artifacts; never publish a full-flash device backup as an installation image. Other applications' NVS namespaces are not used for messaging storage.

MeshCore group duplicates use the complete validated packet content in a 16-entry RAM cache. Different messages from radios sharing a display name or timestamp remain distinct. Repeater copies and echoes of successful local group transmissions are suppressed while their cache entries remain. This is bounded duplicate filtering, not authenticated or persistent replay protection.

The inbox is a bounded six-record RAM history, not a permanent message archive. Stopping Messages wipes its history and pending message state. A pending private message can occupy the single outgoing slot until receipt, timeout or cancellation; the firmware makes at most three attempts. The status text distinguishes:

Status Meaning
Queued / Sending Waiting for the radio or currently transmitting.
Sent (unconfirmed) The local channel transmission completed. No recipient delivery is established.
Waiting for receipt A private transmission completed and is waiting for a matching receipt.
Delivered A matching authenticated private receipt was validated. This does not establish that a person read the message.
Receipt (unverified) A matching legacy/unverified receipt was observed; it is not promoted to authenticated delivery.
Failed / no receipt A local failure or exhausted receipt attempts.
Cancelled Transmission permission or the pending operation was cancelled.

MeshCore sends and identity announcements require a fresh GNSS UTC time. The firmware refuses sends when that time is unavailable or inconsistent with its persisted timestamp history. Private MeshCore reception also requires valid GNSS UTC before acknowledging or advancing a saved replay watermark; channel reception and signed contact discovery remain available without UTC. Neither an empty location nor a clock failure is replaced with fabricated coordinates/time.

Troubleshooting and stock-peer compatibility

The LT CHAT_ACTION and LT CHAT_ENGINE serial diagnostics contain numeric action/state counters only, with no message contents, peer identifiers, channel keys or private identity keys. The action counters cover the entire UI queue. Engine counters survive leaving Messages and reset at boot: starts counts allocated sessions, including blocked identities; tx_enabled counts successful enable calls, including restores; rx_nodes counts identity frames rather than unique contacts; rx_receipts includes matched unverified receipts and routing errors; and tx_ok counts locally completed frames, including replies and retries. They help trace input and radio state but do not establish recipient delivery. Inbox contents still clear when Messages stops.

If storage becomes unavailable during Wardriver or Recon, the main task stops capture and drains its queues. It reports the log as incomplete instead of continuing to count unsavable records or reporting a successful save. The firmware does not automatically remount or restart capture. A later settings or messaging action can provide its own feedback; the capture-failure flag remains available in diagnostics until a new capture starts.

LT STORAGE reports only numeric failure data. failures counts detected logger/mount failures; reason, operation and error preserve the first failure until reboot, including across a manual remount. The reason identifies mount, missing card, session-directory, session-open, batch-write, batch-flush or session-close failure. The operation identifies the checked file operation and error retains its errno; APIs without a reliable errno report zero. capture_failed identifies the current capture's storage-failure latch. These diagnostics contain no filenames or session contents and cannot establish that earlier buffered records reached durable storage.

Radio and acceptance limits

The messaging transmitter uses 0 dBm raw SX1262 chip drive on both boards. The Heltec V4-R8 has an external KCT8103L PA and attenuation network: raw chip drive is not measured antenna-port power. Its PA output has not been calibrated for this release. The U214 follows its own TCXO/RF-switch setup and 868–923 MHz hardware range. The full occupied bandwidth must fit the configured region and board before the radio starts.

The current software policy keeps RU and unknown/unhandled regions receive-only. It enforces at least five seconds between user sends/announcements, a bounded outgoing slot, channel assessment, and airtime-derived spacing. EU_868/TH use a 10% spacing parameter; UA_868/MY_919 use 1%; other explicitly supported entries use 100%. Spacing debt survives mode changes but is RAM-only and resets at reboot; it is not a persistent rolling-hour airtime ledger. These values describe the implementation, not measured airtime utilization or a regulatory certification. They do not establish collision-free reception or successful delivery.

Independently recorded acceptance remains incomplete for final-image browser/Launcher installation, controlled Meshtastic and MeshCore channel/private exchanges, advert trust and receipts, changed-key rejection, restart identity/trust persistence, and sustained interactive operation on both boards. The preceding Heltec build completed receive-only mode transitions and automatically stopped after a write I/O error; one USB monitor was interrupted by a malformed status line. These observations and the owner's broader acceptance are recorded separately in 0.6.0 release notes. Keep test messages, channel keys and device backups private; local counters are not independent RF or recipient-delivery measurements.

Implementation provenance

SquachWatch-CYD at 35244470 was considered as a feature reference. LORA Tunnel's messaging UI, state handling and protocol adapters were implemented independently; SquachWatch GPL application source was not imported into this MIT project.

The MeshCore Ed25519 key-exchange/field-arithmetic primitive comes from MeshCore 75b04ef, lib/ed25519, originally by Orson Peters, under its permissive zlib license. Its unmodified source, retained license and provenance notice are included in source packages. Package validation requires both notices whenever that primitive source is present. Other dependency notices and relinking materials remain covered by THIRD_PARTY.md and RELINKING.md.

Reproducing the messaging host checks

The messaging tests require Python, a C/C++ host compiler, and the project's pinned Crypto/ArduinoJson dependencies installed by a firmware build. Meshtastic and engine tests also compile a portable Mbed TLS source tree. CI fetches official Mbed TLS v3.6.1 at commit 71c569d44bf3a8bd53d874c81ee8ac644dd6e9e3, verifies the checked-out commit, and stores it under the ignored build-output/host-deps/mbedtls-3.6.1 directory. This checkout is used only by host tests; it does not replace or modify the production ESP32 SDK.

Set MESSAGING_MBEDTLS_DIR to that checkout's absolute path, then run:

python tools/check_meshtastic_message.py
python tools/check_meshcore_message.py
python tools/check_messaging.py
python tools/check_messaging_radio.py
python tools/check_main_actions.py

An explicit --mbedtls-dir on the Meshtastic runner takes precedence over the environment variable. If neither is set, the tools look for an installed local ESP-IDF Mbed TLS 3.6 source tree. An invalid explicit path or environment setting fails instead of silently selecting a different dependency. The tools themselves perform no downloads or device operations. Radio tests simulate IRQ, bus and frontend behavior; they do not establish physical peer interoperability. The main-action runner compiles the real action callback/dispatcher with a deterministic queue and service fixture using the existing host compiler. It checks queue accounting, owner transitions, status visibility, mesh settings routing and unchanged-setting saves, without touching hardware, SD cards, serial ports or RF. It is also available through python -m unittest discover -s tests -p test_main_actions.py.