Meshtastic
Project Meshtastic | |
---|---|
![]() | |
Experiments with Meshtastic | |
Status | In progress |
Contact | bertrik |
Last Update | 2025-03-09 |
Intro
The plan is to use Meshtastic to transfer citizen science measurement data.
Stuff to figure out:
- network coverage: meshnet map
- do nodes forward packets that do not belong to their "own" network? -> appears to be so!
My node: https://db.meshnet.nl/da639b54.html
Design
Option 1
plans:
- just use the 'default' channel: longfast + default key
- put my data on an unused port number, e.g. 300
pro&con:
- + simple
- + my data is routed
- - there are only 256 (or so) port numbers globally, so cannot really differentiate
- could combat this with a kind of secure checksum
Option 2
plans:
- use my own channel: probably 'longfast' + own key
- use a port number > 256
pro&con:
- + data is separate from other data
- + data *should* be routed (not 100% sure)
- - have to do my own decryption
Protocol
See https://meshtastic.org/docs/overview/mesh-algo/
Quick links:
- data structure:
- Service Envelope, wraps a MeshPacket: https://buf.build/meshtastic/protobufs/docs/main:meshtastic#meshtastic.ServiceEnvelope
- MeshPacket https://buf.build/meshtastic/protobufs/docs/main:meshtastic#meshtastic.MeshPacket loosely based on the message as sent over-the-air
- Service Envelope: https://buf.build/meshtastic/protobufs/docs/main:meshtastic#meshtastic.ServiceEnvelope
- Port number: https://buf.build/meshtastic/protobufs/docs/main:meshtastic#meshtastic.PortNum
- MQTT topic organization: https://meshtastic.org/docs/software/integrations/mqtt/#mqtt-topics
- decryption code used on the liam cottle map: https://github.com/liamcottle/meshtastic-map/blob/master/src/mqtt.js#L632
- Meshtastic encryption https://meshtastic.org/docs/overview/encryption/
Hardware
Nice antenna? https://nl.aliexpress.com/item/1005007301116616.html
MQTT
In the netherlands, data is typically sent to the 'boreft' MQTT server, for example
mosquitto_sub -h mqtt.meshnet.nl -u boreft -P meshboreft -t "#" -v
Examples of typical data:
msh/7460-7463/2/stat/!da5857c0 online msh/EU_868/NL/2/e/LongFast/!eb66115c �%]�g(=���gx�� H5��Aw=]�gE��H`���������LongFast␦