Browse by type
AMMB is a flexible and robust software bridge designed by Akita Engineering to facilitate seamless, bidirectional communication between Meshtastic LoRa mesh networks and external systems via Serial or MQTT.
This bridge enables interoperability, allowing messages, sensor data (with appropriate translation), and potentially other information to flow between Meshtastic and devices connected via Serial (like MeshCore) or platforms integrated with MQTT.
config.ini. Includes raw_serial and companion_radio handlers for MeshCore Companion Mode (Binary + framed USB protocol). git clone https://github.com/AkitaEngineering/akita-meshtastic-meshcore-bridge.git
cd akita-meshtastic-meshcore-bridge
python -m venv venv
source venv/bin/activate # or .\venv\Scripts\activate on Windows
pip install -r requirements.txt
Copy examples/config.ini.example to config.ini and edit it.
EXTERNAL_TRANSPORT = serial and SERIAL_PROTOCOL = companion_radio.Optional companion settings in config.ini:
- COMPANION_HANDSHAKE_ENABLED = True (send initial device query/app start)
- COMPANION_CONTACTS_POLL_S = 0 (poll contacts/adverts; 0 disables)
- COMPANION_DEBUG = False (enable raw byte logging)
- SERIAL_AUTO_SWITCH = True (auto-switch between json_newline and raw_serial on repeated decode failures)
- MESHTASTIC_CHANNEL_INDEX = 1 and MESHCORE_CHANNEL_INDEX = 2 e.g. only bridge messages from Meshtastic channel index 1 to/from MeshCore channel index 2
- Companion device info, self info, contact sync, and adverts are decoded into structured events and surfaced in the sync logs and the terminal command center log tail
EXTERNAL_TRANSPORT = mqtt and configure broker details. Optionally enable TLS/SSL for secure connections.MeshCore observer firmware (for example observer.gessaman.com) publishes LetsMesh PACKET JSON on meshcore/{IATA}/{device_id}/packets. The bridge accepts that format on MQTT_TOPIC_IN (wildcards such as meshcore/+/+/packets work). Group-channel text is decrypted with the MeshCore Public key plus any extra keys you configure. Set MQTT_PAYLOAD_FORMAT = observer to publish Meshtastic text as hashed MeshCore GRP_TXT packets that MQTT clients understand. mqtt.rx=true on the observer uplinks RF to MQTT; it does not by itself TX AMMB JSON onto LoRa.
API_ENABLED = True and configure API_HOST and API_PORT to enable the monitoring API. Set API_TOKEN if the API is reachable beyond localhost.Preflight check (recommended before field use): python run_bridge_tui.py --check
Show effective config without secrets: python run_bridge_tui.py --print-config
Production / headless (recommended): python run_bridge.py
Full-screen terminal command center: python run_bridge_tui.py
Async wrapper (same production bridge, optional in-process API): python run_bridge_async.py
The command center uses the same config.ini as the synchronous bridge and adds:
- preflight diagnostics with actionable dependency, config, serial, MQTT, and API warnings
- config selection via --config /path/to/config.ini or the AMMB_CONFIG environment variable
- redacted config inspection with --print-config
- live bridge state, queue depth, and connection visibility
- a full-screen health and metrics dashboard
- recent events and a scrolling log tail
- keyboard shortcuts: S start/stop, R restart, M reset metrics, P pause logs, C clear logs, Q quit
- crash reports written to ammb_tui_crash.log if the dashboard hits an unhandled startup/runtime exception
Use run_bridge.py under a process manager for unattended production. Use the command center when an operator is present. run_bridge_async.py runs the same bidirectional bridge and can host FastAPI in-process so /api/* sees live metrics.
Both run_bridge.py and run_bridge_async.py accept --config and honor AMMB_CONFIG.
Endpoints are available on the configured API host/port (default: http://127.0.0.1:8080):
GET /api/health — Health status of all componentsGET /api/metrics — Detailed metrics and statisticsGET /api/status — Combined health and metricsGET /api/info — Bridge informationPOST /api/control — Control actions (e.g., reset metrics)Example: curl http://localhost:8080/api/health curl http://localhost:8080/api/metrics
This project is maintained by Akita Engineering.
This project is licensed under the GNU General Public License v3.0.
(See the LICENSE file for the full license text.)
$ claude mcp add Akita-Meshtastic-Meshcore-Bridge \
-- python -m otcore.mcp_server <graph>