mirror of
https://github.com/AG7GN/nexus-utilities.git
synced 2025-05-28 04:10:19 -07:00
Bug fixes and documentation updates
This commit is contained in:
parent
8b201581bb
commit
19033c1f1b
136
README.md
136
README.md
@ -1,6 +1,6 @@
|
||||
# Hampi Utilities
|
||||
|
||||
VERSION 2020515
|
||||
VERSION 2020721
|
||||
|
||||
AUTHOR: Steve Magnuson, AG7GN
|
||||
|
||||
@ -23,6 +23,10 @@ Some scripts are specific to the [Nexus DR-X](http://wb7fhc.com/nexus-dr-x.html)
|
||||
|
||||
[Direwolf + pat GUI](#direwolf-and-pat-gui)
|
||||
|
||||
[ARDOP + pat GUI](#ardop-and-pat-gui)
|
||||
|
||||
[Rig Control Configuration GUI](#rig-control-gui)
|
||||
|
||||
[Fldigi + Flmsg trim log scripts](#trim-scripts)
|
||||
|
||||
[TNC Watchdog script](#watchdog-tnc-script)
|
||||
@ -107,10 +111,12 @@ If `DO_NOT_DELETE_THIS_FILE` is present in the home folder, the script exits wit
|
||||
|
||||
`test-piano.sh` allows you to test the operation of your `pianoX.sh` script by simulating what the [check-piano.sh](#check-piano-script) does when the Pi starts. Set the piano switches as desired, then open a Terminal and run `test-piano.sh`. The script will tell you which script will run based on which switch levers are down. It will not actually run the `pianoX.sh` script.
|
||||
|
||||
## Direwolf and pat gui
|
||||
## Direwolf and pat GUI
|
||||
|
||||
`dw_pat_gui.sh` provides a GUI to configure the Direwolf TNC and [pat](https://getpat.io/) to make a functional Winlink email client on Hampi. It also provides a monitor window that shows messages from both Direwolf and pat.
|
||||
|
||||
If you make any changes in either of the Configure tabs, click __Restart Direwolf and pat__ to activate the changes.
|
||||
|
||||
### Monitor tab
|
||||
|
||||
Shows the output of the Direwolf TNC and [pat](https://github.com/la5nta/pat/wiki) applications. Near the top of the Monitor tab window, you’ll see a row that looks something like this:
|
||||
@ -121,17 +127,135 @@ The first 3 items are port numbers that your Pi is listening on for various conn
|
||||
|
||||
The pat Web Server URL is what you’d use to access pat’s web server from your Pi (using the Chromium browser) or from another browser on another computer on your home network.
|
||||
|
||||
### Configure TNC
|
||||
### Configure TNC tab
|
||||
|
||||
Configures Direwolf for AX25, ready to be used with remote Windows PCs via KISS or with pat on Linux via pat’s command line interface or it’s web interface.
|
||||
|
||||
### Configure pat
|
||||
### Configure pat tab
|
||||
|
||||
Configures the pat Winlink email client.
|
||||
|
||||
- Call Sign, Winlink Password, Locator Code
|
||||
|
||||
These should be self explanatory.
|
||||
- Web Service Port
|
||||
|
||||
The port on which `pat` will listen for traffic from the `pat` web interface. Default is 8049.
|
||||
- Telnet Service Port
|
||||
|
||||
The port on which `pat` will listen for telnet traffic. Default is 8774.
|
||||
- Start pat web service when ARDOP starts
|
||||
|
||||
Checking __Start pat web service when Direwolf TNC starts__ will start `pat` with the http server enabled. If this option is not checked, pat will not run at all. You can then run `pat` in interactive mode by opening a Terminal and running:
|
||||
|
||||
pat -l ax25 interactive
|
||||
|
||||
- TX Delay, TX Tail, Persist, Slot time
|
||||
|
||||
The [AX.25 KISS protocol](http://www.ax25.net/kiss.aspx) describes these options.
|
||||
|
||||
- Load Default AX25 Timers
|
||||
|
||||
Clicking this button restores the timers to their default values.
|
||||
|
||||
- Edit pat Connection Aliases Button
|
||||
|
||||
Clicking this button brings up a window that allows you to search for RMS gateway stations (the output of the `pat rmslist` command) and add them to pat's connection alias list. These aliases are available in a dropdown in the pat web interface __Connection__ dialog to make it easy to select RMS gateway stations to connect to.
|
||||
|
||||
`pat` has a restriction in that if you include a frequency in an connection alias, you must also run `rigctld` while running pat. [Hamlib](https://hamlib.github.io), which provides `rigctld`, is already installed in Hampi. If you don't already run rigctl, this configuration gui will configure `rigctld` to use a "dummy" rig to fool pat into thinking it's talking to your radio via `rigctld`. Note that when `rigctld` is used with a "dummy" radio, you must manually set your radio to the desired frequency.
|
||||
|
||||
### Rig Control tab
|
||||
|
||||
Provides information about how `pat` uses rig control. A __Manage Hamlib rigctld__ button is provided that will launch the [rig control script](#rig-control-gui).
|
||||
|
||||
## ARDOP and pat gui
|
||||
|
||||
`ardop_pat_gui.sh` provides a GUI to configure the [piardopc](http://www.cantab.net/users/john.wiseman/Documents/ARDOPC.html) TNC (which implements ARDOP version 1) and [pat](https://getpat.io/) to make a functional Winlink email client on Hampi. It also provides a monitor window that shows messages from both piardopc and pat.
|
||||
|
||||
If you make any changes in either of the Configure tabs, click __Restart ARDOP and pat__ to activate the changes.
|
||||
|
||||
### Configure ARDOP tab
|
||||
|
||||
- Audio Capture and Playback
|
||||
|
||||
Select your audio device for capture (audio from the radio) and pl;ayback (audio to the radio). Use the guidance on the screen for what to select for the Nexus DR-X image. The script makes an attempt to find and present audio devices present on the Pi. For example, on ICOM radios like the 7100 and 73000 with built in sound cards that interface to the Pi via a USB cable, the __plughw:CARD=CODEC,DEV=0__ item is the correct choice for both capture and playback.
|
||||
- PTT
|
||||
|
||||
Push-to-Talk setting. Unless the radio uses CAT commands for PTT, the usual setting one of the GPIO selections per the guidance on the screen. You can select "rig control via pat" if you want pat to control PTT via rigctl. Your radio must be supported by Hamlib (which provides rig control) and be connected to the Pi via USB for this to work.
|
||||
- ARDOP Port
|
||||
|
||||
The TCP port `piardopc` listens on for commands from ARDOP clients like `pat`. Default is 8515.
|
||||
|
||||
- `piardopc` Arguments (OPTIONAL)
|
||||
|
||||
Usually not needed. Any arguments you supply will be passed to `piardopc`. There is no error checking, so watch the monitor window for error messages from `piardopc`. These are the available arguments:
|
||||
|
||||
-l path or --logdir path Path for log files
|
||||
-c device or --cat device Device to use for CAT Control
|
||||
-p device or --ptt device Device to use for PTT control using RTS
|
||||
-k string or --keystring string String (In HEX) to send to the radio to key PTT
|
||||
-u string or --unkeystring string String (In HEX) to send to the radio to unkeykey PTT
|
||||
-L use Left Channel of Soundcard in stereo mode
|
||||
-R use Right Channel of Soundcard in stereo mode
|
||||
CAT and RTS PTT can share the same port.
|
||||
|
||||
Logs are helpful for debugging, but not needed for normal operation. If you don't specify the log file pat with `-l path`, logging will be disabled.
|
||||
|
||||
If you provide `-p device` as an argument, it will override the PTT setting in the GUI.
|
||||
|
||||
### Configure pat tab
|
||||
|
||||
Configures the pat Winlink email client. Clicking the __Edit pat Connection Aliases__ button brings up a window that allows you to search for RMS gateway stations (the output of the `pat rmslist` command) and add them to pat's connection alias list. These aliases are available in a dropdown in the pat web interface __Connection__ dialog to make it easy to select RMS gateway stations to connect to.
|
||||
|
||||
pat has a restriction in that if you include a frequency in an connection alias, you must also run `rigctld` while running pat. [Hamlib]((http://hamlib.sourceforge.net/manuals/hamlib.html)), which provides `rigctld`, is already installed in Hampi. If you don't already run rigctl, this configuration gui will configure `rigctld` to use a "dummy" rig to fool pat into thinking it's talking to your radio via `rigctld`. Note that when `rigctld` is used with a "dummy" radio, you must manually set your radio to the desired frequency.
|
||||
pat has a restriction in that if you include a frequency in an connection alias, you must also run `rigctld` while running pat. [Hamlib](https://hamlib.github.io), which provides `rigctld`, is already installed in Hampi. If you don't already run rigctl, this configuration gui will configure `rigctld` to use a "dummy" rig to fool pat into thinking it's talking to your radio via `rigctld`. Note that when `rigctld` is used with a "dummy" radio, you must manually set your radio to the desired frequency.
|
||||
|
||||
If you make any changes in either of the Configure tabs, click __Restart Direwolf and pat__ to activate the changes.
|
||||
If you make any changes in either of the Configure tabs, click __Save Settings & Restart ARDOP + pat__ to activate the changes.
|
||||
|
||||
- Call Sign, Winlink Password, Locator Code
|
||||
|
||||
These should be self explanatory.
|
||||
- Web Service Port
|
||||
|
||||
The port on which `pat` will listen for traffic from the `pat` web interface. Default is 8049.
|
||||
- Start pat web service when ARDOP starts
|
||||
|
||||
Checking __Start pat web service when ARDOP starts__ will start `pat` with the http server enabled. If this option is not checked, pat will not run at all. You can then run `pat` in interactive mode by opening a Terminal and running:
|
||||
|
||||
pat -l ardop interactive
|
||||
|
||||
- Telnet Service Port
|
||||
|
||||
The port on which `pat` will listen for telnet traffic. Default is 8774.
|
||||
- Forced ARQ Bandwidth (Hz)
|
||||
|
||||
According to [ARDOP Overview](https://winlink.org/content/ardop_overview), The bandwidth can be forced by server, forced by client or negotiated by the server and client. Enabling forced here makes `pat`, the ARDOP client, set the bandwidth. Default is disabled.
|
||||
|
||||
- Max ARQ Bandwidth
|
||||
|
||||
According to [ARDOP Overview](https://winlink.org/content/ardop_overview), ARDOP is intended to operate in one of four audio bandwidths, 200 Hz, 500 Hz, 1000 Hz, and 2000 Hz. Default is 500 Hz.
|
||||
|
||||
- Beacon Interval (seconds)
|
||||
|
||||
Supposedly transmits a beacon every __x__ seconds. I can find no other information about this on the [`pat`](https://github.com/la5nta/pat/wiki/ARDOP) website. Default is 0 (disabled?).
|
||||
|
||||
- Enable CW ID
|
||||
|
||||
Enables sending your call sign via CW. I can find no other information about this on the [`pat`](https://github.com/la5nta/pat/wiki/ARDOP) website. Default is TRUE.
|
||||
|
||||
- Edit pat Connection Aliases Button
|
||||
|
||||
Clicking this button brings up a window that allows you to search for RMS gateway stations (the output of the `pat rmslist` command) and add them to pat's connection alias list. These aliases are available in a dropdown in the pat web interface __Connection__ dialog to make it easy to select RMS gateway stations to connect to.
|
||||
|
||||
`pat` has a restriction in that if you include a frequency in an connection alias, you must also run `rigctld` while running pat. [Hamlib](https://hamlib.github.io), which provides `rigctld`, is already installed in Hampi. If you don't already run rigctl, this configuration gui will configure `rigctld` to use a "dummy" rig to fool pat into thinking it's talking to your radio via `rigctld`. Note that when `rigctld` is used with a "dummy" radio, you must manually set your radio to the desired frequency.
|
||||
|
||||
|
||||
### Rig Control tab
|
||||
|
||||
Provides information about how `pat` uses rig control. A __Manage Hamlib rigctld__ button is provided that will launch the [rig control script](#rig-control-gui).
|
||||
|
||||
## Rig Control GUI
|
||||
|
||||
Provides a way to configure [Hamlib's](https://hamlib.github.io) `rigctld` for use with `pat` and other applications.
|
||||
|
||||
## TNC Script
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
#%
|
||||
#================================================================
|
||||
#- IMPLEMENTATION
|
||||
#- version ${SCRIPT_NAME} 1.0.1
|
||||
#- version ${SCRIPT_NAME} 1.0.4
|
||||
#- author Steve Magnuson, AG7GN
|
||||
#- license CC-BY-SA Creative Commons License
|
||||
#- script_id 0
|
||||
@ -99,17 +99,15 @@ function setARDOPpatDefaults () {
|
||||
D[2]="null" # Audio playback interface (ADEVICE)
|
||||
D[3]="GPIO 23" # GPIO PTT (BCM pin)
|
||||
D[4]="8515" # ARDOP Port
|
||||
# D[5]="FALSE" # Forced ARQ bandwidth
|
||||
# D[6]="500" # Max ARQ bandwidth
|
||||
# D[7]="0" # Beacon Interval
|
||||
# D[8]="TRUE" # CW ID Enabled
|
||||
# D[9]="FALSE" # Enable pat HTTP server
|
||||
D[5]="FALSE" # Enable pat HTTP server
|
||||
D[6]="-l /dev/null/" # Optional piardopc arguments
|
||||
}
|
||||
|
||||
function loadSettings () {
|
||||
|
||||
PTTs="GPIO 12!GPIO 23!rig control via pat"
|
||||
ARDOP_CONFIG="$TMPDIR/ardop.conf"
|
||||
PAT_ARQ_BW_MAXs="200!500!1000!2000"
|
||||
|
||||
if [ -s "$CONFIG_FILE" ]
|
||||
then # There is a config file
|
||||
@ -124,6 +122,7 @@ function loadSettings () {
|
||||
echo "F[_PTT_]='${D[3]}'" >> "$CONFIG_FILE"
|
||||
echo "F[_ARDOPPORT_]='${D[4]}'" >> "$CONFIG_FILE"
|
||||
echo "F[_PAT_HTTP_]='${D[5]}'" >> "$CONFIG_FILE"
|
||||
echo "F[_ARDOP_ARGS_]='${D[6]}'" >> "$CONFIG_FILE"
|
||||
source "$CONFIG_FILE"
|
||||
fi
|
||||
if pgrep pulseaudio >/dev/null 2>&1
|
||||
@ -159,6 +158,12 @@ function loadSettings () {
|
||||
PAT_ARDOPPORT="$(jq -r ".ardop.addr" $PAT_CONFIG | cut -d: -f2)"
|
||||
PAT_ARQ_BW_FORCED="$(jq -r ".ardop.arq_bandwidth.Forced" $PAT_CONFIG)"
|
||||
PAT_ARQ_BW_MAX="$(jq -r ".ardop.arq_bandwidth.Max" $PAT_CONFIG)"
|
||||
if [[ $PAT_ARQ_BW_MAXs =~ $PAT_ARQ_BW_MAX ]]
|
||||
then
|
||||
PAT_ARQ_BW_MAXs="$(echo $PAT_ARQ_BW_MAXs | sed -e "s/$PAT_ARQ_BW_MAX/\^$PAT_ARQ_BW_MAX/")"
|
||||
else
|
||||
PAT_ARQ_BW_MAXs="$(echo $PAT_ARQ_BW_MAXs | sed -e "s/500/\^500/")"
|
||||
fi
|
||||
PAT_BEACON_INTERVAL="$(jq -r ".ardop.beacon_interval" $PAT_CONFIG)"
|
||||
PAT_CW_ID="$(jq -r ".ardop.cwid_enabled" $PAT_CONFIG)"
|
||||
}
|
||||
@ -378,7 +383,7 @@ do
|
||||
yad --plug="$ID" --tabnum=1 \
|
||||
--back=black --fore=yellow --selectable-labels \
|
||||
--text-info --text-align=center --text="$TEXT" \
|
||||
--editable --tail --center <&8 &
|
||||
--tail --center <&8 &
|
||||
YAD_PIDs+=( $! )
|
||||
|
||||
# Start rigctld.
|
||||
@ -404,10 +409,14 @@ do
|
||||
ARDOP_PTT=""
|
||||
fi
|
||||
# Start piardopc
|
||||
echo "Launching $ARDOP ${F[_ARDOPPORT_]} ${F[_ADEVICE_CAPTURE_]} ${F[_ADEVICE_PLAY_]} $ARDOP_PTT" >&8
|
||||
$ARDOP ${F[_ARDOPPORT_]} ${F[_ADEVICE_CAPTURE_]} ${F[_ADEVICE_PLAY_]} $ARDOP_PTT >&8 2>&8 &
|
||||
# If no piardopc logging specified as an argument, send logs to /dev/null
|
||||
[[ ${F[_ARDOP_ARGS_]} =~ -l ]] || F[_ARDOP_ARGS_]+=" -l /dev/null/"
|
||||
# If PTT is specified as an argument, override PTT setting in GUI
|
||||
[[ ${F[_ARDOP_ARGS_]} =~ -p ]] && ARDOP_PTT=""
|
||||
echo "Starting $ARDOP ${F[_ARDOPPORT_]} ${F[_ADEVICE_CAPTURE_]} ${F[_ADEVICE_PLAY_]} ${F[_ARDOP_ARGS_]} $ARDOP_PTT" >&8
|
||||
$ARDOP ${F[_ARDOPPORT_]} ${F[_ADEVICE_CAPTURE_]} ${F[_ADEVICE_PLAY_]} ${F[_ARDOP_ARGS_]} $ARDOP_PTT >&8 2>&8 &
|
||||
ardop_PID=$!
|
||||
echo -e "\n\nARDOP has started. PID=$ardop_PID" >&8
|
||||
echo -e "\nARDOP has started. PID=$ardop_PID" >&8
|
||||
|
||||
# Start pat
|
||||
if [[ $PAT_START_HTTP == TRUE ]]
|
||||
@ -418,30 +427,43 @@ do
|
||||
pat_PID=""
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
ARG_INFO="piardopc arguments are usually not needed, but if you want to use them:\n \
|
||||
-l path or --logdir path Path for log files\n \
|
||||
-c device or --cat device Device to use for CAT Control\n \
|
||||
-p device or --ptt device Device to use for PTT control using RTS\n \
|
||||
-k string or --keystring string String (In HEX) to send to the radio to key PTT\n \
|
||||
-u string or --unkeystring string String (In HEX) to send to the radio to unkeykey PTT\n \
|
||||
-L use Left Channel of Soundcard in stereo mode\n \
|
||||
-R use Right Channel of Soundcard in stereo mode\n\n \
|
||||
"
|
||||
# Set up tab for configuring piardopc.
|
||||
yad --plug="$ID" --tabnum=2 \
|
||||
--text="<b><big><big>ARDOP Configuration</big></big></b>\n\n \
|
||||
<b><u><big>Typical Sound Card and PTT Settings for Nexus DR-X</big></u></b>\n \
|
||||
<span color='blue'><b>LEFT Radio:</b></span> Use ADEVICEs \
|
||||
<span color='blue'><b>LEFT Radio:</b></span> Use \
|
||||
<b>fepi-capture-left</b> and <b>fepi-playback-left</b> and PTT <b>GPIO 12</b>.\n \
|
||||
<span color='blue'><b>RIGHT Radio:</b></span> Use ADEVICEs \
|
||||
<span color='blue'><b>RIGHT Radio:</b></span> Use \
|
||||
<b>fepi-capture-right</b> and <b>fepi-playback-right</b> and PTT <b>GPIO 23</b>.\n\n \
|
||||
Click the <b>Save Settings...</b> button below after you make your changes.\n\n" \
|
||||
Click the <b>Save Settings...</b> button below after you make your changes.\n" \
|
||||
--item-separator="!" \
|
||||
--separator="|" \
|
||||
--text-align=center \
|
||||
--align=right \
|
||||
--borders=20 \
|
||||
--form \
|
||||
--columns=2 \
|
||||
--field="<b>ARDOP Capture ADEVICE</b>":CB "$ADEVICE_CAPTUREs" \
|
||||
--field="<b>ARDOP Playback ADEVICE</b>":CB "$ADEVICE_PLAYBACKs" \
|
||||
--field="<b>ARDOP PTT</b>":CBE "$PTTs" \
|
||||
--columns=1 \
|
||||
--field="<b>Audio Capture Device</b>":CB "$ADEVICE_CAPTUREs" \
|
||||
--field="<b>Audio Playback Device</b>":CB "$ADEVICE_PLAYBACKs" \
|
||||
--field="<b>PTT</b>":CB "$PTTs" \
|
||||
--field="<b>ARDOP Port</b>":NUM "${F[_ARDOPPORT_]}!8510..8519!1!" \
|
||||
--field="<b>piardopc</b> command arguments\n(OPTIONAL - usually not needed)" "${F[_ARDOP_ARGS_]}" \
|
||||
--focus-field 1 > $TMPDIR/CONFIGURE_ARDOP.txt &
|
||||
YAD_PIDs+=( $! )
|
||||
|
||||
# --field="<b>piardopc</b> argument information:":TXT "$ARG_INFO" \
|
||||
|
||||
|
||||
# Set up tab for pat configuration
|
||||
yad --plug="$ID" --tabnum=3 \
|
||||
--text="<b><big><big>pat Configuration</big></big></b>\n\n \
|
||||
@ -457,12 +479,12 @@ Click the <b>Save Settings...</b> button below after you make your changes.\n\n"
|
||||
--field="Winlink Password":H "$PAT_PASSWORD" \
|
||||
--field="Locator Code" "$PAT_LOCATOR" \
|
||||
--field="Web Service Port":NUM "$PAT_HTTP_PORT!8040..8049!1!" \
|
||||
--field="Start pat web service when ARDOP starts":CHK "$PAT_START_HTTP" \
|
||||
--field="Telnet Service Port":NUM "$PAT_TELNET_PORT!8770..8779!1!" \
|
||||
--field="Forced ARQ Bandwidth":CHK "$PAT_ARQ_BW_FORCED" \
|
||||
--field="Max ARQ Bandwidth":NUM "$PAT_ARQ_BW_MAX!50..2000!50!" \
|
||||
--field="Beacon Interval (minutes)":NUM "$PAT_BEACON_INTERVAL!0..120!1!" \
|
||||
--field="Max ARQ Bandwidth (Hz)":CB "$PAT_ARQ_BW_MAXs" \
|
||||
--field="Beacon Interval (seconds)\n0 = disabled":NUM "$PAT_BEACON_INTERVAL!0..3600!1!" \
|
||||
--field="Enable CW ID":CHK "$PAT_CW_ID" \
|
||||
--field="Start pat web service when ARDOP starts":CHK "$PAT_START_HTTP" \
|
||||
--field="<b>Edit pat Connection Aliases</b>":FBTN "bash -c edit_pat_aliases.sh &" \
|
||||
--focus-field 1 > $TMPDIR/CONFIGURE_PAT.txt &
|
||||
YAD_PIDs+=( $! )
|
||||
@ -527,6 +549,7 @@ EOF
|
||||
F[_ADEVICE_PLAY_]="${TF[1]}"
|
||||
F[_PTT_]="${TF[2]}"
|
||||
F[_ARDOPPORT_]="${TF[3]}"
|
||||
F[_ARDOP_ARGS_]="${TF[4]}"
|
||||
|
||||
|
||||
# Read and handle the Configure pat tab yad output
|
||||
@ -536,12 +559,12 @@ EOF
|
||||
PAT_PASSWORD="${TF[1]}"
|
||||
PAT_LOCATOR="${TF[2]^^}"
|
||||
PAT_HTTP_PORT="${TF[3]}"
|
||||
PAT_TELNET_PORT="${TF[4]}"
|
||||
PAT_ARQ_BW_FORCED="${TF[5]}"
|
||||
PAT_ARQ_BW_MAX="${TF[6]}"
|
||||
PAT_BEACON_INTERVAL="${TF[7]}"
|
||||
PAT_CW_ID="${TF[8]}"
|
||||
F[_PAT_HTTP_]="${TF[9]}"
|
||||
F[_PAT_HTTP_]="${TF[4]}"
|
||||
PAT_TELNET_PORT="${TF[5]}"
|
||||
PAT_ARQ_BW_FORCED="${TF[6]}"
|
||||
PAT_ARQ_BW_MAX="${TF[7]}"
|
||||
PAT_BEACON_INTERVAL="${TF[8]}"
|
||||
PAT_CW_ID="${TF[9]}"
|
||||
|
||||
# Update the pat config.json file with the new data.
|
||||
cat $PAT_CONFIG | jq \
|
||||
|
@ -16,7 +16,7 @@
|
||||
#%
|
||||
#================================================================
|
||||
#- IMPLEMENTATION
|
||||
#- version ${SCRIPT_NAME} 1.0.3
|
||||
#- version ${SCRIPT_NAME} 1.0.4
|
||||
#- author Steve Magnuson, AG7GN
|
||||
#- license CC-BY-SA Creative Commons License
|
||||
#- script_id 0
|
||||
@ -500,10 +500,10 @@ do
|
||||
# Start the monitor tab
|
||||
[[ $FIRST_RUN == true ]] && MODE_MESSAGE="" || MODE_MESSAGE="${F[_APRSMODE_]}"
|
||||
TEXT="<big><b>Direwolf $MODE_MESSAGE APRS Monitor</b></big>"
|
||||
yad --plug="$ID" --tabnum=1 --text="$TEXT" --editable --show-uri --show-cursor \
|
||||
yad --plug="$ID" --tabnum=1 --text="$TEXT" --show-uri --show-cursor \
|
||||
--back=black --fore=yellow \
|
||||
--text-info --text-align=center \
|
||||
--editable --tail --center <&6 &
|
||||
--tail --center <&6 &
|
||||
YAD_PIDs+=( $! )
|
||||
|
||||
if [[ $FIRST_RUN == true ]]
|
||||
|
@ -15,7 +15,7 @@
|
||||
#%
|
||||
#================================================================
|
||||
#- IMPLEMENTATION
|
||||
#- version ${SCRIPT_NAME} 1.6.1
|
||||
#- version ${SCRIPT_NAME} 1.6.2
|
||||
#- author Steve Magnuson, AG7GN
|
||||
#- license CC-BY-SA Creative Commons License
|
||||
#- script_id 0
|
||||
@ -426,7 +426,7 @@ do
|
||||
yad --plug="$ID" --tabnum=1 \
|
||||
--back=black --fore=yellow --selectable-labels \
|
||||
--text-info --text-align=center --text="$TEXT" \
|
||||
--editable --tail --center <&3 &
|
||||
--tail --center <&3 &
|
||||
YAD_PIDs+=( $! )
|
||||
|
||||
# Start rigctld.
|
||||
|
@ -18,7 +18,7 @@
|
||||
#%
|
||||
#================================================================
|
||||
#- IMPLEMENTATION
|
||||
#- version ${SCRIPT_NAME} 1.4.2
|
||||
#- version ${SCRIPT_NAME} 1.4.3
|
||||
#- author Steve Magnuson, AG7GN
|
||||
#- license CC-BY-SA Creative Commons License
|
||||
#- script_id 0
|
||||
@ -105,8 +105,8 @@ function processAlias () {
|
||||
then # Alias already present
|
||||
yad --info --center --text-align=center --buttons-layout=center \
|
||||
--text="$URI was already in aliases" --borders=20 --button="gtk-ok":0
|
||||
else # Alias not in list. Add it.
|
||||
cat $PAT_CONFIG | jq --arg K "$CALL@$FREQ" --arg U "$URI" \
|
||||
else # Alias not in list. Add it. Key (alias name) is of the form CALL.MODE@FREQ
|
||||
cat $PAT_CONFIG | jq --arg K "$CALL.${URI%%:*}@$FREQ" --arg U "$URI" \
|
||||
'.connect_aliases += {($K): $U}' | sponge $PAT_CONFIG
|
||||
if [[ $? == 0 ]]
|
||||
then
|
||||
@ -128,7 +128,7 @@ function viewDeleteAliases () {
|
||||
ALIASES="$(jq -r .connect_aliases $PAT_CONFIG | egrep -v "telnet|{|}" | \
|
||||
sed 's/^ /FALSE|/' | tr -d ' ",' | sed 's/:/|/1' | tr '|' '\n')"
|
||||
RESULT="$(yad --title="View/remove aliases" --list --mouse --borders=10 \
|
||||
--height=400 --width=500 --text-align=center \
|
||||
--height=400 --width=550 --text-align=center \
|
||||
--text "<b>Your current pat connection aliases are listed below.</b>\n \
|
||||
Check the ones you want to remove.\n" \
|
||||
--checklist --grid-lines=hor --auto-kill --column="Pick" --column="Call@Freq" --column="Connect URI" \
|
||||
@ -177,7 +177,7 @@ VERSION="$(ScriptInfo version | grep version | tr -s ' ' | cut -d' ' -f 4)"
|
||||
TITLE="Find RMS Stations $VERSION"
|
||||
PAT_CONFIG="$HOME/.wl2k/config.json"
|
||||
export PAT_CONFIG=$PAT_CONFIG
|
||||
export find_cmd='@bash -c "runFind %1 %2 %3 %6"'
|
||||
export find_cmd='@bash -c "runFind %1 %2 %3 %4"'
|
||||
export view_remove_cmd='bash -c "viewDeleteAliases"'
|
||||
export fpipe=$(mktemp -u --tmpdir find.XXXXXXXX)
|
||||
mkfifo "$fpipe"
|
||||
@ -280,9 +280,9 @@ connection alias list\n<span color='blue'>If you make changes: Restart pat + TNC
|
||||
--field="Search string" "${DEFAULT_SEARCH_STRING:0:4}" \
|
||||
--field="Band":CB "$BANDs" \
|
||||
--field="Mode":CB "$MODEs" \
|
||||
--field="Sort results by distance (Uncheck to sort by callsign)":CHK TRUE \
|
||||
--field="gtk-find":FBTN "$find_cmd" \
|
||||
--field="<b>View/edit current pat connection aliases</b>":FBTN "$view_remove_cmd &" \
|
||||
--field="Sort results by distance (Uncheck to sort by callsign)":CHK TRUE >/dev/null &
|
||||
--field="<b>View/delete saved pat connection aliases</b>":FBTN "$view_remove_cmd &" >/dev/null &
|
||||
YAD_PIDs+=( $! )
|
||||
|
||||
yad --plug="$fkey" --tabnum=2 --list --grid-lines=hor --dclick-action="bash -c \"processAlias '%s'\"" \
|
||||
|
@ -1 +1 @@
|
||||
VERSION="2.3.5"
|
||||
VERSION="2.3.6"
|
@ -14,7 +14,7 @@
|
||||
#%
|
||||
#================================================================
|
||||
#- IMPLEMENTATION
|
||||
#- version ${SCRIPT_NAME} 1.0.3
|
||||
#- version ${SCRIPT_NAME} 1.0.4
|
||||
#- author Steve Magnuson, AG7GN
|
||||
#- license CC-BY-SA Creative Commons License
|
||||
#- script_id 0
|
||||
@ -336,13 +336,25 @@ do
|
||||
then # rigctld already running
|
||||
# Determine rig ID of running rigctld process
|
||||
ID="$(cat /proc/$(pidof rigctld)/cmdline | tr -d '\0' | tr '-' '\n' | egrep "^m[0-9]{1,4}" | sed -e 's/^m//')"
|
||||
case $ID in
|
||||
1|2|4) # Hamlib and FLRig "rigs" don't use a serial port
|
||||
PORTSPEED_MSG=""
|
||||
;;
|
||||
*) # All(?) of the others require a serial port
|
||||
PORT="$(cat /proc/$(pidof rigctld)/cmdline | tr '\0' '~' | sed -e 's/~-/\n-/g' | tr '~' ' ' | grep "^-r" | cut -d' ' -f2)"
|
||||
[[ $PORT == "" ]] && PORT="PORT NOT CONFIGURED"
|
||||
SPEED="$(cat /proc/$(pidof rigctld)/cmdline | tr '\0' '~' | sed -e 's/~-/\n-/g' | tr '~' ' ' | grep "^-s" | cut -d' ' -f2)"
|
||||
[[ $SPEED == "" ]] && SPEED="SPEED NOT CONFIGURED"
|
||||
PORTSPEED_MSG="on ${PORT##*/} @ $SPEED"
|
||||
;;
|
||||
esac
|
||||
# Find the rig make and model from that ID
|
||||
RIG="$(getRig $ID)"
|
||||
STATE="<big><b><span color='green'>rigctld is RUNNING for $RIG</span></b></big> \n \
|
||||
STATE="<b><span color='green'><big>rigctld is RUNNING for $RIG</big>\n$PORTSPEED_MSG</span></b> \n \
|
||||
<b>Change the rig by searching/selecting a different rig below, or click 'Save...' to restart rigctld with $RIG</b>"
|
||||
else # rigctld not running
|
||||
RIG="$(echo ${F[_RIG_]} | cut -d'|' -f2,3 | tr '|' ' ')"
|
||||
STATE="<big><b><span color='red'>rigctld is NOT RUNNING.</span></b></big>\n<b>Configured rig is <span color='blue'>$RIG.</span> Change the rig by searching/selecting a different rig below, or click 'Save...' to start rigctld with $RIG</b>"
|
||||
STATE="<big><b><span color='red'>rigctld is NOT RUNNING</span></b></big>\n<b>Configured rig is <span color='blue'>$RIG.</span> Change the rig by searching/selecting a different rig below, or click 'Save...' to start rigctld with $RIG</b>"
|
||||
fi
|
||||
yad --plug="$fkey" --tabnum=1 --text-align=center \
|
||||
--text="<big><b>Configure Hamlib Rig Control (rigctld)</b></big>\n$STATE\n \
|
||||
@ -370,7 +382,8 @@ Hamlib and FLRig models don't use the Serial Port or Speed settings. Set them t
|
||||
--borders=20 \
|
||||
--posx=30 --posy=70 \
|
||||
--title="$TITLE" --window-icon="system-search" \
|
||||
--button="<b>Leave rigctld as-is & Exit</b>":2 \
|
||||
--button="<b>Leave rigctld as-is & Exit</b>":3 \
|
||||
--button="<b>Stop rigctld & Exit</b>":2 \
|
||||
--button="<b>Stop rigctld</b>":1 \
|
||||
--button="<b>Save Changes & [Re]start rigctld</b>":0
|
||||
RETURN_CODE=$?
|
||||
@ -409,6 +422,10 @@ Hamlib and FLRig models don't use the Serial Port or Speed settings. Set them t
|
||||
1) # Stop rigctld
|
||||
pkill -x rigctld
|
||||
;;
|
||||
2) # Stop rigctld and exit
|
||||
pkill -x rigctld
|
||||
break
|
||||
;;
|
||||
*) # Leave rigctld as-is and exit
|
||||
break
|
||||
;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user