- Python 100%
| .gitignore | pyLoRa initial commit | |
| __init__.py | pyLoRa initial commit | |
| generate_entry.py | uncommented document send section | |
| LICENSE | Added email to LICENSE | |
| message.py | added ignore UTF-8 errors to bytes() function | |
| mycrypt.py | string replace fix (again) | |
| pyLoRa.py | added "exit(1)" when an error during receive occurs | |
| README.md | Edited README.md a little | |
pyLoRa - LoRa Transmission Scripts
Transmit Gopher or Gemini posts over LoRa
With this script I send a Gemini or Gopher post for the ROOPHLOCH challenge. I hope I can send from further away than the last time (~247m) in the ROOPHLOCH 2025.
ROOPHLOCH partisipants 2024 (Gemini Link)
These scripts are a rewrite of the USB-LoRa Perl scripts in Python3. They are just published here for you to have a look how I do the transmission. You can't simply use it without big changes!
Send and Receive
At first I had to start the receiving script on my Raspberry Pi 3 at home, where I have to choose "gemini" or "gopher" at the end to determine which kind of post I want to make. It waits for the "<START>" command:
$ ./pyLoRa.py receive <device (/dev/ttyACM0)> <Password> [gopher|gemini]
Then I have to send the file from my laptop:
$ ./pyLoRa.py send <device (/dev/ttyACM0)> <file_to_send.txt> <Password>
I have built in some error correction so it should figure out itself, if something was received wrongly or not at all.
file_to_send.txt format
The files I want to send have a special format. The first line is the Gopher title, which is used in the filename and in the title in the prepared gopher or gemini file. It must not contain any special characters like " or ' ! Just words. The rest is the regular gemini/gopher text needed by the Bash scripts which prepare the files.
<Title of the file for file name and title in gopher txt file>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam
erat, sed diam voluptua. At vero eos et accusam et justo duo
dolores et ea rebum. Stet clita kasd gubergren, no sea takimata
sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt
ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero
eos et accusam et justo duo dolores et ea rebum. Stet clita kasd
gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
My first steps
The scripts are very hacky and amateurish but they did work for me. It's already the second iteration of this script. The first one was written in Perl and had some difficulties with the used serial library (one core maxed out at 100%). I just post them so you can peek at them to get a clue how I did it. This is nothing professional and was mainly trial and error.