Note: the instructions consider aprx as APRS software, configured as internet rx-gateway. If you chose different aprs software, don't consider the aprx instructions
sudo apt install git aprx pip3 python3 python3-rpi.gpio python3-spidev python3-pil python3-smbus
Enter following commands:
cd /home/pi/Applications/ (this is only example, you can chose directory that you prefer)
sudo git clone https://github.com/IZ7BOJ/RPi-LoRa-KISS-TNC-2ndgen.git
Enter following commands:
cd RPi-LoRa-KISS-TNC-2ndgen
git clone https://github.com/mayeranalytics/pySX127x.git
Overwrite original /pySX127x/SX127x/board_config.py with board_config.py of my github:
sudo mv board_config.py ./pySX127x/SX127x/board_config.py
Overwrite original /pySX127x/SX127x/LoRa.py with LoRa.py of my github:
sudo mv LoRa.py ./pySX127x/SX127x/LoRa.py
The original files are written for Modtronix Lora Module, which uses more GPIO lines than we need. In order to save resources of our raspberry, I deleted unused lines from board_config.py. Note that KISS TNC won't work if you don't overwrite board_config.py!!
sudo pip3 install adafruit-circuitpython-ssd1306
Note: I2C bus musst be enabled on your raspberry! Follow these steps:
sudo raspi-config
Then "Interfacing Options"->"I2C", confirm "yes" at the end. For troubleshooting on the display, you can install "i2c-tools" and try to detect the display with "i2cdetect -y 1"
sudo raspi-config
Then "Interfacing Options"->"SPI", confirm "yes" at the end.
All the main parameters are enclosed in the file config.py .
The comments in the file will help you to understand every parameter.
If the log file is enabled, be sure to give the right permissions to the log file, otherwise the software will not start.
Select the correct version of Lora chip (sx126x/127x)
Enable display only if is connected, otherwise you'll get blocking error.
Afterwards configure as following:
Type:
cd
cd RPi-LoRa-KISS-TNC
sudo cp aprx/aprx.conf.lora-aprs /etc/aprx.conf
pico -w /etc/aprx.conf
to copy and then open the config file.
The most important settings are:
- mycall
Your call with an apropriate SSID suffix
Paper on SSID's from aprs.org - myloc
NMEA lat/lon form:
lat ddmm.mmN lon dddmm.mmE
Example:
lat 4812.52N lon 01622.39E
(simplest way to find the right coordinats for this? Go to aprs.fi on your location right-click and choose "Add marker" then click on the marker and you should see your coordinates in the NMEA style - enter this infos without any symbols into the config file as seen in the example above)
- passcode
see see here to generate appropiate setting - server
either leave the default server or chose from http://status.aprs2.net/
to save and close the file do:
Strg + x
-> Y -> Enter
In order to connect to a LoRa module, SPI port must be enabled. For Raspberry pi OS, this is done by set SPI interface enable using raspi-config or edit /boot/config.txt by adding following line:
dtparam=spi=on
sudo chmod +x Start_lora-tnc.py
sudo Start_lora-tnc.py
sudo aprx
The Software will print useful informations on the screen. If you want to run Kiss TNC as daemon, use:
sudo Start_lora-tnc.py>/dev/null &
sudo killall aprx Start_lora-tnc.py
The Rpi.GPIO library is not supported by Bookworm distro and must be replaced by lgpio
sudo apt remove python3-rpi.gpio
sudo apt install python3-rpi-lgpio
Moreover, pip3 won't work and can't be used for display driver installation. A virtual environment must be created as described in https://docs.circuitpython.org/projects/ssd1306/en/latest/
For questions, write me at iz7boj [at] gmail.com