mirror of
https://github.com/AG7GN/nexus-utilities.git
synced 2025-05-20 16:30:12 -07:00
Added beacon control and telnet password fields to dw_pat_gui.sh
This commit is contained in:
parent
e6260e9984
commit
c0183a1368
@ -15,7 +15,7 @@
|
||||
#%
|
||||
#================================================================
|
||||
#- IMPLEMENTATION
|
||||
#- version ${SCRIPT_NAME} 1.6.9
|
||||
#- version ${SCRIPT_NAME} 1.7.0
|
||||
#- author Steve Magnuson, AG7GN
|
||||
#- license CC-BY-SA Creative Commons License
|
||||
#- script_id 0
|
||||
@ -93,9 +93,9 @@ function Die () {
|
||||
}
|
||||
|
||||
function loadpatDefaults () {
|
||||
for I in $(seq 7 10)
|
||||
for I in $(seq 10 13)
|
||||
do # I is the field number. D[$I] is the default value
|
||||
echo "${I}:${D[$I]}"
|
||||
echo "${I}:${D[$((I-3))]}"
|
||||
done
|
||||
}
|
||||
|
||||
@ -205,7 +205,10 @@ EOF
|
||||
PAT_PASSWORD="$(jq -r ".secure_login_password" $PAT_CONFIG)"
|
||||
PAT_HTTP_PORT="$(jq -r ".http_addr" $PAT_CONFIG | cut -d: -f2)"
|
||||
PAT_TELNET_PORT="$(jq -r ".telnet.listen_addr" $PAT_CONFIG | cut -d: -f2)"
|
||||
PAT_TELNET_PASSWD="$(jq -r ".telnet.password" $PAT_CONFIG)"
|
||||
PAT_LOCATOR="$(jq -r ".locator" $PAT_CONFIG)"
|
||||
PAT_BEACON_INTERVAL="$(jq -r ".ax25.beacon.every" $PAT_CONFIG)"
|
||||
PAT_BEACON_MESSAGE="$(jq -r ".ax25.beacon.message" $PAT_CONFIG)"
|
||||
}
|
||||
|
||||
function clearTextInfo () {
|
||||
@ -554,6 +557,9 @@ Click the <b>Save Settings...</b> button below after you make your changes.\n\n"
|
||||
--field="Locator Code" "$PAT_LOCATOR" \
|
||||
--field="Web Service Port":NUM "$PAT_HTTP_PORT!8040..8049!1!" \
|
||||
--field="Telnet Service Port":NUM "$PAT_TELNET_PORT!8770..8779!1!" \
|
||||
--field="Telnet Service Password\n(default: no password)" "$PAT_TELNET_PASSWD" \
|
||||
--field="Beacon Interval (s)\n(0 disables beacon)":NUM "$PAT_BEACON_INTERVAL!0..7200!1!" \
|
||||
--field="Beacon Message" "$PAT_BEACON_MESSAGE" \
|
||||
--field="Start pat web service when Direwolf TNC starts":CHK "$PAT_START_HTTP" \
|
||||
--field="TX Delay (ms)":NUM "$TXDELAY!0..500!1!" \
|
||||
--field="TX Tail (ms)":NUM "$TXTAIL!0..200!10!" \
|
||||
@ -639,11 +645,14 @@ EOF
|
||||
PAT_LOCATOR="${TF[2]^^}"
|
||||
PAT_HTTP_PORT="${TF[3]}"
|
||||
PAT_TELNET_PORT="${TF[4]}"
|
||||
F[_PAT_HTTP_]="${TF[5]}"
|
||||
F[_TXDELAY_]="${TF[6]}"
|
||||
F[_TXTAIL_]="${TF[7]}"
|
||||
F[_PERSIST_]="${TF[8]}"
|
||||
F[_SLOTTIME_]="${TF[9]}"
|
||||
PAT_TELNET_PASSWD="${TF[5]}"
|
||||
PAT_BEACON_INTERVAL="${TF[6]}"
|
||||
PAT_BEACON_MESSAGE="${TF[7]}"
|
||||
F[_PAT_HTTP_]="${TF[8]}"
|
||||
F[_TXDELAY_]="${TF[9]}"
|
||||
F[_TXTAIL_]="${TF[10]}"
|
||||
F[_PERSIST_]="${TF[11]}"
|
||||
F[_SLOTTIME_]="${TF[12]}"
|
||||
|
||||
# Update the pat config.json file with the new data.
|
||||
cat $PAT_CONFIG | jq \
|
||||
@ -651,8 +660,11 @@ EOF
|
||||
--arg P "$PAT_PASSWORD" \
|
||||
--arg H "0.0.0.0:$PAT_HTTP_PORT" \
|
||||
--arg T "0.0.0.0:$PAT_TELNET_PORT" \
|
||||
--arg A "$PAT_TELNET_PASSWD" \
|
||||
--arg L "$PAT_LOCATOR" \
|
||||
'.mycall = $C | .secure_login_password = $P | .http_addr = $H | .telnet.listen_addr = $T | .locator = $L' | sponge $PAT_CONFIG
|
||||
--argjson I $PAT_BEACON_INTERVAL \
|
||||
--arg M "$PAT_BEACON_MESSAGE" \
|
||||
'.mycall = $C | .secure_login_password = $P | .http_addr = $H | .telnet.listen_addr = $T | .telnet.password = $A |.locator = $L | .ax25.beacon.every = $I | .ax25.beacon.message = $M' | sponge $PAT_CONFIG
|
||||
|
||||
# Update the yad configuration file.
|
||||
echo "declare -gA F" > "$CONFIG_FILE"
|
||||
|
@ -26,6 +26,9 @@ This program allows you to configure Direwolf and pat and monitor the output of
|
||||
<a href="#grid">Locator Code</a><br />
|
||||
<a href="#webport">Web Service Port</a><br />
|
||||
<a href="#telnetport">Telnet Service Port</a><br />
|
||||
<a href="#telnetpasswd">Telnet Service Password</a><br />
|
||||
<a href="#beaconinterval">AX25 Beacon Interval</a><br />
|
||||
<a href="#beaconmessage">AX25 Beacon Message</a><br />
|
||||
<a href="#startpat">Start pat web service when Direwolf TNC starts</a><br />
|
||||
<a href="#ax25timers">AX25 Timers (TX delay, TX tail, Persist, Slot time)</a><br />
|
||||
<a href="#defaultax25timers">Load Default AX25 Timers button</a><br />
|
||||
@ -152,6 +155,22 @@ Start Direwolf listening for KISS connections on the specified port. Programs su
|
||||
<p>Port number pat listens on so external applications can communicate with pat using telnet. This allows you to access pat's telnet interface from a command line on this Pi or from a PC using a suitable application that is on the same network as this Pi.</p>
|
||||
<a href="#top">Top</a>
|
||||
|
||||
<h3 id="telnetpasswd">Telnet Service Password</h3>
|
||||
<p>When pat is running with the telnet service enabled, users connecting to pat must provide this password. The default is no password.</p>
|
||||
<a href="#top">Top</a>
|
||||
|
||||
<h3 id="telnetpasswd">Telnet Service Password</h3>
|
||||
<p>When pat is running with the telnet service enabled, users connecting to pat must provide this password. The default is no password.</p>
|
||||
<a href="#top">Top</a>
|
||||
|
||||
<h3 id="beaconinterval">AX25 Beacon Interval</h3>
|
||||
<p>When pat is running, your radio will beacon an IDENT message periodically, so other hams know you are capable of P2P. Default is 3600 seconds. Set it to 0 to disable beacons.</p>
|
||||
<a href="#top">Top</a>
|
||||
|
||||
<h3 id="beaconmessage">AX25 Beacon Message</h3>
|
||||
<p>When pat is running, your radio will beacon an IDENT message periodically, so other hams know you are capable of P2P. This text will be sent as part of the beacon. Default = "Winlink P2P"</p>
|
||||
<a href="#top">Top</a>
|
||||
|
||||
<h3 id="startpat">Start pat web service when Direwolf TNC starts</h3>
|
||||
<p>
|
||||
Checking this box will start pat's web service when this GUI is run. Alternatively, you can use pat's command line interface after starting this GUI by opening a Terminal window and running:<pre>pat interactive</pre>
|
||||
|
@ -1 +1 @@
|
||||
VERSION="2.3.18"
|
||||
VERSION="2.3.19"
|
Loading…
x
Reference in New Issue
Block a user