instructions added on how to make it work with the ax25-stack

This commit is contained in:
marcel
2022-01-24 20:59:32 +01:00
parent de3ebe6cc2
commit 3120a1eb69
12 changed files with 71 additions and 9 deletions

View File

@@ -9,17 +9,72 @@ sudo apt install python3 python3-rpi.gpio python3-spidev aprx screen git python3
Clone this repository.
## Configuration
## Configuration of APRX
Edit /etc/aprx.conf according to example in aprx/aprx.conf.lora-aprs
```
In /etc/aprx.conf:
<interface>
tcp-device 127.0.0.1 10001 KISS
callsign NOCALL-4 # callsign defaults to $mycall
tx-ok true # transmitter enable defaults to false
# #telem-to-is true # set to 'false' to disable
</interface>
```
## Start the LoRa KISS TNC
## Start the LoRa KISS TNC and aprx server instance
```
python3 Start_lora-tnc.py &
sudo aprx
```
## Stop the server's
# Alternative method using the AX.25 stack
This method is more complicated, but also more versitile as not all programs can communicate to a KISS device over TCP.
## Install needed packages
```
sudo killall aprx python3
sudo apt install python3 python3-rpi.gpio python3-spidev aprx screen git python3-pil python3-smbus
```
## Checkout the code
Clone this repository.
## Configuration of APRX
```
In /etc/aprx.conf
<interface>
ax25-device $mycall
tx-ok true # transmitter enable defaults to false
# #telem-to-is true # set to 'false' to disable
</interface>
```
## Install and configure AX.25 stack
```
sudo apt install socat libax25 ax25-apps ax25-tools
sudo nano /etc/ax25/axports
add:
ax0 NOCALL-3 9600 255 2 430.775 MHz LoRa
```
## Start the LoRa KISS TNC
```
python3 Start_lora-tnc.py &
```
## Redirect KISS over TCP to AX.25 device
```
sudo socat PTY,raw,echo=0,link=/tmp/kisstnc TCP4:127.0.0.1:10001
sudo kissattach /tmp/kisstnc ax0
```

View File

@@ -38,7 +38,7 @@ class LoraAprsKissTnc(LoRa):
# init has LoRa APRS default config settings - might be initialized different when creating object with parameters
def __init__(self, queue, server, frequency=433.775, preamble=8, spreadingFactor=12, bandwidth=BW.BW125,
codingrate=CODING_RATE.CR4_5, appendSignalReport = True, paSelect = 1, outputPower = 15, verbose=False):
codingrate=CODING_RATE.CR4_5, appendSignalReport = True, paSelect = 1, MaxoutputPower = 15, outputPower = 15, verbose=False):
# Init SX127x
BOARD.setup()
@@ -56,7 +56,7 @@ class LoraAprsKissTnc(LoRa):
self.set_coding_rate(codingrate)
self.set_ocp_trim(100)
self.set_pa_config(paSelect, outputPower)
self.set_pa_config(paSelect, MaxoutputPower, outputPower)
self.set_max_payload_length(255)
self.set_dio_mapping([0] * 6)
self.server = server
@@ -137,4 +137,4 @@ class LoraAprsKissTnc(LoRa):
try:
return lora_aprs_frame[delimiter_position + 1]
except IndexError:
return ""
return ""

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

7
start_all.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
python3 Start_lora-tnc.py &
sleep 1
sudo socat PTY,raw,echo=0,link=/tmp/kisstnc TCP4:127.0.0.1:10001 &
sleep 1
sudo kissattach /tmp/kisstnc ax0 &