From 4b73fd3df3869db15c70ada6c8d647ee8b90f8b4 Mon Sep 17 00:00:00 2001 From: Gaston Gonzalez Date: Fri, 13 Dec 2024 06:31:31 -0700 Subject: [PATCH 1/4] PnP - Added initial support for the Icom IC-7300. Note: This implementation was written without a radio. It has not been tested --- overlay/etc/udev/rules.d/83-et-ic7300.rules | 34 +++++++++++++++++++ overlay/opt/emcomm-tools/bin/et-radio | 4 +-- .../conf/radios.d/icom-ic7300.json | 12 +++++++ 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 overlay/etc/udev/rules.d/83-et-ic7300.rules create mode 100644 overlay/opt/emcomm-tools/conf/radios.d/icom-ic7300.json diff --git a/overlay/etc/udev/rules.d/83-et-ic7300.rules b/overlay/etc/udev/rules.d/83-et-ic7300.rules new file mode 100644 index 0000000..20c4690 --- /dev/null +++ b/overlay/etc/udev/rules.d/83-et-ic7300.rules @@ -0,0 +1,34 @@ +# Author : Gaston Gonzalez +# Date : 13 December 2024 +# Purpose : udev rules for the Icom IC-7300 +# +# Preconditions: +# 1. IC-7300 turned on +# 2. IC-7300 connected via USB cable +# +# Postconditions: +# 1. /dev/et-cat created +# 3. /dev/et-audio created +# 3. rigctld is started + +# Create consistent device name/path for the CAT serial device +KERNEL=="ttyUSB[0-9]*", SUBSYSTEM=="tty", ATTRS{serial}=="IC-7300*", \ + ENV{ET_DEVICE}="IC-7300" + +# Create consistent device name/path for the CAT serial device +# Prevent the gpsd system unit from incorrectly flagging this as a GPS device +ENV{ET_DEVICE}=="IC-7300", SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4" ATTRS{idProduct}=="ea60", \ + ACTION=="add", \ + ENV{SYSTEMD_WANTS}="", \ + ENV{ET_SUBDEVICE}="CAT", GROUP="dialout", MODE="0660", SYMLINK+="et-cat", \ + RUN+="/usr/bin/systemctl start rigctld" + +# This rule generically matches the following Icom radios: +# 1. IC-705 +# 2. IC-7100 +# 3. IC-7200 +# 4. IC-7300 +SUBSYSTEM=="sound", ATTRS{idVendor}=="08bb", ATTRS{idProduct}=="2901", ENV{ET_DEVICE}=="", \ + ACTION=="add", \ + ATTR{id}="ET_AUDIO", \ + ENV{ET_DEVICE}="Icom generic", ENV{ET_SUBDEVICE}="AUDIO", GROUP="audio", MODE="0660", SYMLINK+="et-audio" diff --git a/overlay/opt/emcomm-tools/bin/et-radio b/overlay/opt/emcomm-tools/bin/et-radio index cf0e352..d768ccb 100755 --- a/overlay/opt/emcomm-tools/bin/et-radio +++ b/overlay/opt/emcomm-tools/bin/et-radio @@ -2,7 +2,7 @@ # # Author : Gaston Gonzalez # Date : 11 October 2024 -# Updated : 10 November 2024 +# Updated : 13 December 2024 # Purpose : A script for managaing plug-and-play radios set -e @@ -25,7 +25,7 @@ while IFS= read -r radio; do options+=("$ID" "$VENDOR $MODEL") done < <(find $ET_HOME/conf/radios.d -type f | sort) -SELECTED_RADIO=$(dialog --clear --menu "Select a radio:" 20 60 10 "${options[@]}" 3>&1 1>&2 2>&3) +SELECTED_RADIO=$(dialog --clear --menu "Select a radio:" 21 60 10 "${options[@]}" 3>&1 1>&2 2>&3) exit_status=$? tput sgr 0 && clear diff --git a/overlay/opt/emcomm-tools/conf/radios.d/icom-ic7300.json b/overlay/opt/emcomm-tools/conf/radios.d/icom-ic7300.json new file mode 100644 index 0000000..61fb978 --- /dev/null +++ b/overlay/opt/emcomm-tools/conf/radios.d/icom-ic7300.json @@ -0,0 +1,12 @@ +{ + "id": "icom-ic7300", + "vendor": "Icom", + "model": "IC-7300", + "rigctrl": { + "id": "3073", + "baud": "9600", + "ptt": "RIG" + }, + "notes": [ + ] +} From 097fb2afce06ee5b5553b3791b9ad026ab299ffd Mon Sep 17 00:00:00 2001 From: Gaston Gonzalez Date: Fri, 13 Dec 2024 12:44:32 -0700 Subject: [PATCH 2/4] PnP Update baud rate for IC-7300 --- overlay/opt/emcomm-tools/conf/radios.d/icom-ic7300.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/overlay/opt/emcomm-tools/conf/radios.d/icom-ic7300.json b/overlay/opt/emcomm-tools/conf/radios.d/icom-ic7300.json index 61fb978..3c8f9bb 100644 --- a/overlay/opt/emcomm-tools/conf/radios.d/icom-ic7300.json +++ b/overlay/opt/emcomm-tools/conf/radios.d/icom-ic7300.json @@ -4,9 +4,10 @@ "model": "IC-7300", "rigctrl": { "id": "3073", - "baud": "9600", + "baud": "19200", "ptt": "RIG" }, "notes": [ + "Set baud rate to 19200" ] } From 3aeb77dad0c94c66567a04eb16473173ba6c5971 Mon Sep 17 00:00:00 2001 From: Gaston Gonzalez Date: Sat, 14 Dec 2024 04:11:26 -0700 Subject: [PATCH 3/4] PnP - Updated IC-7300 notes --- overlay/opt/emcomm-tools/conf/radios.d/icom-ic7300.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlay/opt/emcomm-tools/conf/radios.d/icom-ic7300.json b/overlay/opt/emcomm-tools/conf/radios.d/icom-ic7300.json index 3c8f9bb..1172d14 100644 --- a/overlay/opt/emcomm-tools/conf/radios.d/icom-ic7300.json +++ b/overlay/opt/emcomm-tools/conf/radios.d/icom-ic7300.json @@ -8,6 +8,6 @@ "ptt": "RIG" }, "notes": [ - "Set baud rate to 19200" + "[MENU] > [SET] > [Connectors] > [CI-V] > CI-V USB Baud Rate = 19200" ] } From 6ff1b7d3b92f5501620dfa8510b45c00b210c068 Mon Sep 17 00:00:00 2001 From: Gaston Gonzalez Date: Sat, 14 Dec 2024 04:13:16 -0700 Subject: [PATCH 4/4] et-radio - Fixed text formatting --- overlay/opt/emcomm-tools/bin/et-radio | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/overlay/opt/emcomm-tools/bin/et-radio b/overlay/opt/emcomm-tools/bin/et-radio index d768ccb..eb5319b 100755 --- a/overlay/opt/emcomm-tools/bin/et-radio +++ b/overlay/opt/emcomm-tools/bin/et-radio @@ -2,7 +2,7 @@ # # Author : Gaston Gonzalez # Date : 11 October 2024 -# Updated : 13 December 2024 +# Updated : 14 December 2024 # Purpose : A script for managaing plug-and-play radios set -e @@ -58,7 +58,8 @@ if [ $exit_status -eq 0 ]; then printf "${GREEN}REQUIRED ACTIONS\n" printf "1. Apply the settings above to your radio.\n" - printf "2. Plug in the USB cable for your radio. If it is already connected, reconnect it.\n" + printf "2. Plug in the USB cable for your radio. If it is already\n" + printf " connected, reconnect it.\n" printf "3. Run 'et-mode' and select the desired mode of operation.\n\n" printf " Note: JS8Call does not require a mode to be selected.\n" echo -e "${NC}"