MeshFile is a lightweight tool for transmitting files over long-range, low-power LoRa networks using Meshtastic devices. It compresses files, splits them into chunks, and ensures integrity with SHA-256 hash verification. Missing chunks are automatically requested, making the system resilient to packet loss.
-
Reliable File Transfer – Ensures complete and accurate file delivery.
-
Compression – Reduces file size before transmission.
-
Chunked Transmission – Splits files into 200-byte packets.
-
Hash Verification – SHA-256 hash checks ensure file integrity.
-
Retransmission – Automatically requests missing chunks.
-
2 x Raspberry Pi (3B/4 or Zero 2 W) – One for sending, one for receiving.
-
2 x Meshtastic LoRa Devices (e.g., T-Beam, Heltec LoRa 32)
-
Antennas – Properly tuned to the frequency of your region (433 MHz, 868 MHz, or 915 MHz).
-
USB Cable – To connect the LoRa devices to the Raspberry Pi.
-
Raspberry Pi OS (Lite or Desktop)
-
Python 3
-
Meshtastic Python Library
-
zlib – For compression.
-
hashlib – For SHA-256 hashing.
-
Download and flash Raspberry Pi OS (Lite or Desktop) using the Raspberry Pi Imager.
-
Enable SSH (optional) by adding an empty ssh file in the /boot directory.
-
Configure Wi-Fi (optional) by adding a wpa_supplicant.conf file in /boot.
sudo apt update && sudo apt upgrade -y
sudo apt install python3-pip python3-serial git
pip3 install meshtastic
1 Connect the LoRa device to each Raspberry Pi via USB.
2 Verify device detection:
ls /dev/ttyUSB*
3 Confirm connection:
python3 -m meshtastic --info
git clone https://github.com/VeggieVampire/MeshFile
cd meshfile
python3 sender.py <file.txt> '<destination>'
-
Compresses and sends the file in chunks.
-
Hash is transmitted for verification.
Receiving a File (Continuous Listening)
nohup python3 receiver.py &
-
Continuously listens for incoming files and reconstructs the file from received chunks.
-
Verifies hash to ensure integrity.
Sender (Pi 1):
python3 sender.py <file.txt> '<destination>'
Receiver (Pi 2):
nohup python3 receiver.py &
License
Creative Commons Attribution-NonCommercial 4.0 International
MeshFile - Reliable File Transfer Over Meshtastic Networks Copyright (C)