MCPcopy Index your code
hub / github.com/crockpotveggies/lora-mesh-rs

github.com/crockpotveggies/lora-mesh-rs @release-0.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release release-0.1.1 ↗ · + Follow
141 symbols 276 edges 18 files 57 documented · 40% updated 6y agorelease-0.1.1 · 2020-04-11★ 381 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

LoRa Mesh

LoRa has opened up a realm of possibilities for IoT and transmission of digital signals across long ranges. Currently it's very difficult to find open source mesh networking for LoRa that support IPv4 and application data. This project aims to provide a simple mesh network for LoRa devices that route IP traffic to a local interface, built entirely using Rust.

This is quite useful if you want to set up a network of devices and manage them remotely or use existing IP protocols to interact with your applications.

The mesh only supports 256 nodes, with expanded capacity on the roadmap. The mesh software works o ut-of-the-box with LoStik.

This software is not ready for production-use yet.

Running

Running the application requires root permissions. Creating a gateway is as simple as:

sudo ./loramesh --isgateway -n 1 /dev/ttyUSB0 network

This creates a node with ID 1 and a local network interface loratun0 that you can use to send and receive packets in the network.

Network Topology

Each node deployed on a network must have a unique ID between 0-255.

Each network should only have one gateway. Theoretically because the IP address are currently hardcoded to each node ID, like 172.16.0.<ID>, then multiple gateways may not be an issue.

Protocol

The protocol is very naive and asynchronous in nature. Only IPv4 packets are supported and are not guaranteed delivery. It is recommended that users stick to UDP and assume lossy connections.

Transmissions

Users will still need to respect their local laws regarding radio transmissions.

Known Issues

Software has only been tested on Linux X86_64 and raspberry pi.

All transmissions are single channel and while some safeguards have been taken to prevent collisions this is more difficult as the network size increase.

Currently using LoRa Mesh for accessing the outside internet through a gateway is unsupported. You may be able to configure the gateway to route DNS queries and requests with custom software. Currently it functions as a private network.

Gateways currently do not save their state, this could be an issue for unreliable nodes.

Roadmap

  • [x] LoStik interface
  • [x] Local network tunnel
  • [x] Bridge radio and tunnel
  • [x] Packet chunking
  • [x] Node discovery
  • [x] Message protocol
  • [x] Gateway DHCP
  • [x] Multi-hop routing
  • [ ] Network failure recovery
  • [ ] Frame lz4 compression
  • [ ] RTS/CTS collision prevention
  • [ ] Multiple LoRa device hardware
  • [ ] Security and encryption
  • [ ] Support 65,536 nodes

Credits

Special acknowledgement to those who made this possible:

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 102
Function 20
Class 15
Enum 3
Interface 1

Languages

Rust100%

Modules by API surface

src/stack/mesh.rs30 symbols
src/stack/frame.rs25 symbols
src/hardware/lostik.rs17 symbols
src/stack/router.rs14 symbols
src/node.rs11 symbols
src/stack/tun.rs10 symbols
src/stack/util.rs6 symbols
src/stack/message/ippacket.rs6 symbols
src/stack/message/message.rs5 symbols
src/stack/message/ipassign.rs5 symbols
src/stack/message/broadcast.rs4 symbols
src/hardware/serial.rs4 symbols

For agents

$ claude mcp add lora-mesh-rs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page