From c8e67366199e65d79e548661095a137e4a7db1fb Mon Sep 17 00:00:00 2001 From: marcel Date: Tue, 8 Feb 2022 21:23:22 +0100 Subject: [PATCH] +20dBm support. --- CHANGELOG.md | 5 +++++ LoraAprsKissTnc.py | 8 +++++++- Start_lora-tnc.py | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a99a375..4d019a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,3 +22,8 @@ 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. diff --git a/LoraAprsKissTnc.py b/LoraAprsKissTnc.py index ff7cafb..23c85ae 100644 --- a/LoraAprsKissTnc.py +++ b/LoraAprsKissTnc.py @@ -93,9 +93,15 @@ class LoraAprsKissTnc(LoRa): codingrate = CODING_RATE.CR4_5 self.set_coding_rate(codingrate) - self.set_ocp_trim(100) + + # Current limiter 180mA for +20dBm (100mA for 17dBm max) + self.set_ocp_trim(180) self.set_pa_config(paSelect, MaxoutputPower, outputPower) + + # Set PA to +20dBm + self.set_pa_dac(1) + self.set_max_payload_length(255) self.set_dio_mapping([0] * 6) self.server = server diff --git a/Start_lora-tnc.py b/Start_lora-tnc.py index beebbd2..8c84b42 100755 --- a/Start_lora-tnc.py +++ b/Start_lora-tnc.py @@ -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'))