mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
reticulum - Added initial support for dynamically determining the max TX power output of a device
This commit is contained in:
@@ -109,15 +109,20 @@
|
|||||||
# Set LoRa bandwidth to 125 KHz
|
# Set LoRa bandwidth to 125 KHz
|
||||||
bandwidth = 125000
|
bandwidth = 125000
|
||||||
#bandwidth = {{ET_RETICULUM_INTERFACE_RNODE_BANDWIDTH}}
|
#bandwidth = {{ET_RETICULUM_INTERFACE_RNODE_BANDWIDTH}}
|
||||||
|
|
||||||
# Set TX power in dBm
|
# Set TX power in dBm
|
||||||
# 7 dBm = 5 mW
|
#
|
||||||
# 17 dbm = 50 mW
|
# 7 dBm = 5 mW
|
||||||
# 20 dbm = 100 mW
|
# 10 dBm = 10 mW
|
||||||
# 22 dbm = 158 mW
|
# 14 dBm = 25 mW
|
||||||
# 28 dbm = 631 mW
|
# 17 dBm = 50 mW
|
||||||
txpower = 22
|
# 20 dBm = 100 mW
|
||||||
#txpower = {{ET_RETICULUM_INTERFACE_RNODE_TXPOWER}}
|
# 22 dBm = 158 mW
|
||||||
|
# 24 dBm = 251 mW
|
||||||
|
# 27 dBm = 501 mW
|
||||||
|
# 28 dBm = 631 mW
|
||||||
|
# 30 dBm = 1000 mW (1 W)
|
||||||
|
txpower = {{ET_RETICULUM_INTERFACE_RNODE_TXPOWER}}
|
||||||
|
|
||||||
# Select spreading factor 8. Valid
|
# Select spreading factor 8. Valid
|
||||||
# range is 7 through 12, with 7
|
# range is 7 through 12, with 7
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 7 June 2026
|
# Date : 7 June 2026
|
||||||
# Updated : 14 June 2026
|
# Updated : 15 June 2026
|
||||||
# Blueprint : Permament Transport Node
|
# Blueprint : Radio-Only Node, transport disabled
|
||||||
# Purpose : This confguration is a blueprint for a radio-only node.
|
# Purpose : This confguration is a blueprint for a radio-only node.
|
||||||
# If a supported et-radio and/or et-lora device is
|
# If a supported et-radio and/or et-lora device is
|
||||||
# detected, they will be enabled.
|
# detected, they will be enabled.
|
||||||
@@ -112,14 +112,18 @@
|
|||||||
#bandwidth = {{ET_RETICULUM_INTERFACE_RNODE_BANDWIDTH}}
|
#bandwidth = {{ET_RETICULUM_INTERFACE_RNODE_BANDWIDTH}}
|
||||||
|
|
||||||
# Set TX power in dBm
|
# Set TX power in dBm
|
||||||
# 7 dBm = 5 mW
|
#
|
||||||
# 17 dbm = 50 mW
|
# 7 dBm = 5 mW
|
||||||
# 20 dbm = 100 mW
|
# 10 dBm = 10 mW
|
||||||
# 22 dbm = 158 mW
|
# 14 dBm = 25 mW
|
||||||
# 28 dbm = 631 mW
|
# 17 dBm = 50 mW
|
||||||
# 30 dbm = 1 watt
|
# 20 dBm = 100 mW
|
||||||
txpower = 22
|
# 22 dBm = 158 mW
|
||||||
#txpower = {{ET_RETICULUM_INTERFACE_RNODE_TXPOWER}}
|
# 24 dBm = 251 mW
|
||||||
|
# 27 dBm = 501 mW
|
||||||
|
# 28 dBm = 631 mW
|
||||||
|
# 30 dBm = 1000 mW (1 W)
|
||||||
|
txpower = {{ET_RETICULUM_INTERFACE_RNODE_TXPOWER}}
|
||||||
|
|
||||||
# Select spreading factor 8. Valid
|
# Select spreading factor 8. Valid
|
||||||
# range is 7 through 12, with 7
|
# range is 7 through 12, with 7
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 12 May 2026
|
# Date : 12 May 2026
|
||||||
# Updated : 14 May 2026
|
# Updated : 15 May 2026
|
||||||
# Purpose : Wrapper script for starting Reticulum with PnP support
|
# Purpose : Wrapper script for starting Reticulum with PnP support
|
||||||
#
|
#
|
||||||
# Preconditions:
|
# Preconditions:
|
||||||
@@ -18,6 +18,8 @@ APP="Reticulum"
|
|||||||
RETICULUM_CONF_DIR="${HOME}/.reticulum"
|
RETICULUM_CONF_DIR="${HOME}/.reticulum"
|
||||||
RETICULUM_CONF_FILE="${RETICULUM_CONF_DIR}/config"
|
RETICULUM_CONF_FILE="${RETICULUM_CONF_DIR}/config"
|
||||||
|
|
||||||
|
INTERFACE_RNODE_TXPOWER_DEFAULT=17
|
||||||
|
|
||||||
options=()
|
options=()
|
||||||
files=()
|
files=()
|
||||||
index=1
|
index=1
|
||||||
@@ -141,15 +143,25 @@ sed -i "s|{{ET_CALLSIGN}}|${CALLSIGN}|g" ${RETICULUM_CONF_FILE}
|
|||||||
# RNode (LoRA) interface updates
|
# RNode (LoRA) interface updates
|
||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
# Enable/disable intereface based on PnP device detection
|
# 1. Enable/disable intereface based on PnP device detection
|
||||||
if [[ -e /dev/et-lora ]]; then
|
if [[ -e /dev/et-lora ]]; then
|
||||||
INTERFACE_RNODE_ENABLED="yes"
|
INTERFACE_RNODE_ENABLED="yes"
|
||||||
else
|
else
|
||||||
INTERFACE_RNODE_ENABLED="no"
|
INTERFACE_RNODE_ENABLED="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sed -i "s|{{ET_RETICULUM_INTERFACE_RNODE_ENABLED}}|${INTERFACE_RNODE_ENABLED}|g" ${RETICULUM_CONF_FILE}
|
sed -i "s|{{ET_RETICULUM_INTERFACE_RNODE_ENABLED}}|${INTERFACE_RNODE_ENABLED}|g" ${RETICULUM_CONF_FILE}
|
||||||
|
|
||||||
|
# 2. Determine max power settings
|
||||||
|
et-log "Connecting to device to determine max power..."
|
||||||
|
INTERFACE_RNODE_TXPOWER=`rnodeconf -i /dev/et-lora | awk -F': ' '/Max TX power/ {print $2}' | awk '{print $1}'`
|
||||||
|
if [[ $? -ne 0 ]]; then
|
||||||
|
INTERFACE_RNODE_TXPOWER=${INTERFACE_RNODE_TXPOWER_DEFAULT}
|
||||||
|
et-log "Can't determine max power. Using defaulting ${INTERFACE_RNODE_TXPOWER}."
|
||||||
|
fi
|
||||||
|
|
||||||
|
et-log "Setting max power to ${INTERFACE_RNODE_TXPOWER} dBm."
|
||||||
|
sed -i "s|{{ET_RETICULUM_INTERFACE_RNODE_TXPOWER}}|${INTERFACE_RNODE_TXPOWER}|g" ${RETICULUM_CONF_FILE}
|
||||||
|
|
||||||
|
|
||||||
CMD="rnsd"
|
CMD="rnsd"
|
||||||
et-log "Starting Reticulum: ${CMD}"
|
et-log "Starting Reticulum: ${CMD}"
|
||||||
|
|||||||
Reference in New Issue
Block a user