04 / GPIO & SENSORS

GPIO firmware

MOVETAIN GPIO_v2 · Based on Meshtastic · GPL-3.0

Why GPIO_v2 exists

A Meshtastic-based build for controlling outputs and receiving sensor events in MOVETAIN. It retains standard Remote Hardware and adds MDS2 binary sensor events, event identity, bounded retries and portal receipts.

One gpio channel for equipment

Create one enabled private channel named gpio. Both Remote Hardware and our Detection Sensor use it. Match its key on the GPIO node, receiving gateway and room Equipment settings. Frequency and modem preset must also match. Keep the primary channel for chat: gpio need not be primary and does not replace all other channels.

Compared with stock Meshtastic 2.7.15, the base of this build. Other versions may differ. Remote Hardware must be included in the firmware build.

FeatureMeshtastic 2.7.15MOVETAIN GPIO_v2Practical result
Control channelRemote Hardware already uses gpio.The same gpio channel and standard Remote Hardware protocol.GPIO control remains compatible.
Sensor channelDetection Sensor uses the primary channel; sending is blocked with the default public channel.Detection Sensor uses the same private gpio channel as Remote Hardware.One equipment channel instead of separate channel rules for the two modules.
Primary chatSensor setup may require changing the primary channel.gpio can remain a secondary channel; no primary-channel change is required.Keep the usual chat channel. Other channels are not removed.
Keygpio and the sensor primary channel are configured separately; keys depend on the setup.One private gpio key for Hardware and Sensor, matching on the node, gateway and room Equipment.Fewer settings to match. A generated key must still be configured on the other participants.
EventsText messages describing detection and state.Binary MDS2: node, GPIO, event identity, state and event time when a clock is available.The portal distinguishes triggers from state reports and recognises redelivery.
Delivery acknowledgementStock Sensor sends with want_ack=false; there is no MOVETAIN portal receipt.A portal receipt for a specific event, with bounded retries if missing.Event reception can be acknowledged. This adds protocol traffic and cannot guarantee delivery through every outage.
ApplicationsStock Sensor messages are intended for native Meshtastic clients.Native apps can configure the module, but MOVETAIN processes the binary Sensor events.Integration with portal Equipment, history and alerts; the stock Sensor journal is not MDS2-compatible.

Example: Remote Hardware controls an LED on GPIO8; Sensor watches a button on GPIO20. Both use one gpio channel and key, but each pin belongs to only one module. If gpio or a valid private key is missing, our Sensor does not silently fall back to a public channel.

Meshtastic 2.7.15 · Detection Sensor · Meshtastic · Remote Hardware · GPIO_v2 · Sensor implementation

Compatibility and differences

Remote Hardware uses the standard Meshtastic protocol. Native apps can configure the modules. Our Detection Sensor events are intended for MOVETAIN; the stock Meshtastic sensor journal does not understand this format. Relay nodes do not need our sensor UI to forward packets; normal mesh constraints still apply.

What receipts do and do not prove

A portal receipt acknowledges a specific event. Retries are bounded, with no endless request loop. Disconnections and queue overflow remain possible. Periodic state reports do not replace ACKs. The last Inactive report does not prove there is no motion now: check reception time and freshness.

Supported hardware

nRF52840 ProMicro DIY TCXO with the nrf52_promicro_diy_tcxo profile. The HT-RA62 illustration is not a wiring diagram; appearance alone does not prove compatibility. This is not Heltec/ESP32 firmware or a Wi-Fi/WSS gateway. The GPIO node communicates over LoRa; the portal receives data through its configured transport.

First installation or replacing firmware

Direct installation from the portal and USB setup require desktop Chrome or Edge. Open the wizard, confirm the model, double-press Reset and select the UF2 drive (for example NICENANO). The wizard downloads and checks the image. In Firefox, download the verified UF2 and copy it to that drive manually. A compatible UF2 bootloader is required; a fully erased board needs separate bootloader recovery. Back up settings before replacing firmware. Read the version over USB after restart: copying alone does not prove the application started.

Settings and the gpio channel

The wizard reads names, LoRa, Bluetooth, channels and modules. Changes require review and confirmation, followed by fresh readback. Use the same private gpio key on the node, gateway and room Equipment settings. A generated key is not automatically shared. The primary channel is preserved. Do not assign one pin to both enabled Remote Hardware and Detection Sensor.

Sensor modes and intervals

Either High/Low reports state transitions. Rising/Falling marks the selected edge: an event, not a persistent state. High/Low alerts on the selected level. Match the portal constructor mode to the node. The minimum interval limits alerts; the separate state interval schedules periodic reports. For a new sensor the wizard suggests 60-second state reports; 0 disables them. Increase the interval for slow or busy networks. Existing settings are preserved.

Meshtastic, GPL and source

GPIO_v2 is a modified Meshtastic build, not a separate radio-network protocol. Upstream attribution is retained. Firmware source is distributed under GNU GPL v3; third-party component licences remain applicable. The links below point to the published release source revision and full licence.

Source / Исходники · GNU GPL v3 · Meshtastic upstream