diff --git a/overlay/etc/udev/rules.d/80-et-ic705.rules b/overlay/etc/udev/rules.d/80-et-ic705.rules index d7acff4..3ff62a8 100644 --- a/overlay/etc/udev/rules.d/80-et-ic705.rules +++ b/overlay/etc/udev/rules.d/80-et-ic705.rules @@ -8,20 +8,23 @@ # Postconditions: # 1. /dev/et-cat created # 2. /dev/et-gps created -# +# # Resources # - https://www.florian-wolters.de/posts/ic705-serial-device-symlinks/ -# Set "IC-705" as an environment variable. This workaround is needed for the IC-705. -# Refer to the document under the Resources above for the background details.. -KERNEL=="ttyACM[0-9]*", SUBSYSTEM=="tty", ATTRS{product}=="IC-705", ENV{PROD}="IC-705" +# Set "IC-705" as an environment variable. This workaround is needed for the IC-705. +# Refer to the document under the Resources above for the background details. +KERNEL=="ttyACM[0-9]*", SUBSYSTEM=="tty", ATTRS{product}=="IC-705", \ + ENV{ET_DEVICE}="IC-705" # Create consistent device name/path for the CAT serial device -ENV{PROD}=="IC-705", SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="00", \ - ACTION=="add", GROUP="dialout", MODE="0660", SYMLINK+="et-cat" +ENV{ET_DEVICE}=="ET_DEVICE", SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="00", \ + ACTION=="add", \ + ENV{ET_SUBDEVICE}="CAT" GROUP="dialout", MODE="0660", SYMLINK+="et-cat" # Create consistent device name/path for the GPS serial device -ENV{PROD}=="IC-705", SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="02", \ - ACTION=="add", GROUP="dialout", MODE="0660", SYMLINK+="et-gps" +ENV{ET_DEVICE}=="IC-705", SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="02", \ + ACTION=="add", \ + ENV{ET_SUBDEVICE}="GPS" GROUP="dialout", MODE="0660", SYMLINK+="et-gps" # TODO: Add rules for sound card diff --git a/overlay/etc/udev/rules.d/81-et-ic7200.rules b/overlay/etc/udev/rules.d/81-et-ic7200.rules new file mode 100644 index 0000000..ed620cd --- /dev/null +++ b/overlay/etc/udev/rules.d/81-et-ic7200.rules @@ -0,0 +1,20 @@ +# Author : Gaston Gonzalez +# Date : 29 September 2024 +# Purpose : udev rules for the Icom IC-7200 +# +# Preconditions: +# 1. IC-7200 connected via USB cable +# +# Postconditions: +# 1. /dev/et-cat created +# + +KERNEL=="ttyUSB[0-9]*", SUBSYSTEM=="tty", ATTRS{serial}=="IC-7200*", \ + ENV{ET_DEVICE}="IC-7200" + +# Create consistent device name/path for the CAT serial device +ENV{ET_DEVICE}=="IC-7200", SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4" ATTRS{idProduct}=="ea60", \ + ACTION=="add", \ + ENV{ET_SUBDEVICE}="CAT", GROUP="dialout", MODE="0660", SYMLINK+="et-cat" + +# TODO: Add rules for sound card