From 5f2da951bbf45c3b7c3d90f36567a08d925ab8f7 Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Sat, 13 Sep 2025 14:21:01 -0700 Subject: [PATCH 01/27] tx-500mp - Added initial plug-and-play for the Lab599 TX-500MP via the DigiRig Mobile --- overlay/opt/emcomm-tools/bin/et-audio | 4 ++-- .../conf/radios.d/lab599-tx500mp.json | 20 +++++++++++++++++++ overlay/opt/emcomm-tools/sbin/udev-tester.sh | 7 ++++++- 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 overlay/opt/emcomm-tools/conf/radios.d/lab599-tx500mp.json diff --git a/overlay/opt/emcomm-tools/bin/et-audio b/overlay/opt/emcomm-tools/bin/et-audio index dc33bde..7bcaf74 100755 --- a/overlay/opt/emcomm-tools/bin/et-audio +++ b/overlay/opt/emcomm-tools/bin/et-audio @@ -2,7 +2,7 @@ # # Author : Gaston Gonzalez # Date : 31 October 2024 -# Updated : 31 May 2024 +# Updated : 13 September 2025 # Purpose : Configures ET audio device with sane defaults # # Preconditions @@ -51,7 +51,7 @@ update-config () { case ${ET_DEVICE_NAME} in "DIGIRIG_MOBILE") # Unmute Speaker a set volume. Adjust if remote station can't decode you. Your TX controls. - amixer -q -c ${AUDIO_CARD} sset Speaker Playback Switch 42% unmute + amixer -q -c ${AUDIO_CARD} sset Speaker Playback Switch 92% unmute # Unmute Mic amixer -q -c ${AUDIO_CARD} sset Mic Playback Switch 52% unmute # Set "L/R Capture" to 19. Adjust if you can't decode received audio. Your RX controls. diff --git a/overlay/opt/emcomm-tools/conf/radios.d/lab599-tx500mp.json b/overlay/opt/emcomm-tools/conf/radios.d/lab599-tx500mp.json new file mode 100644 index 0000000..63331ac --- /dev/null +++ b/overlay/opt/emcomm-tools/conf/radios.d/lab599-tx500mp.json @@ -0,0 +1,20 @@ +{ + "id": "lab599-tx500mp", + "vendor": "Lab599", + "model": "TX-500MP (DigiRig Mobile)", + "rigctrl": { + "id": "2014", + "baud": "9600", + "ptt": "RTS", + "pttOnly": "false" + }, + "notes": [ + "1. Set MENU 36 CAT PROTOCOL = TS2000", + "2. Set MODE = DIGI", + "", + "Do not enable VOX on radio" + + ], + "fieldNotes": [ + ] +} diff --git a/overlay/opt/emcomm-tools/sbin/udev-tester.sh b/overlay/opt/emcomm-tools/sbin/udev-tester.sh index 9f60211..02fb7f9 100755 --- a/overlay/opt/emcomm-tools/sbin/udev-tester.sh +++ b/overlay/opt/emcomm-tools/sbin/udev-tester.sh @@ -1,7 +1,7 @@ #!/bin/bash # Author : Gaston Gonzalez # Date : 11 October 2024 -# Updated : 21 May 2025 +# Updated : 13 September 2025 # Purpose : Perform tests that can be used by the udev subsystem to aid # in rule development. This is intended to by used with the PROGRAM # directive inside of a udev rule. @@ -81,6 +81,11 @@ test_digirig_mobile() { exit 0 fi + if [[ "$ID" == "lab599-tx500mp" ]]; then + et-log "Old DigiRig Mobile detected for TX-500MP" + exit 0 + fi + fi exit 1 From 02ef9f9fdadd375b66d6bc0a4a1c45cd31ef3914 Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Wed, 17 Sep 2025 11:34:14 -0700 Subject: [PATCH 02/27] fldigi - Initial installation script for fldigi --- scripts/install-fldigi.sh | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 scripts/install-fldigi.sh diff --git a/scripts/install-fldigi.sh b/scripts/install-fldigi.sh new file mode 100755 index 0000000..673dbc3 --- /dev/null +++ b/scripts/install-fldigi.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# Author : Gaston Gonzalez +# Date : 17 September 2025 +# Purpose : Builds and installs fldigi +set -e +trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG +trap 'et-log "\"${last_command}\" command failed with exit code $?."' ERR + +. ./env.sh + +APP="fldigi" +VERSION="4.2.09" +APP_AND_VERSION="${APP}-${VERSION}" +GIT_TAG="v4.2.09" +GIT_URL="https://git.code.sf.net/p/fldigi/fldigi" +GIT_WORKSPACE="fldigi" +INSTALL_DIR="/opt/${APP_AND_VERSION}" +LINK_PATH="/opt/${APP}" + +et-log "Installing ${APP} ${VERSION}" + +CWD_DIR=`pwd` + +cd ${ET_SRC_DIR} +[[ ! -e ${GIT_WORKSPACE} ]] && git clone ${GIT_URL} ${GIT_WORKSPACE} + +cd ${GIT_WORKSPACE} +git checkout ${GIT_TAG} + +# Generate config script +autoreconf -i && ./configure --prefix=${INSTALL_DIR} + +# Compile +make + +# Install +make install + +[[ -e ${LINK_PATH} ]] && rm ${LINK_PATH} +ln -v -s ${INSTALL_DIR} ${LINK_PATH} + +stow -v -d /opt ${APP} -t /usr/local + +cd ${CWD} From 0ca724c23c34b4f52eeb754c5e7e8560deaec03b Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Fri, 19 Sep 2025 05:59:28 -0700 Subject: [PATCH 03/27] fx-4cr Initial integration PnP. The TX audio side is still in development, however, received audio and CAT control work. --- .../etc/udev/rules.d/89-et-bg2fx-fx4cr.rules | 23 ++++++++++++++++++ .../conf/radios.d/bg2fx-fx4cr.json | 24 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 overlay/etc/udev/rules.d/89-et-bg2fx-fx4cr.rules create mode 100644 overlay/opt/emcomm-tools/conf/radios.d/bg2fx-fx4cr.json diff --git a/overlay/etc/udev/rules.d/89-et-bg2fx-fx4cr.rules b/overlay/etc/udev/rules.d/89-et-bg2fx-fx4cr.rules new file mode 100644 index 0000000..c7d6817 --- /dev/null +++ b/overlay/etc/udev/rules.d/89-et-bg2fx-fx4cr.rules @@ -0,0 +1,23 @@ +# Author : Gaston Gonzalez +# Date : 18 September 2025 +# Purpose : udev rules for the FX-4CR by BG2FX +# +# Preconditions: +# 1. FX-4CR connected via USB cable +# +# Postconditions: +# 1. /dev/et-cat created +# 2. rigctld is started +# 3. /dev/et-audio created + +SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", ENV{ET_DEVICE}=="", \ + ACTION=="add", \ + ENV{ET_DEVICE}="FX-4CR", ENV{ET_SUBDEVICE}="CAT", GROUP="dialout", MODE="0660", SYMLINK+="et-cat", \ + RUN+="/usr/bin/systemctl start rigctld" + +# PROGRAM="/opt/emcomm-tools/sbin/udev-tester.sh digirig-mobile", \ +SUBSYSTEM=="sound", ATTRS{idVendor}=="4c4a", ATTRS{idProduct}=="4155", \ + ACTION=="add", \ + ENV{ET_DEVICE}="FX-4CR", \ + ATTR{id}="ET_AUDIO", \ + ENV{ET_SUBDEVICE}="AUDIO", GROUP="audio", MODE="0660", SYMLINK+="et-audio" diff --git a/overlay/opt/emcomm-tools/conf/radios.d/bg2fx-fx4cr.json b/overlay/opt/emcomm-tools/conf/radios.d/bg2fx-fx4cr.json new file mode 100644 index 0000000..15a587c --- /dev/null +++ b/overlay/opt/emcomm-tools/conf/radios.d/bg2fx-fx4cr.json @@ -0,0 +1,24 @@ +{ + "id": "bg2fx-fx4cr", + "vendor": "BG2FX", + "model": "FX-4CR", + "rigctrl": { + "id": "2031", + "baud": "115200", + "ptt": "RTS", + "pttOnly": "false" + }, + "notes": [ + "THESE NOTES ARE A WORK IN PROGRESS", + "Short press [PWR], then rotate AF knob until POW = 5.0", + "Toggle [SSB] button until both USB and DIG appear", + "Short press [M. V] until VFOA is displayed", + "Set radio volume to 50", + "Set mic gain to ?", + "Set alsamixer PCM to ?", + "Set alsamixer Mic to 50", + "Set alsamixer AFC to mm" + ], + "fieldNotes": [ + ] +} From 816263975adeafba760ee1f908fef7609e198350 Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Fri, 26 Sep 2025 13:55:55 -0700 Subject: [PATCH 04/27] fx-4cr - Resolved an issue in which there is no output power on PTT. A big thanks to Myles ZL4MDX for providing a solution on the Google IO group. --- .../emcomm-tools/conf/radios.d/bg2fx-fx4cr.json | 14 +++++++++----- overlay/opt/emcomm-tools/sbin/wrapper-rigctld.sh | 13 +++++++++++-- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/overlay/opt/emcomm-tools/conf/radios.d/bg2fx-fx4cr.json b/overlay/opt/emcomm-tools/conf/radios.d/bg2fx-fx4cr.json index 15a587c..e1d75ae 100644 --- a/overlay/opt/emcomm-tools/conf/radios.d/bg2fx-fx4cr.json +++ b/overlay/opt/emcomm-tools/conf/radios.d/bg2fx-fx4cr.json @@ -5,20 +5,24 @@ "rigctrl": { "id": "2031", "baud": "115200", - "ptt": "RTS", + "ptt": "RIG", + "conf": "data_bits=8,serial_handshake=None,stop_bits=1,rts_state=OFF", "pttOnly": "false" }, "notes": [ - "THESE NOTES ARE A WORK IN PROGRESS", "Short press [PWR], then rotate AF knob until POW = 5.0", "Toggle [SSB] button until both USB and DIG appear", "Short press [M. V] until VFOA is displayed", + "Long press [MENU], rotate AF to BLUETOOTH, rotate TUNE and set to 0", "Set radio volume to 50", - "Set mic gain to ?", - "Set alsamixer PCM to ?", - "Set alsamixer Mic to 50", + "Set mic gain to 50", + "Set alsamixer PCM to 21", + "Set alsamixer Mic to 55", "Set alsamixer AFC to mm" ], "fieldNotes": [ + "Tested with FX-4CR firmware version: 1.7.3 (2025/09/01)", + "You must force the RTS control line to low for audio output to work with the PTT", + "This is handled with rts_state=OFF using the --set-conf argument of rigctld" ] } diff --git a/overlay/opt/emcomm-tools/sbin/wrapper-rigctld.sh b/overlay/opt/emcomm-tools/sbin/wrapper-rigctld.sh index 1c1b9ab..534dd99 100755 --- a/overlay/opt/emcomm-tools/sbin/wrapper-rigctld.sh +++ b/overlay/opt/emcomm-tools/sbin/wrapper-rigctld.sh @@ -2,13 +2,16 @@ # # Author : Gaston Gonzalez # Date : 9 October 2024 -# Updated : 31 May 2025 +# Updated : 26 September 2025 # Purpose : Wrapper startup/shutdown script around systemd/rigctld ET_HOME=/opt/emcomm-tools ACTIVE_RADIO="${ET_HOME}/conf/radios.d/active-radio.json" CAT_DEVICE=/dev/et-cat +# Additional configuration to pass to rigctld +SET_CONF="" + do_full_auto() { et-log "Found ET_DEVICE='${ET_DEVICE}'" @@ -95,8 +98,14 @@ start() { exit 0 fi + # Handle optional configuration settings + CONF=$(jq -e -r '.rigctrl.conf' "${ET_HOME}/conf/radios.d/active-radio.json") + if [[ $? -eq 0 ]]; then + SET_CONF="--set-conf=${CONF}" + fi + # Generate command - CMD="rigctld -m ${ID} -r ${CAT_DEVICE} -s ${BAUD} -P ${PTT} " + CMD="rigctld -m ${ID} -r ${CAT_DEVICE} -s ${BAUD} -P ${PTT} ${SET_CONF}" et-log "Starting rigctld with: ${CMD}" $CMD } From 3444e0c406f7a36db1e494eda19ce33b86739e04 Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Fri, 26 Sep 2025 14:46:01 -0700 Subject: [PATCH 05/27] fx-4cr - Set audio level for FX-4CR --- overlay/opt/emcomm-tools/bin/et-audio | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/overlay/opt/emcomm-tools/bin/et-audio b/overlay/opt/emcomm-tools/bin/et-audio index 7bcaf74..56ec52d 100755 --- a/overlay/opt/emcomm-tools/bin/et-audio +++ b/overlay/opt/emcomm-tools/bin/et-audio @@ -2,14 +2,14 @@ # # Author : Gaston Gonzalez # Date : 31 October 2024 -# Updated : 13 September 2025 +# Updated : 26 September 2025 # Purpose : Configures ET audio device with sane defaults # # Preconditions # 1. Supported audio interface is connected and properly detected # # Postconditions -# 1. ASLA settings set on ET audio device +# 1. ALSA settings set on ET audio device usage() { echo "usage: $(basename $0) " @@ -97,6 +97,19 @@ update-config () { et-log "Applied amixer settings for ${ET_DEVICE_NAME}" ;; + "FX-4CR") + # Unmute the PCM and set the volume to 21% to get the full output power. This value is + # dependent on the settings defined for the FX-4CR in the et-radio notes. + amixer -q -c ${AUDIO_CARD} sset 'PCM' 31% unmute + + # Set "L/R Capture" to 55%. Adjust if you can't decode received audio. + amixer -q -c ${AUDIO_CARD} sset 'Mic' 67% unmute + + # Disable Auto Gain Control + amixer -q -c ${AUDIO_CARD} sset 'Auto Gain Control' mute + + et-log "Applied amixer settings for ${ET_DEVICE_NAME}" + ;; *) et-log "No ALSA configuration specified for this ET_DEVICE." ;; From 31018dd4acb4983be1f354a87ca0b1f64e193939 Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Fri, 26 Sep 2025 14:51:30 -0700 Subject: [PATCH 06/27] fx-4cr - Minor whitespace formatting fix before merge --- overlay/opt/emcomm-tools/bin/et-audio | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlay/opt/emcomm-tools/bin/et-audio b/overlay/opt/emcomm-tools/bin/et-audio index 56ec52d..7f695de 100755 --- a/overlay/opt/emcomm-tools/bin/et-audio +++ b/overlay/opt/emcomm-tools/bin/et-audio @@ -99,7 +99,7 @@ update-config () { ;; "FX-4CR") # Unmute the PCM and set the volume to 21% to get the full output power. This value is - # dependent on the settings defined for the FX-4CR in the et-radio notes. + # dependent on the settings defined for the FX-4CR in the et-radio notes. amixer -q -c ${AUDIO_CARD} sset 'PCM' 31% unmute # Set "L/R Capture" to 55%. Adjust if you can't decode received audio. From 669b75343a3ef6cba77f375386e5e4bc12b902a4 Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Fri, 26 Sep 2025 14:53:12 -0700 Subject: [PATCH 07/27] fx-4cr - Corrected typo before merge --- overlay/opt/emcomm-tools/conf/radios.d/bg2fx-fx4cr.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlay/opt/emcomm-tools/conf/radios.d/bg2fx-fx4cr.json b/overlay/opt/emcomm-tools/conf/radios.d/bg2fx-fx4cr.json index e1d75ae..6c39035 100644 --- a/overlay/opt/emcomm-tools/conf/radios.d/bg2fx-fx4cr.json +++ b/overlay/opt/emcomm-tools/conf/radios.d/bg2fx-fx4cr.json @@ -18,7 +18,7 @@ "Set mic gain to 50", "Set alsamixer PCM to 21", "Set alsamixer Mic to 55", - "Set alsamixer AFC to mm" + "Set alsamixer AGC to mm" ], "fieldNotes": [ "Tested with FX-4CR firmware version: 1.7.3 (2025/09/01)", From a6fe8b3ae0a2b45fc754116c684b517d7cca91f2 Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Tue, 30 Sep 2025 02:59:51 -0700 Subject: [PATCH 08/27] fldigi - Added fldigi (with no PnP) to installer --- scripts/install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/install.sh b/scripts/install.sh index 655e658..d59220c 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -2,7 +2,7 @@ # # Author : Gaston Gonzalez # Date : 16 March 2024 -# Updated : 16 August 2025 +# Updated : 30 September 2025 # Purpose : Main installer for EmComm Tools Community (ETC) . ./env.sh @@ -87,3 +87,7 @@ exitIfNotRoot # Install prediction tools ./install-voacap.sh + +# Install fldigi suite +./install-fldigi.sh +# TODO: add installers for flmsg and flamp From ea5207e25e59e0ccc200f58016abb0a59741b824 Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Wed, 1 Oct 2025 16:31:42 -0700 Subject: [PATCH 09/27] fldigi - Added stock configuration with only callsign token --- overlay/etc/skel/.config/JS8Call.ini | 2 +- overlay/etc/skel/.fldigi/fldigi_def.xml | 3457 +++++++++++++++++++++++ 2 files changed, 3458 insertions(+), 1 deletion(-) create mode 100644 overlay/etc/skel/.fldigi/fldigi_def.xml diff --git a/overlay/etc/skel/.config/JS8Call.ini b/overlay/etc/skel/.config/JS8Call.ini index 30e6484..f918f2b 100644 --- a/overlay/etc/skel/.config/JS8Call.ini +++ b/overlay/etc/skel/.config/JS8Call.ini @@ -17,7 +17,7 @@ Miles=true MyCall=N0CALL MyGrid=DM33 MyGroups=@@TTP,@@TTPNET -MyInfo=ETC R3 +MyInfo=ETC R5 Polling=1 PSKReporter=false PTTMethod=@Variant(\0\0\0\x7f\0\0\0\x1eTransceiverFactory::PTTMethod\0\0\0\0\xfPTT_method_CAT\0) diff --git a/overlay/etc/skel/.fldigi/fldigi_def.xml b/overlay/etc/skel/.fldigi/fldigi_def.xml new file mode 100644 index 0000000..f30f20d --- /dev/null +++ b/overlay/etc/skel/.fldigi/fldigi_def.xml @@ -0,0 +1,3457 @@ + + + +1 + + +1 + + +5 + + +1 + + +0 + + +20 + + +0 + + +5 + + +200 + + +0 + + +0 + + +1 + + +0 + + +0 + + +0 + + +0 + + +, + + +CW,BPSK-31,RTTY,, + + +1 + + +0 + + +0 + + +0 + + +1 + + +-60 + + +-6 + + +-3 + + +0 + + +0 + + +60 + + +1 + + +1 + + +8 + + +1 + + +1 + + +1 + + +1 + + +1 + + +1 + + +1 + + +1 + + +1 + + +0 + + +3000 + + +1500 + + +1500 + + +1500 + + +1 + + +100 + + +1 + + +0 + + +1 + + +0 + + +1 + + +0 + + +0 + + +1 + + +1 + + +1 + + +1 + + +1 + + +1 + + +1 + + +1 + + +1 + + +1 + + +1 + + +42 + + + + + +0 + + +0 + + +0 + + +0 + + + + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + + +<FREQ> + + + +4 + + +0 + + +0 + + +0 + + +1 + + +50 + + +0 + + +-30 + + +9 + + +0 + + +1 + + +15 + + +0 + + +50 + + +1500 + + +25 + + +9 + + +1 + + +1 + + +3 + + +450 + + +68 + + +0 + + +1.25 + + +0 + + +0 + + +0 + + +1 + + +0 + + +0 + + +0 + + +1 + + +72 + + +1 + + +0 + + +0 + + +0 + + +0 + + +0 + + + + + +0 + + +0 + + +0 + + +1 + + +0 + + +200 + + +1 + + +0 + + +0 + + +0 + + +1 + + +1 + + +1 + + +1 + + +1 + + +18 + + +15 + + +0 + + +15 + + +0 + + +24 + + +150 + + +2 + + +0.4 + + +0.6 + + +100 + + +1 + + +0 + + +0 + + +10 + + +5 + + +50 + + +1 + + +1 + + +3 + + +0 + + +1 + + +0 + + +2000 + + +4 + + +0.8 + + +4 + + +0 + + +18 + + +CW,, + + +0 + + +0 + + +0 + + +4 + + +4 + + +0 + + +100 + + +0 + + +0 + + +=~<>%+&{} + + +0 + + +20 + + +1 + + +0 + + +1 + + +1 + + +1 + + +1 + + +0 + + +1 + + +0 + + +1 + + +1 + + +0 + + +0 + + +0 + + +1 + + +245 + + +245 + + +30 + + +1225 + + +2205 + + +250 + + +120 + + +450 + + +2 + + +20 + + +0 + + +0 + + +1 + + +0 + + +1 + + +2 + + +2 + + +2 + + +8 + + +4 + + +0 + + +1 + + +1 + + +2 + + +2 + + +8 + + +4 + + +1 + + +0 + + +1 + + +2 + + +1 + + +K + + +5 + + +4 + + +0 + + +1 + + +1 + + +1 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + + + + +2 + + +K + + +1 + + +0 + + +5 + + +0 + + +1 + + +0 + + +1 + + +1 + + +4 + + +0 + + +0 + + +4 + + +2 + + +4.5 + + +3 + + +0 + + +0 + + +1 + + +cq cq cq de nocall + + +0 + + +0 + + +0 + + +6 + + +10 + + +1 + + +fsq_heard_log.txt + + +1 + + +fsq_audit_log.txt + + +1 + + +1 + + +1 + + +1 + + +ifkp_heard_log.txt + + +1 + + +ifkp_audit_log.txt + + +1 + + +1 + + +1 + + + + + +32 + + +1 + + +1 + + +8 + + +1 + + +1 + + +1 + + +0 + + +0 + + +0 + + +0 + + +4 + + +1 + + +0 + + +0 + + +0 + + +CQ + + +0 + + +0 + + +1 + + +1 + + +1 + + +1 + + +CW,BPSK-31,RTTY,, + + +1 + + +125 + + +1 + + +1 + + +0 + + + + + + + + +1 + + +0 + + +1 + + +0 + + +1 + + +, + + +1 + + +1 + + +0 + + +1 + + +1 + + +1 + + +1 + + +1 + + +1 + + +1 + + +0 + + + + + +dinner_bell + + +8 + + +0 + + +dinner_bell + + +8 + + +0 + + +2 + + +phone + + +7 + + +0 + + +beeboo + + +6 + + +0 + + +phone + + +7 + + +0 + + +rtty_bell + + +9 + + +50 + + +0 + + +0 + + +1 + + +0 + + +1 + + +25 + + +50 + + +0 + + +500 + + +1500 + + +1250 + + +1750 + + +0 + + +/home/gaston/.fldigi/ + + +0 + + +0 + + +0 + + +https://www.hamcall.net/ + + +https://www.hamqth.com/ + + +http://www.qrz.com/ + + +https://callook.info/ + + +0 + + + + + + + + + + + +0 + + +1 + + +http://www.eqsl.cc/qslcard/importADIF.cfm?ADIFdata= + + + + + + + + + + + + + + +0 + + +0 + + +1 + + +0 + + +1 + + + + + + + + +1 + + +1 + + + + + +15 + + +127.0.0.1 + + +9876 + + +0 + + +0 + + +1 + + +0 + + +0 + + +0 + + +0 + + +0 + + +1 + + +maclogger_udp_strings.txt + + +127.0.0.1 + + +1100 + + +1 + + +0 + + +0 + + +1 + + +0 + + +0 + + +0 + + +0 + + +1 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +/dev/ttyS0 + + +/dev/ttyS0 + + + + + +0 + + + + + +1 + + +2 + + +250 + + +1 + + +0 + + +0 + + +200 + + +/home/gaston/.fldigi/rig-not-assigned.xml + + +/dev/ttyS0 + + +1 + + +2 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +NONE + + +0 + + +GPIO-3 + + +0 + + +0 + + +0 + + +0 + + +0 + + +2 + + +10 + + +50 + + +200 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +2 + + +200 + + +5 + + +0 + + +0 + + +NONE + + +0 + + +1 + + +6 + + +50 + + +18 + + +0 + + +0 + + +1 + + +24 + + +0 + + +0 + + +2125 + + +2 + + +NONE + + +NONE + + +0 + + +0 + + +0 + + +0 + + +1 + + +1 + + +1 + + +1 + + +0 + + +0 + + +0 + + +{{ET_CALLSIGN}} + + + + + + + + + + + + + + +{{ET_CALLSIGN}} + + +3 + + + + + + + + +default + + +19 + + +default + + +19 + + +default + + +19 + + +0 + + + + + +1 + + +1 + + +0 + + +0 + + +-1 + + +1 + + +1 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +/home/gaston/.fldigi/logs/logbook.adif + + +0 + + +1 + + +1 + + +0 + + +1 + + +88 + + +63 + + +55 + + +53 + + +216 + + +1 + + +1 + + +1 + + +0 + + +0 + + +0 + + +120 + + +1 + + +3 + + +*,-.; + + + + + + + + +1 + + +1 + + +20 + + + + + + + + + + + + + + +5 + + + + + + + + + + + +0 + + +0 + + +CALL if (RSTr), if (LOCATOR), NAME, QTH + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +127.0.0.1 + + +20001 + + + + + +w3nr.ddns.net:7300::|dx.n8noe.us:7373::|w0mw.dynip.com:23::| + + +sans + + +0 + + +14 + + +sans + + +0 + + +14 + + + + + + + + + + + +Show DX + + +SH/DX + + +dxcm 2 + + + + + +dxcm 3 + + + + + +dxcm 4 + + + + + +dxcm 5 + + + + + +dxcm 6 + + + + + +dxcm 7 + + + + + +dxcm 8 + + + + + +1 + + +0 + + +0 + + +0 + + +1 + + +0.5 + + +1 + + +1 + + +0 + + +1 + + +0 + + +0 + + +-3 + + +0.2 + + +default.pal + + +1 + + +UTF-8 + + +0 + + +16 + + +1 + + +sans + + +0 + + +16 + + +sans + + +0 + + +12 + + +1 + + +sans + + +0 + + +16 + + +sans + + +0 + + +12 + + +sans + + +0 + + +12 + + +sans + + +0 + + +12 + + +sans + + +0 + + +gtk+ + + +0 + + +1 + + +4 + + +1 + + +1 + + +0 + + +0 + + +1 + + +2 + + +30 + + +25 + + +15 + + +sans + + +0 + + +14 + + +0 + + +127.0.0.1 + + +8421 + + +0 + + +127.0.0.1 + + +7362 + + +127.0.0.1 + + +7322 + + +127.0.0.1 + + +7342 + + +7343 + + +0 + + +1 + + +0 + + +0 + + +3 + + +0 + + +2 + + +1 + + +0 + + +0 + + +0 + + +0 + + +63 + + +10 + + +50 + + +15 + + +100 + + +10 + + +0 + + +3 + + +15 + + +15 + + +0 + + +127.0.0.1 + + +12345 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +report.pskreporter.info + + +4739 + + +0 + + + + + + + + +0 + + +1 + + +1 + + +800 + + +1900 + + +4000 + + +1 + + +5 + + +0.05 + + +15 + + +0 + + +30 + + +500 + + +10 + + +3 + + +1 + + +0 + + +0 + + +0 + + +http://tgftp.nws.noaa.gov/data/observations/metar/decoded/ + + +Connection: close + + +KMDQ + + +1 + + +1 + + +1 + + +1 + + +1 + + +1 + + +1 + + +1 + + +1 + + +1 + + +0 + + +/home/gaston/.fldigi/kml/ + + + + + +10000 + + +0 + + +120 + + +2 + + +60 + + +100 + + +0 + + + + + + + + + + + + + + + + + + + + + + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +0 + + +22 + + +0 + + +0 + + +sans + + +0 + + +0 + + +16 + + +0 + + +0 + + +0 + + +60 + + +100 + + +2000 + + +4000 + + +500 + + +1 + + +1 + + +5 + + +1 + + +1 + + +3 + + +0 + + +0 + + +0 + + +0 + + +4 + + +20 + + +0 + + +0 + + +4 + + +0.95 + + +0 + + +10 + + +0 + + +1 + + +0 + + +0 + + +0 + + +0 + + +0 + + +1 + + +0 + + +2 + + +1 + + +1 + + +1 + + +1 + + From e73679ce9089860f36420de2adf16a6c4df3650b Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Wed, 1 Oct 2025 21:28:06 -0700 Subject: [PATCH 10/27] fldigi - Initial work to enable PnP support for fldigi. Wrote a custom tool to map between an ALSA device and a PortAudio device. --- overlay/etc/skel/.fldigi/fldigi_def.xml | 10 +-- src/et-portaudio/.gitignore | 3 + src/et-portaudio/Makefile | 14 ++++ src/et-portaudio/README.md | 26 ++++++++ src/et-portaudio/gen-fldigi-cfg.sh | 49 ++++++++++++++ src/et-portaudio/main.c | 89 +++++++++++++++++++++++++ 6 files changed, 186 insertions(+), 5 deletions(-) create mode 100644 src/et-portaudio/.gitignore create mode 100644 src/et-portaudio/Makefile create mode 100644 src/et-portaudio/README.md create mode 100755 src/et-portaudio/gen-fldigi-cfg.sh create mode 100644 src/et-portaudio/main.c diff --git a/overlay/etc/skel/.fldigi/fldigi_def.xml b/overlay/etc/skel/.fldigi/fldigi_def.xml index f30f20d..acc0cc1 100644 --- a/overlay/etc/skel/.fldigi/fldigi_def.xml +++ b/overlay/etc/skel/.fldigi/fldigi_def.xml @@ -2144,7 +2144,7 @@ Operator call sign, if distinct from the station call MYCALL --> -3 +1 @@ -2156,19 +2156,19 @@ For compatibility with older versions --> -default +{{ET_PORTAUDIO_DEVICE}} -19 +{{ET_PORTAUDIO_INDEX}} -default +{{ET_PORTAUDIO_DEVICE}} -19 +{{ET_PORTAUDIO_INDEX}} diff --git a/src/et-portaudio/.gitignore b/src/et-portaudio/.gitignore new file mode 100644 index 0000000..015d2e8 --- /dev/null +++ b/src/et-portaudio/.gitignore @@ -0,0 +1,3 @@ +et-portaudio +*.o +conf.tmp diff --git a/src/et-portaudio/Makefile b/src/et-portaudio/Makefile new file mode 100644 index 0000000..c54137a --- /dev/null +++ b/src/et-portaudio/Makefile @@ -0,0 +1,14 @@ +CC = gcc +CFLAGS = -Wall -O2 +LDFLAGS = -lportaudio -lasound + +TARGET = et-portaudio +SRC = main.c + +all: $(TARGET) + +$(TARGET): $(SRC) + $(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS) + +clean: + rm -f $(TARGET) *.o diff --git a/src/et-portaudio/README.md b/src/et-portaudio/README.md new file mode 100644 index 0000000..43afd91 --- /dev/null +++ b/src/et-portaudio/README.md @@ -0,0 +1,26 @@ +# et-portaudio + +A utility program intended for script use to convert a supported +EmComm Tools ALSA audio device (i.e. `ET_AUDIO`) to a PulseAudio device. + +## Usage + +Returns a JSON object with the PulseAudio device details on success. + +```bash +./et-portaudio 2>/dev/null +{ + "device": "USB Audio Device: - (hw:1,0)", + "index": 6 +} +``` + +If no supported device is found or on error, the utility exits with an +exit status of 1. + + +## Build + +``bash +make +``` diff --git a/src/et-portaudio/gen-fldigi-cfg.sh b/src/et-portaudio/gen-fldigi-cfg.sh new file mode 100755 index 0000000..34346bf --- /dev/null +++ b/src/et-portaudio/gen-fldigi-cfg.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# Author : Gaston Gonzalez +# Date : 1 October 2025 +# Purpose : Temporary script to fast-fail dynamic fldigi config for PnP +# +# NOTE: +# +# THIS IS JUST USED DURING DEVELOPMENT. AN XML PARSER WILL BE USED TO MODIFY +# THE FLDIGI CONFIG FOR THE FINAL PNP SOLUTION. SO THAT USER CHANGES CAN STILL +# BE PERSISTED. + +CMD=et-portaudio +PORT_AUDIO_CONF=conf.tmp +FLDIGI_CONF_FILE="${HOME}/.fldigi/fldigi_def.xml" + +# clean up temporary config that may exist +[[ -e ${PORT_AUDIO_CONF} ]] && rm ${PORT_AUDIO_CONF} + +[[ ! -e ${CMD} ]] && make +./${CMD} 2>/dev/null > ${PORT_AUDIO_CONF} + +if [[ $? -ne 0 ]]; then + echo "No supported ET_AUDIO device found" + exit 1 +fi + +DEVICE=$(jq -r -e '.device' ${PORT_AUDIO_CONF}) +if [[ $? -ne 0 ]]; then + echo "Error getting PulseAudio device name for ET_AUDIO device" + exit 1 +fi + +INDEX=$(jq -r -e '.index' ${PORT_AUDIO_CONF}) +if [[ $? -ne 0 ]]; then + echo "Error getting PulseAudio device index for ET_AUDIO device" + exit 1 +fi + +et-log "Copying fldigi template..." +cp -v ../../overlay/etc/skel/.fldigi/fldigi_def.xml ~/.fldigi/ + +et-log "Updating PortAudio devices..." +sed -i "s|^.*|1|" ${FLDIGI_CONF_FILE} + +sed -i "s|^.*|${DEVICE}|" ${FLDIGI_CONF_FILE} +sed -i "s|^.*|${INDEX}|" ${FLDIGI_CONF_FILE} + +sed -i "s|^.*|${DEVICE}|" ${FLDIGI_CONF_FILE} +sed -i "s|^.*|${INDEX}|" ${FLDIGI_CONF_FILE} diff --git a/src/et-portaudio/main.c b/src/et-portaudio/main.c new file mode 100644 index 0000000..76aabfc --- /dev/null +++ b/src/et-portaudio/main.c @@ -0,0 +1,89 @@ +/* + * Author : Gaston Gonzalez + * Date : 1 October 2025 + * Purpose : Maps an ET_AUDIO ALSA device to a PortAudio device. + * + * This utility enumerates all ALSA audio devices using PortAudio + * to identify a currently plugged-in ET_AUDIO device. If a matching + * device is found, it generates a JSON object on STDOUT containing: + * + * - PortAudio device name + * - PortAudio device index + * + * Exit Status: + * 0 - ET_AUDIO device found and JSON output generated successfully + * 1 - ET_AUDIO device not found + */ + +#include +#include +#include +#include "portaudio.h" + +#define PROC_ALSA_PATH_FMT "/proc/asound/card%d/id" + +// Read the ALSA card ID from the /proc filesystem +int get_alsa_card_id(int card, char *id_buf, size_t buf_size) { + char path[64]; + snprintf(path, sizeof(path), PROC_ALSA_PATH_FMT, card); + FILE *f = fopen(path, "r"); + if (!f) return -1; + if (!fgets(id_buf, buf_size, f)) { + fclose(f); + return -1; + } + id_buf[strcspn(id_buf, "\n")] = 0; + fclose(f); + + return 0; +} + +int main(void) { + PaError err; + int i, numDevices; + const PaDeviceInfo *deviceInfo; + const PaHostApiInfo *hostApiInfo; + int found = 0; + + err = Pa_Initialize(); + if (err != paNoError) { + fprintf(stderr, "PortAudio error: %s\n", Pa_GetErrorText(err)); + return 1; + } + + numDevices = Pa_GetDeviceCount(); + if (numDevices < 0) { + fprintf(stderr, "No audio devices found"); + Pa_Terminate(); + return 1; + } + + for (i = 0; i < numDevices; i++) { + deviceInfo = Pa_GetDeviceInfo(i); + hostApiInfo = Pa_GetHostApiInfo(deviceInfo->hostApi); + + // Only show ALSA devices + if (hostApiInfo && strcmp(hostApiInfo->name, "ALSA") == 0) { + int card = -1, device = -1; + + // Extract ALSA card and device (hw:X,Y) + if (sscanf(deviceInfo->name, "%*[^()](hw:%d,%d)", &card, &device) == 2) { + char card_id[64]; + if (get_alsa_card_id(card, card_id, sizeof(card_id)) == 0) { + + // Only print if card ID matches ET_AUDIO + if (strcmp(card_id, "ET_AUDIO") == 0) { + found = 1; + printf("{\n"); + printf(" \"device\": \"%s\",\n", deviceInfo->name); + printf(" \"index\": %d\n", i); + printf("}\n"); + } + } + } + } + } + + Pa_Terminate(); + return found ? 0 : 1; +} From c0f985b61b8b05b9f7118a1f521dfd76b555d0ea Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Thu, 2 Oct 2025 10:28:17 -0700 Subject: [PATCH 11/27] fldigi - Added support for dynamically configuring fldigi to use the user's current callsign and grid square. --- overlay/etc/skel/.fldigi/fldigi_def.xml | 4 +-- src/et-portaudio/gen-fldigi-cfg.sh | 48 ++++++++++++++++++++++--- 2 files changed, 45 insertions(+), 7 deletions(-) diff --git a/overlay/etc/skel/.fldigi/fldigi_def.xml b/overlay/etc/skel/.fldigi/fldigi_def.xml index acc0cc1..edab13c 100644 --- a/overlay/etc/skel/.fldigi/fldigi_def.xml +++ b/overlay/etc/skel/.fldigi/fldigi_def.xml @@ -2131,7 +2131,7 @@ Operator name --> - +{{ET_GRID}} @@ -2139,7 +2139,7 @@ Antenna description (keep short!) --> -{{ET_CALLSIGN}} + -0 +1 @@ -1805,7 +1805,7 @@ Hamlib rig name --> -0 +2 @@ -1865,7 +1865,7 @@ Use separate device for PTT --> -0 +1 diff --git a/src/et-portaudio/gen-fldigi-cfg.sh b/src/et-portaudio/gen-fldigi-cfg.sh index e492669..7cfc281 100755 --- a/src/et-portaudio/gen-fldigi-cfg.sh +++ b/src/et-portaudio/gen-fldigi-cfg.sh @@ -9,7 +9,8 @@ CMD=et-portaudio PORT_AUDIO_CONF=conf.tmp GEO_CONF=geo.tmp -FLDIGI_CONF_FILE="${HOME}/.fldigi/fldigi_def.xml" +FLDIGI_CONF_DIR="${HOME}/.fldigi" +FLDIGI_CONF_FILE="${FLDIGI_CONF_DIR}/fldigi_def.xml" [ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json" @@ -36,13 +37,20 @@ if [[ $? -ne 0 ]]; then exit 1 fi +################################ +# Bootstrap fldigi configuration +################################ +et-log "Checking for .fldigi directory" +[[ ! -e ${FLDIGI_CONF_DIR} ]] && mkdir -v ${FLDIGI_CONF_DIR} + et-log "Copying fldigi template..." cp -v ../../overlay/etc/skel/.fldigi/fldigi_def.xml ~/.fldigi/ + ############################################## # Map ALSA ET_AUDIO device to PortAudio device ############################################## -et-log "Updating PortAudio devices..." +et-log "Updating PortAudio device configuration..." sed -i "s|^.*|1|" ${FLDIGI_CONF_FILE} @@ -58,7 +66,7 @@ et-log "Using device '${DEVICE}' and device index '${INDEX}' for PortAudio confi ################# # Update callsign ################# -et-log "Updating callsign..." +et-log "Updating callsign configuration..." CALLSIGN=$(jq -r -e '.callsign' ${ET_USER_CONFIG}) if [[ "${CALLSIGN}" = "N0CALL" ]]; then @@ -85,3 +93,13 @@ if [[ $? -eq 0 ]]; then fi [[ -e ${GEO_CONF} ]] && rm ${GEO_CONF} + + +##################################################################### +# Configure CAT interface using Hamlib's rig control daemon (rigctld) +##################################################################### +et-log "Updating CAT control configuration..." + +sed -i "s|^.*|1|" ${FLDIGI_CONF_FILE} +sed -i "s|^.*|2|" ${FLDIGI_CONF_FILE} +sed -i "s|^.*|1|" ${FLDIGI_CONF_FILE} From 8c4ec9cd4aac4e2b3903f9c2ca808ca2881ea289 Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Thu, 2 Oct 2025 11:08:27 -0700 Subject: [PATCH 13/27] fldigi - Fixed issue preventing frequency selection with rig control --- overlay/etc/skel/.fldigi/fldigi_def.xml | 2 +- src/et-portaudio/gen-fldigi-cfg.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/overlay/etc/skel/.fldigi/fldigi_def.xml b/overlay/etc/skel/.fldigi/fldigi_def.xml index 05ec80b..75927ae 100644 --- a/overlay/etc/skel/.fldigi/fldigi_def.xml +++ b/overlay/etc/skel/.fldigi/fldigi_def.xml @@ -1797,7 +1797,7 @@ PTT device --> -/dev/ttyS0 +localhost:4532 diff --git a/src/et-portaudio/gen-fldigi-cfg.sh b/src/et-portaudio/gen-fldigi-cfg.sh index 7cfc281..e17b794 100755 --- a/src/et-portaudio/gen-fldigi-cfg.sh +++ b/src/et-portaudio/gen-fldigi-cfg.sh @@ -103,3 +103,4 @@ et-log "Updating CAT control configuration..." sed -i "s|^.*|1|" ${FLDIGI_CONF_FILE} sed -i "s|^.*|2|" ${FLDIGI_CONF_FILE} sed -i "s|^.*|1|" ${FLDIGI_CONF_FILE} +sed -i "s|^.*|localhost:4532|" ${FLDIGI_CONF_FILE} From 63a97e9d1bb33323a9469e260a98bc8f5f108564 Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Thu, 2 Oct 2025 11:24:58 -0700 Subject: [PATCH 14/27] fldigi - Added support for enabling Reed Soloman ID for RX and TX --- overlay/etc/skel/.fldigi/fldigi_def.xml | 4 ++-- src/et-portaudio/gen-fldigi-cfg.sh | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/overlay/etc/skel/.fldigi/fldigi_def.xml b/overlay/etc/skel/.fldigi/fldigi_def.xml index 75927ae..c16dc8c 100644 --- a/overlay/etc/skel/.fldigi/fldigi_def.xml +++ b/overlay/etc/skel/.fldigi/fldigi_def.xml @@ -38,11 +38,11 @@ RSID minimum search bandwidth in Hertz --> -0 +1 -0 +1 -0 +1 diff --git a/src/et-portaudio/gen-fldigi-cfg.sh b/src/et-portaudio/gen-fldigi-cfg.sh index 0b02148..b345b96 100755 --- a/src/et-portaudio/gen-fldigi-cfg.sh +++ b/src/et-portaudio/gen-fldigi-cfg.sh @@ -106,8 +106,18 @@ sed -i "s|^.*|1|" ${FLDIGI_CONF_FILE} sed -i "s|^.*|localhost:4532|" ${FLDIGI_CONF_FILE} +###################################### # Enable Reed Soloman ID for RX and TX +###################################### et-log "Enabling Reed Soloman ID for RX/TX..." sed -i "s|^.*|1|" ${FLDIGI_CONF_FILE} sed -i "s|^.*|1|" ${FLDIGI_CONF_FILE} + + +########################### +# Modem configuration: MT63 +########################### +et-log "Updating MT63 modem configuration..." + +sed -i "s|^.*|1|" ${FLDIGI_CONF_FILE} From aa1e8f674af18f2f24109f0ee9ecc8a39a645c6f Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Thu, 2 Oct 2025 11:57:56 -0700 Subject: [PATCH 17/27] fldigi - Added 2 second deplay when keying up to allow linked repeaters to establish links --- overlay/etc/skel/.fldigi/fldigi_def.xml | 2 +- src/et-portaudio/gen-fldigi-cfg.sh | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/overlay/etc/skel/.fldigi/fldigi_def.xml b/overlay/etc/skel/.fldigi/fldigi_def.xml index ac8fd99..e2cd3d4 100644 --- a/overlay/etc/skel/.fldigi/fldigi_def.xml +++ b/overlay/etc/skel/.fldigi/fldigi_def.xml @@ -1277,7 +1277,7 @@ Video ID text for SENDTEXTID (keep short!) --> -0 +2 diff --git a/src/et-portaudio/gen-fldigi-cfg.sh b/src/et-portaudio/gen-fldigi-cfg.sh index b345b96..cc811a8 100755 --- a/src/et-portaudio/gen-fldigi-cfg.sh +++ b/src/et-portaudio/gen-fldigi-cfg.sh @@ -121,3 +121,11 @@ sed -i "s|^.*|1|" ${FLDIGI_CONF_FILE} et-log "Updating MT63 modem configuration..." sed -i "s|^.*|1|" ${FLDIGI_CONF_FILE} + + +######################## +# Repeater configuration +######################## +et-log "Updating settings for linked repeater systems..." +# Key up for 2 seconds before transmitting tone. Needed for linked repeater systems. +sed -i "s|^.*|2|" ${FLDIGI_CONF_FILE} From 9a474de136ca046cfbfc0eb94f84501c90464523 Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Thu, 2 Oct 2025 12:10:27 -0700 Subject: [PATCH 18/27] fldigi - Added NBEMS settings --- overlay/etc/skel/.fldigi/fldigi_def.xml | 4 ++-- src/et-portaudio/gen-fldigi-cfg.sh | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/overlay/etc/skel/.fldigi/fldigi_def.xml b/overlay/etc/skel/.fldigi/fldigi_def.xml index e2cd3d4..0472d43 100644 --- a/overlay/etc/skel/.fldigi/fldigi_def.xml +++ b/overlay/etc/skel/.fldigi/fldigi_def.xml @@ -1399,11 +1399,11 @@ close flmsg --> -0 +1 - +/usr/local/bin/flmsg diff --git a/src/et-portaudio/gen-fldigi-cfg.sh b/src/et-portaudio/gen-fldigi-cfg.sh index cc811a8..d102f8a 100755 --- a/src/et-portaudio/gen-fldigi-cfg.sh +++ b/src/et-portaudio/gen-fldigi-cfg.sh @@ -127,5 +127,18 @@ sed -i "s|^.*|1|" ${FLDIGI_C # Repeater configuration ######################## et-log "Updating settings for linked repeater systems..." + # Key up for 2 seconds before transmitting tone. Needed for linked repeater systems. sed -i "s|^.*|2|" ${FLDIGI_CONF_FILE} + + +##################### +# NBEMS configuration +##################### +et-log "Updating settings for NBEMS..." + +sed -i "s|^.*|1|" ${FLDIGI_CONF_FILE} +sed -i "s|^.*|/usr/local/bin/flmsg|" ${FLDIGI_CONF_FILE} + +# TODO: Add flmsg to ETC installer +# TODO: Add flamp to ETC installer From 6021b142434fe5da686abc214bad2b85e25e727c Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Thu, 2 Oct 2025 12:25:19 -0700 Subject: [PATCH 19/27] fldigi - Added TODO items --- src/et-portaudio/gen-fldigi-cfg.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/et-portaudio/gen-fldigi-cfg.sh b/src/et-portaudio/gen-fldigi-cfg.sh index d102f8a..9f85b8e 100755 --- a/src/et-portaudio/gen-fldigi-cfg.sh +++ b/src/et-portaudio/gen-fldigi-cfg.sh @@ -142,3 +142,6 @@ sed -i "s|^.*|/usr/local/bin/flmsg Date: Thu, 2 Oct 2025 13:42:13 -0700 Subject: [PATCH 20/27] fldigi - Add custom et-portaudio comment to system-wide installer --- scripts/install-et-portaudio.sh | 32 ++++++++++++++++++++++++++++++++ scripts/install.sh | 4 +++- src/et-portaudio/Makefile | 11 +++++++++++ src/et-portaudio/README.md | 6 ++++++ tests/test-et-portaudio.sh | 7 +++++++ 5 files changed, 59 insertions(+), 1 deletion(-) create mode 100755 scripts/install-et-portaudio.sh create mode 100755 tests/test-et-portaudio.sh diff --git a/scripts/install-et-portaudio.sh b/scripts/install-et-portaudio.sh new file mode 100755 index 0000000..23bf16e --- /dev/null +++ b/scripts/install-et-portaudio.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# Author : Gaston Gonzalez +# Date : 2 October 2025 +# Purpose : Builds and installs et-portaudio +set -e +trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG +trap 'et-log "\"${last_command}\" command failed with exit code $?."' ERR + +. ./env.sh + +APP="et-portaudio" +VERSION="1.0.0" +APP_AND_VERSION="${APP}-${VERSION}" +INSTALL_DIR="/opt/${APP_AND_VERSION}" +INSTALL_BIN_DIR="${INSTALL_DIR}/bin" +LINK_PATH="/opt/${APP}" + +et-log "Installing ${APP} ${VERSION}" + +CWD_DIR=`pwd` + +cd ../src/et-portaudio + +# Compile +make install + +[[ -e ${LINK_PATH} ]] && rm ${LINK_PATH} +ln -v -s ${INSTALL_DIR} ${LINK_PATH} + +stow -v -d /opt ${APP} -t /usr/local + +cd ${CWD} diff --git a/scripts/install.sh b/scripts/install.sh index d59220c..06e94f8 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -2,7 +2,7 @@ # # Author : Gaston Gonzalez # Date : 16 March 2024 -# Updated : 30 September 2025 +# Updated : 2 October 2025 # Purpose : Main installer for EmComm Tools Community (ETC) . ./env.sh @@ -90,4 +90,6 @@ exitIfNotRoot # Install fldigi suite ./install-fldigi.sh +./install-et-portaudio.sh + # TODO: add installers for flmsg and flamp diff --git a/src/et-portaudio/Makefile b/src/et-portaudio/Makefile index c54137a..61b64d4 100644 --- a/src/et-portaudio/Makefile +++ b/src/et-portaudio/Makefile @@ -4,11 +4,22 @@ LDFLAGS = -lportaudio -lasound TARGET = et-portaudio SRC = main.c +VERSION=1.0.0 +INSTALL_DIR = /opt/et-portaudio-$(VERSION)/bin + +.PHONY: install all: $(TARGET) $(TARGET): $(SRC) $(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS) +install: $(TARGET) + @echo "Installing $(TARGET) to $(INSTALL_DIR)..." + @mkdir -p $(INSTALL_DIR) + @cp $(TARGET) $(INSTALL_DIR)/ + @chmod 755 $(INSTALL_DIR)/$(TARGET) + @echo "Done." + clean: rm -f $(TARGET) *.o diff --git a/src/et-portaudio/README.md b/src/et-portaudio/README.md index 43afd91..e4f6ac4 100644 --- a/src/et-portaudio/README.md +++ b/src/et-portaudio/README.md @@ -24,3 +24,9 @@ exit status of 1. ``bash make ``` + +## Install + +```bash +sudo make install +``` diff --git a/tests/test-et-portaudio.sh b/tests/test-et-portaudio.sh new file mode 100755 index 0000000..d82bdcf --- /dev/null +++ b/tests/test-et-portaudio.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Author : Gaston Gonzalez +# Date : 2 October 2025 +# Purpose : Test et-portaudio installation + +OUT=$(which et-portaudio) +exit $? From c5426f827c7c667c445601ce9307264fc3726c7c Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Thu, 2 Oct 2025 13:48:35 -0700 Subject: [PATCH 21/27] fldigi - Minor updates following code review --- scripts/install-et-portaudio.sh | 1 - src/et-portaudio/.gitignore | 1 - 2 files changed, 2 deletions(-) diff --git a/scripts/install-et-portaudio.sh b/scripts/install-et-portaudio.sh index 23bf16e..8326164 100755 --- a/scripts/install-et-portaudio.sh +++ b/scripts/install-et-portaudio.sh @@ -12,7 +12,6 @@ APP="et-portaudio" VERSION="1.0.0" APP_AND_VERSION="${APP}-${VERSION}" INSTALL_DIR="/opt/${APP_AND_VERSION}" -INSTALL_BIN_DIR="${INSTALL_DIR}/bin" LINK_PATH="/opt/${APP}" et-log "Installing ${APP} ${VERSION}" diff --git a/src/et-portaudio/.gitignore b/src/et-portaudio/.gitignore index 015d2e8..a75e2aa 100644 --- a/src/et-portaudio/.gitignore +++ b/src/et-portaudio/.gitignore @@ -1,3 +1,2 @@ et-portaudio *.o -conf.tmp From b5d15eb960251255efc20515d734b05c0c205c5c Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Thu, 2 Oct 2025 14:01:52 -0700 Subject: [PATCH 22/27] fldigi Initial fldigi wrapper script. This is WiP. I need to port the configuration update logic from the test script under src/et-portaudio. Added fldigi to the list of services/modes to kill --- overlay/opt/emcomm-tools/bin/et-fldigi | 73 ++++++++++++++++++++++++ overlay/opt/emcomm-tools/bin/et-kill-all | 6 +- 2 files changed, 78 insertions(+), 1 deletion(-) create mode 100755 overlay/opt/emcomm-tools/bin/et-fldigi diff --git a/overlay/opt/emcomm-tools/bin/et-fldigi b/overlay/opt/emcomm-tools/bin/et-fldigi new file mode 100755 index 0000000..b4aa316 --- /dev/null +++ b/overlay/opt/emcomm-tools/bin/et-fldigi @@ -0,0 +1,73 @@ +#!/bin/bash +# +# Author : Gaston Gonzalez +# Date : 2 October 2025 +# Purpose : Wrapper script for starting fldigi with PnP support +# +# Preconditions +# 1. Supported radio and audio interface are connected and properly detected +# +# Postconditions +# 1. Stop all running EmComm Tools modes +# 2. fldigi core settings updated (e.g., CAT, audio, user config and ETC defaults) +# 3. fldigi started + +usage() { + echo "usage: $(basename $0) " + echo " start - Update config and start fldigi" + echo " update-config - Update config" +} + +if [[ $# -ne 1 ]]; then + usage + exit 1 +fi + +notify_user() { + notify-send \ + -t 5000 \ + --app-name="EmComm Tools" \ + "$1" +} + +start() { + /opt/emcomm-tools/bin/et-kill-all && update-config && /usr/local/bin/fldigi & +} + +update-config () { + + # 1. Check if the audio symlink was created by the udev rules + if [[ -e /dev/et-audio ]]; then + + # 2. Check that this device was properly tagged with the ET_AUDIO env variable + APLAY_OUT=$(arecord -l | grep ET_AUDIO) + if [[ $? -eq 0 ]]; then + + ## Configure ALSA settings for sound card + /opt/emcomm-tools/bin/et-audio update-config + + else + et-log "No ET_AUDIO device detected." + notify_user "Can't start fldigi. No ET_AUDIO device detected." + exit 1 + fi + else + et-log "No ET_AUDIO device plugged in." + notify_user "Can't start fldigi. No supported audio device plugged in." + exit 1 + fi +} + +case $1 in + start) + start + ;; + update-config) + update-config + ;; + *) + echo "Invalid command." + usage + exit 1 + ;; +esac diff --git a/overlay/opt/emcomm-tools/bin/et-kill-all b/overlay/opt/emcomm-tools/bin/et-kill-all index b08e594..3ecc77d 100755 --- a/overlay/opt/emcomm-tools/bin/et-kill-all +++ b/overlay/opt/emcomm-tools/bin/et-kill-all @@ -2,7 +2,7 @@ # # Author : Gaston Gonzalez # Date : 12 November 2024 -# Updated : 7 February 2025 +# Updated : 2 October 2025 # Purpose : Stops all EmComm Tools sound-based services (i.e. modems) and # amatuer radio applications to ensure a clean start for the next mode. @@ -33,6 +33,10 @@ stop_all_services() { pkill et-vara pkill VARA + # Stop fldigi + pkill fldigi + pkill et-fldigi + stop_pat } From d1383c2292273677cd95a9f55690991946d84336 Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Thu, 2 Oct 2025 14:20:00 -0700 Subject: [PATCH 23/27] fldigi - Updated et-fldigi wrapper script to fully configure the necessary fldigi settings on startup --- overlay/opt/emcomm-tools/bin/et-fldigi | 130 ++++++++++++++++++++++++- 1 file changed, 129 insertions(+), 1 deletion(-) diff --git a/overlay/opt/emcomm-tools/bin/et-fldigi b/overlay/opt/emcomm-tools/bin/et-fldigi index b4aa316..2356553 100755 --- a/overlay/opt/emcomm-tools/bin/et-fldigi +++ b/overlay/opt/emcomm-tools/bin/et-fldigi @@ -36,7 +36,7 @@ start() { update-config () { - # 1. Check if the audio symlink was created by the udev rules + # 1. Check if the audio device symlink was created by the udev rules if [[ -e /dev/et-audio ]]; then # 2. Check that this device was properly tagged with the ET_AUDIO env variable @@ -56,6 +56,134 @@ update-config () { notify_user "Can't start fldigi. No supported audio device plugged in." exit 1 fi + + PORT_AUDIO_CONF=/tmp/conf.tmp + GEO_CONF=/tmp/geo.tmp + FLDIGI_CONF_DIR="${HOME}/.fldigi" + FLDIGI_CONF_FILE="${FLDIGI_CONF_DIR}/fldigi_def.xml" + + if [[ ! -e ${FLDIGI_CONF_DIR} ]]; then + et-log "${FLDIGI_CONF_DIR} does not exist. Creating it from template." + mkdir -v ${FLDIGI_CONF_DIR} + cp -v /etc/skel/.fldigi/fldigi_def.xml ${FLDIGI_CONF_DIR} + fi + + [ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json" + + # clean up temporary config that may exist + [[ -e ${PORT_AUDIO_CONF} ]] && rm ${PORT_AUDIO_CONF} + + et-portaudio 2>/dev/null > ${PORT_AUDIO_CONF} + + if [[ $? -ne 0 ]]; then + echo "No supported ET_AUDIO device found" + exit 1 + fi + + DEVICE=$(jq -r -e '.device' ${PORT_AUDIO_CONF}) + if [[ $? -ne 0 ]]; then + echo "Error getting PulseAudio device name for ET_AUDIO device" + exit 1 + fi + + INDEX=$(jq -r -e '.index' ${PORT_AUDIO_CONF}) + if [[ $? -ne 0 ]]; then + echo "Error getting PulseAudio device index for ET_AUDIO device" + exit 1 + fi + + ############################################## + # Map ALSA ET_AUDIO device to PortAudio device + ############################################## + et-log "Updating PortAudio device configuration..." + + sed -i "s|^.*|1|" ${FLDIGI_CONF_FILE} + + sed -i "s|^.*|${DEVICE}|" ${FLDIGI_CONF_FILE} + sed -i "s|^.*|${INDEX}|" ${FLDIGI_CONF_FILE} + + sed -i "s|^.*|${DEVICE}|" ${FLDIGI_CONF_FILE} + sed -i "s|^.*|${INDEX}|" ${FLDIGI_CONF_FILE} + + et-log "Using device '${DEVICE}' and device index '${INDEX}' for PortAudio configuration" + + + ################# + # Update callsign + ################# + et-log "Updating callsign configuration..." + CALLSIGN=$(jq -r -e '.callsign' ${ET_USER_CONFIG}) + + if [[ "${CALLSIGN}" = "N0CALL" ]]; then + et-log "Exiting early. No callsign set. Run: et-user." + exit 1 + fi + + et-log "Using callsign '${CALLSIGN}'" + sed -i "s|^.*|${CALLSIGN}|" ${FLDIGI_CONF_FILE} + + + ############################################### + # Update grid based on ETC geolocation services + ############################################### + et-log "Updating your grid square..." + curl -f -s "http://localhost:1981/api/geo/position" > ${GEO_CONF} + + if [[ $? -eq 0 ]]; then + GRID=$(jq -r -e '.position.gridSquare' ${GEO_CONF}) + if [[ $? -eq 0 ]]; then + et-log "Using grid square '${GRID}' for your location" + sed -i "s|^.*|${GRID}|" ${FLDIGI_CONF_FILE} + fi + fi + + [[ -e ${GEO_CONF} ]] && rm ${GEO_CONF} + + + ##################################################################### + # Configure CAT interface using Hamlib's rig control daemon (rigctld) + ##################################################################### + et-log "Updating CAT control configuration..." + + sed -i "s|^.*|1|" ${FLDIGI_CONF_FILE} + sed -i "s|^.*|2|" ${FLDIGI_CONF_FILE} + sed -i "s|^.*|1|" ${FLDIGI_CONF_FILE} + sed -i "s|^.*|localhost:4532|" ${FLDIGI_CONF_FILE} + + + ###################################### + # Enable Reed Soloman ID for RX and TX + ###################################### + et-log "Enabling Reed Soloman ID for RX/TX..." + + sed -i "s|^.*|1|" ${FLDIGI_CONF_FILE} + sed -i "s|^.*|1|" ${FLDIGI_CONF_FILE} + + + ########################### + # Modem configuration: MT63 + ########################### + et-log "Updating MT63 modem configuration..." + + sed -i "s|^.*|1|" ${FLDIGI_CONF_FILE} + + + ######################## + # Repeater configuration + ######################## + et-log "Updating settings for linked repeater systems..." + + # Key up for 2 seconds before transmitting tone. Needed for linked repeater systems. + sed -i "s|^.*|2|" ${FLDIGI_CONF_FILE} + + + ##################### + # NBEMS configuration + ##################### + et-log "Updating settings for NBEMS..." + + sed -i "s|^.*|1|" ${FLDIGI_CONF_FILE} + sed -i "s|^.*|/usr/local/bin/flmsg|" ${FLDIGI_CONF_FILE} } case $1 in From abdb47bfa70a1c42c4fb3c17512b367033eb750f Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Thu, 2 Oct 2025 14:41:05 -0700 Subject: [PATCH 24/27] fldigi - Patched fldigi's .desktop file to use the et-fldigi wrapper to ensure PnP support --- scripts/install-fldigi.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/install-fldigi.sh b/scripts/install-fldigi.sh index 673dbc3..ae38643 100755 --- a/scripts/install-fldigi.sh +++ b/scripts/install-fldigi.sh @@ -1,6 +1,7 @@ #!/bin/bash # Author : Gaston Gonzalez # Date : 17 September 2025 +# Updated : 2 October 2025 # Purpose : Builds and installs fldigi set -e trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG @@ -36,6 +37,9 @@ make # Install make install +# Use wrapper script as launcher executable +sed -i 's|^Exec.*|Exec=/opt/emcomm-tools/bin/et-fldigi start|' /opt/fldigi/share/applications/fldigi.desktop + [[ -e ${LINK_PATH} ]] && rm ${LINK_PATH} ln -v -s ${INSTALL_DIR} ${LINK_PATH} From 31b7b131bc1c0587107e93f0bc88f7d2bb7f1a5b Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Thu, 2 Oct 2025 14:45:58 -0700 Subject: [PATCH 25/27] fldigi - Added fldigi to the Ubuntu Launcher --- .../share/glib-2.0/schemas/90_ubuntu-settings.gschema.override | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlay/usr/share/glib-2.0/schemas/90_ubuntu-settings.gschema.override b/overlay/usr/share/glib-2.0/schemas/90_ubuntu-settings.gschema.override index 13f00af..af23eb0 100644 --- a/overlay/usr/share/glib-2.0/schemas/90_ubuntu-settings.gschema.override +++ b/overlay/usr/share/glib-2.0/schemas/90_ubuntu-settings.gschema.override @@ -12,7 +12,7 @@ show-desktop-icons = false picture-uri = 'file:///usr/share/backgrounds/emcomm-tools-wallpaper.png' [org.gnome.shell] -favorite-apps = ['emcomm-tools.desktop', 'js8call.desktop', 'et-aircraft.desktop', 'org.gnome.Terminal.desktop', 'navit.desktop', 'min.desktop', 'org.gnome.Nautilus.desktop'] +favorite-apps = ['emcomm-tools.desktop', 'js8call.desktop', 'fldigi.desktop', 'et-aircraft.desktop', 'org.gnome.Terminal.desktop', 'navit.desktop', 'min.desktop', 'org.gnome.Nautilus.desktop'] last-selected-power-profile = 'performance' [org.gnome.system.location] From 12ae056be681cc82e1b60e1816758af8cc78ea1b Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Thu, 2 Oct 2025 14:54:57 -0700 Subject: [PATCH 26/27] Post R5 Build 10 fix to avoid overdriving audio on the FT-8xx radios via the DigiRig Mobile --- overlay/opt/emcomm-tools/bin/et-audio | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/overlay/opt/emcomm-tools/bin/et-audio b/overlay/opt/emcomm-tools/bin/et-audio index 7f695de..b7a4e05 100755 --- a/overlay/opt/emcomm-tools/bin/et-audio +++ b/overlay/opt/emcomm-tools/bin/et-audio @@ -50,8 +50,10 @@ update-config () { case ${ET_DEVICE_NAME} in "DIGIRIG_MOBILE") + # TODO: 92% is needed for the TX-500MP. Revisit approach for setting speaker + # out differently across radios definitions. # Unmute Speaker a set volume. Adjust if remote station can't decode you. Your TX controls. - amixer -q -c ${AUDIO_CARD} sset Speaker Playback Switch 92% unmute + amixer -q -c ${AUDIO_CARD} sset Speaker Playback Switch 42% unmute # Unmute Mic amixer -q -c ${AUDIO_CARD} sset Mic Playback Switch 52% unmute # Set "L/R Capture" to 19. Adjust if you can't decode received audio. Your RX controls. From bd65d6e67fcef5cf8c7c47bef711605e5d3e1fad Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Thu, 2 Oct 2025 18:26:39 -0700 Subject: [PATCH 27/27] Post R5 Build 11 fixes to resolve fldigi installation issues on clean image --- overlay/opt/emcomm-tools/bin/et-fldigi | 6 +++--- overlay/opt/emcomm-tools/bin/et-kill-all | 4 ---- scripts/install-fldigi.sh | 7 ++++--- tests/test-fldigi.sh | 7 +++++++ 4 files changed, 14 insertions(+), 10 deletions(-) create mode 100755 tests/test-fldigi.sh diff --git a/overlay/opt/emcomm-tools/bin/et-fldigi b/overlay/opt/emcomm-tools/bin/et-fldigi index 2356553..70d0e52 100755 --- a/overlay/opt/emcomm-tools/bin/et-fldigi +++ b/overlay/opt/emcomm-tools/bin/et-fldigi @@ -76,19 +76,19 @@ update-config () { et-portaudio 2>/dev/null > ${PORT_AUDIO_CONF} if [[ $? -ne 0 ]]; then - echo "No supported ET_AUDIO device found" + et-log "No supported ET_AUDIO device found" exit 1 fi DEVICE=$(jq -r -e '.device' ${PORT_AUDIO_CONF}) if [[ $? -ne 0 ]]; then - echo "Error getting PulseAudio device name for ET_AUDIO device" + et-log "Error getting PulseAudio device name for ET_AUDIO device" exit 1 fi INDEX=$(jq -r -e '.index' ${PORT_AUDIO_CONF}) if [[ $? -ne 0 ]]; then - echo "Error getting PulseAudio device index for ET_AUDIO device" + et-log "Error getting PulseAudio device index for ET_AUDIO device" exit 1 fi diff --git a/overlay/opt/emcomm-tools/bin/et-kill-all b/overlay/opt/emcomm-tools/bin/et-kill-all index 3ecc77d..ed0b8b3 100755 --- a/overlay/opt/emcomm-tools/bin/et-kill-all +++ b/overlay/opt/emcomm-tools/bin/et-kill-all @@ -33,10 +33,6 @@ stop_all_services() { pkill et-vara pkill VARA - # Stop fldigi - pkill fldigi - pkill et-fldigi - stop_pat } diff --git a/scripts/install-fldigi.sh b/scripts/install-fldigi.sh index ae38643..6c4e4ce 100755 --- a/scripts/install-fldigi.sh +++ b/scripts/install-fldigi.sh @@ -37,12 +37,13 @@ make # Install make install -# Use wrapper script as launcher executable -sed -i 's|^Exec.*|Exec=/opt/emcomm-tools/bin/et-fldigi start|' /opt/fldigi/share/applications/fldigi.desktop - [[ -e ${LINK_PATH} ]] && rm ${LINK_PATH} ln -v -s ${INSTALL_DIR} ${LINK_PATH} stow -v -d /opt ${APP} -t /usr/local cd ${CWD} + +# Use wrapper script as launcher executable +sed -i 's|^Exec.*|Exec=/opt/emcomm-tools/bin/et-fldigi start|' /opt/fldigi/share/applications/fldigi.desktop + diff --git a/tests/test-fldigi.sh b/tests/test-fldigi.sh new file mode 100755 index 0000000..8cb4197 --- /dev/null +++ b/tests/test-fldigi.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Author : Gaston Gonzalez +# Date : 2 October 2025 +# Purpose : Test fldigi installation + +OUT=$(which fldigi) +exit $?