| auto_create_phlog_entry.sh | First commit | |
| LICENSE | Initial commit | |
| lora_get.pl | First commit | |
| lora_receive.pl | First commit | |
| lora_send.pl | First commit | |
| lora_set.pl | First commit | |
| README.md | README.md aktualisiert | |
| sh_test.pl | First commit | |
This repo was archived, because it will be rewritten in Python3 (Perl has some issues with Device::SerialPort)
USB-LoRa Transmission Scripts
Here are the scripts I wrote to transmit my #ROOPHLOCH'24 post over LoRa. The post is accessible on my Gopher Hole:
gopher://redterminal.org:70/0/phlog/2024-09-13-ROOPHLOCH_2024_Post_2_-_LoRa_transmission.txt
These scripts are just some hack to get going with my first steps in LoRa and LoRaWAN. You can't use them unmodified because I use some hardcoded paths and some scripts are missing, namely the ones to generate the gophermap and rss feed (phlog.sh) and the rsync upload script (upload_gopher.sh).
Send and Receive
At first I had to start the receiving script on my Raspberry Pi 3 at home, which waits for the 'START' command:
$ ./lora_receive /dev/ttyACM0 Passw0rd
Then I have to send the file from my laptop:
$ ./lora_send /dev/ttyACM0 Passw0rd file_to_send.txt
If all goes well (I needed 3 attempts to fully send the post), the file is sent to the home station Raspberry Pi, gunzipped and decoded (openssl). After that it's prepared for Gopher and uploaded with the 'auto_create_phlog_entry.sh' script.
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 file:
<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.
DECODE OK
The last line has to be 'DECODE OK' on its own, last line. This is to check if there was a decryption error.
The first and the last line aren't part of the resulting Gopher post.
My first steps
The scripts are very hacky and amateurish but they did work for me. 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.