This commit introduces a `MAGIC_PREFIX` (`🌐 `) that is prepended to
every message forwarded from the internet (XMPP) onto the local
Meshtastic mesh.
The `on_meshtastic_receive` handler has been updated to ignore any
incoming messages on the mesh that start with this prefix. This
prevents multiple bridges running in the same physical mesh network
from continually forwarding the same message back and forth, creating
an infinite communication loop.
Co-authored-by: jamessucla <2191476+jamessucla@users.noreply.github.com>
This commit updates `bridge.py` to properly `await` the `join_muc_wait()`
coroutine instead of calling the deprecated `join_muc()`. This prevents
an unretrieved Task exception (`asyncio.TimeoutError`) from polluting
the logs or crashing the background task if the XMPP server is slow
or doesn't respond to the MUC join request in time.
Co-authored-by: jamessucla <2191476+jamessucla@users.noreply.github.com>
This commit adds a small tip to the README.md explaining how to
use `nix-shell -p git` to temporarily obtain git in order to clone
the repository on a completely fresh NixOS install that might not
have git in its system packages yet.
Co-authored-by: jamessucla <2191476+jamessucla@users.noreply.github.com>
This replaces the experimental flake-based Nix configuration with
a classic Nix setup (`default.nix`, `shell.nix`, `module.nix`)
per user request.
Changes include:
- Removing `flake.nix`.
- Creating `default.nix` to package the python bridge.
- Creating `shell.nix` for a reproducible development environment.
- Creating `module.nix` for the NixOS systemd service.
- The `module.nix` now uses systemd's `LoadCredential=` to safely
expose the XMPP password to the bridge daemon running as a dynamic
user, resolving permission issues.
- `README.md` instructions have been fully rewritten to focus on classic
Nix usage, answering user questions on secret management and repository
cloning structure.
Co-authored-by: jamessucla <2191476+jamessucla@users.noreply.github.com>
This updates the README to directly answer user questions regarding:
1. How to correctly provision the XMPP password file using standard Unix tools (or secret managers in production).
2. Updates the flake url alias to point to the actual repository name (`jshiffer/lora-xmpp-bridge`).
3. Adds explicit step-by-step commands on how to clone and run the bridge from a completely fresh NixOS install.
Co-authored-by: jamessucla <2191476+jamessucla@users.noreply.github.com>
This commit introduces a MVP for the sovereign computing hackathon. It
provides a Python-based bridge between a local Meshtastic node and an
internet-connected XMPP Multi-User Chat room.
Features:
- `bridge.py`: Uses `meshtastic` and `slixmpp` to bridge messages bidirectionally.
- Properly handles asynchronous/synchronous impedance mismatch between XMPP and serial interfaces.
- Avoids infinite loop echo chambers.
- `flake.nix`: Packages the Python script and its dependencies.
- Exposes a NixOS module for configuring the bridge as a persistent systemd service.
- Requires `--password-file` to prevent exposing XMPP passwords in process listings.
- `README.md`: Explains architecture, usage, and how to configure the NixOS module.
Co-authored-by: jamessucla <2191476+jamessucla@users.noreply.github.com>