Skip to content

Rikonardo/meshmud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

meshmud 🌱

Meshtastic Multiplexer Daemon

A lightweight standalone service for using several Meshtastic apps/clients with a single radio. It also provides ability to convert between various connection mediums used in Meshtastic ecosystem.

Compatibility table

Uplinks are connections to the Meshtastic radio, downlinks are "virtual" Meshtastic nodes clients can connect to.

Connection type Uplink Downlink
TCP ✅ Supported ✅ Supported, allows multiple simultatious connections to the scoket
HTTP ✅ Supported, not recommneded due to slow speed and high overhead ✅ Supported, but only one simultatious connection per downlink
Serial ✅ Supported ✅ Supported

Installation

deb (Debian/Ubuntu, recommended)

# for arm64 systems (e.g. raspberry pi), replace "amd64" with "arm64"
wget https://github.com/Rikonardo/meshmud/releases/download/v1.0.0/meshmud_1.0.0_linux_amd64.deb
sudo apt install ./meshmud_1.0.0_linux_amd64.deb

When installing using this method, config file will be placed at /etc/meshmud/config.toml, and "meshmud" systemd service will be created. You can start the service with:

sudo systemctl start meshmud

Enable auto-start on boot:

sudo systemctl enable meshmud

Manual

You can also install meshmud by downloading a build for your platform from releases page, or by building from source using go toolchain:

git clone https://github.com/Rikonardo/meshmud.git
cd meshmud
go build -o meshmud ./cmd

This type of installs only provides the meshmud binary, which you can run manually with ./meshmud start-daemon command.

Configuration

Configuration is done via TOML file. For deb installations running through systemd service, config file is located at /etc/meshmud/config.toml.

When running meshmud manually, it looks for config.toml file in the current directory. You can specify path to config file with -config flag, e.g.:

meshmud start-daemon -config /etc/meshmud/config.toml

Below is a simple example of config file with one Serial uplink, and two downlinks, one TCP and one HTTP:

[[uplink.serial]]
id = "main-node"
device = "/dev/ttyUSB0"

[[downlink.tcp]]
uplink = "main-node"
address = "0.0.0.0:4403"
mesh_packet_buffer = 300

[[downlink.http]]
uplink = "main-node"
address = "0.0.0.0:8000"
mesh_packet_buffer = 100

Uplink parameters

Parameter Default Uplink types Description
id REQUIRED All Unique identifier of the uplink.
reconnect_interval "10s" All Time to wait before reconnecting after connection loss.
request_config false All Send config request packet to node after sccessfull connection to fetch node id.
address REQUIRED TCP Address to connect to in format "host:port".
connection_timeout "5s" TCP Timeout for establishing TCP connection.
url REQUIRED HTTP Base URL for HTTP connection, e.g. "http://meshtastic.local".
request_timeout "5s" HTTP Timeout for HTTP requests.
disable_https_cert_check false HTTP Disable check of HTTPS certificate issuer, allows self-signed certificates.
device REQUIRED Serial Serial port device, e.g. "/dev/ttyUSB0" on Linux or "COM3" on Windows.
baud_rate 115200 Serial Baud rate for serial connection.
data_bits 8 Serial Number of data bits for serial connection.
parity "none" Serial Parity for serial connection, can be "none", "odd", "even", "mark" and "space".
stop_bits "one" Serial Number of stop bits for serial connection, can be "one", "one_point_five" and "two".

Downlink parameters

Parameter Default Downlink types Description
uplink REQUIRED All ID of the uplink this downlink connects to.
mesh_packet_buffer 0 All Amount of last mesh packets to buffer and re-send to new connections.
mesh_packet_dedupe false All Only re-send buffered packets this downlink hasn't seen before. In TCP, disables parallel connections.
address REQUIRED TCP, HTTP Address to listen on in format "ip:port".
write_timeout "10s" TCP Timeout for writing data to downlink.
advertise false TCP Enable mDNS service advertisement for app auto-discover. Also enables request_config on the uplink.
advertise_shortname - TCP Default shortname of advertised node is set to "virt", you can chnage it by setting this parameter.
advertise_hostname - TCP Overrides auto-generated hostname for mDNS advertised service.
polling_timeout "10s" HTTP Amount of time after the last HTTP request needed to consider the client disconnected.
device REQUIRED Serial Serial port device, e.g. "/dev/ttyUSB0" on Linux or "COM3" on Windows.
baud_rate 115200 Serial Baud rate for serial connection.
data_bits 8 Serial Number of data bits for serial connection.
parity "none" Serial Parity for serial connection, can be "none", "odd", "even", "mark" and "space".
stop_bits "one" Serial Number of stop bits for serial connection, can be "one", "one_point_five" and "two".
reconnect_interval "10s" Serial Time to wait before trying to re-open serial connection after connection error.

About

Meshtastic Multiplexer Daemon

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages