+20dBm support, CRC in LoRa header and config.py removed in favour of RPi-LoRa-KISS-TNC.ini.

marcel 3 years ago
parent a1648da6ad
commit 971bbef5dd
  1. 14
      CHANGELOG.md
  2. 22
      LoraAprsKissTnc.py
  3. 2
      README.md
  4. 16
      RPi-LoRa-KISS-TNC.ini
  5. 2
      Start_lora-tnc.py

@ -22,3 +22,17 @@ All notable changes to this project will be documented in this file.
### Fixed
- LoRa APRS header (<\xff\x01) was not added to the payload, due to an indentation fault. Long live Python!
## [0.0.2] - 2022-02-08
### Added
- Support for 20dBm output power. Temporarily hard coded in source, but in next version it should be configurable via the configuration file.
## [0.0.3] - 2022-02-10
### Changed
- 20dBm output power can now be selected from configuration file instead of being hard coded in program.
- Enabled CRC in header of LoRa frames. Now frames are crc-checked at the receiving side.
### Removed
- Config.py as configuration is now completely removed. Configuration is now done completely via RPi-LoRa-KISS-TNC.ini

@ -93,9 +93,25 @@ class LoraAprsKissTnc(LoRa):
codingrate = CODING_RATE.CR4_5
self.set_coding_rate(codingrate)
self.set_ocp_trim(100)
self.set_pa_config(paSelect, MaxoutputPower, outputPower)
if outputPower == 20:
# Current limiter 180mA for +20dBm
self.set_ocp_trim(180)
# Set PA to +20dBm
self.set_pa_config(1, 15, 15)
self.set_pa_dac(1)
#print("+20dBm")
else:
# Current limiter 100mA for 17dBm max
self.set_ocp_trim(100)
self.set_pa_config(paSelect, MaxoutputPower, outputPower)
#print("max. +17dBm")
# CRC on
self.set_rx_crc(1)
self.set_max_payload_length(255)
self.set_dio_mapping([0] * 6)
self.server = server

@ -11,6 +11,4 @@ The software controls the LoRa transceiver connected to the Raspberry´s SPI bus
I also designed my own (open source) hardware for it: a board holding a Raspberry Pi Zero 2 W, an SX1278 LoRa transceiver and a power supply with on/off button to safely switch on and off the system. The design files can be found on my website: [RPi LoRa_shield](https://meezenest.nl/mees/RPi_LoRa_shield.html)
### To Do
* The program (or the LoRa module) still crashes occasionally. After restarting the program (kissattach/socat/RPi-LoRa-KISS-TNC.py) it all works again. Need to investigate.
* Completely remove config.py in favour of RPi-LoRa-KISS-TNC.ini
* Add raw TCP KISS socket for true AX.25 over KISS

@ -22,12 +22,24 @@ bandwidth=BW125
# CR4_8
codingrate=CR4_5
appendSignalReport=False
paSelect = 1
# paSelect only tested at 1
paSelect=1
# MaxoutputPower only tested at 15
MaxoutputPower = 15
outputPower = 15
# 0 ... 15 => +2 ... +17dBm
# 20 = +20dBm
outputPower = 20
[KISS]
# Settings for KISS
TCP_HOST=0.0.0.0
TCP_PORT_AX25=10001
TCP_PORT_RAW =10002
[AXUDP]
# settings for AXUDP
AXUDP_REMOTE_IP=192.168.0.185
AXUDP_REMOTE_PORT=20000
AXUDP_LOCAL_IP=0.0.0.0
AXUDP_LOCAL_PORT=20000
USE_AXUDP=False

@ -25,7 +25,7 @@ import configparser
# Read configuration file #
parser = configparser.ConfigParser()
parser.read('RPi-LoRa-KISS-TNC.ini')
parser.read('/home/marcel/ham/RPi-LoRa-KISS-TNC/RPi-LoRa-KISS-TNC.ini')
config_frequency = float(parser.get('LoRaSettings', 'frequency'))
config_preamble = int(parser.get('LoRaSettings', 'preamble'))

Loading…
Cancel
Save