User Tools

Site Tools


packet:ninotnc-udev

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
packet:ninotnc-udev [2025/08/20 10:03] – created gi3jmcpacket:ninotnc-udev [2025/08/20 12:54] (current) – [Product Description names] gi3jmc
Line 32: Line 32:
 First, enable the serial number reporting with ''sudo ~/2221aTool/2221aTool.py enum-serial 1'' First, enable the serial number reporting with ''sudo ~/2221aTool/2221aTool.py enum-serial 1''
  
-When the command completes you can change the reported serial number with one of your own choosing with  +The chips have a pre-set serial number already configured, but you can change it if you wish.  Use the command ''sudo python3 ./2221aTool.py set-serial'' followed by your desired serial number, which can be up to 30 unicode characters.
-''sudo python3 ./2221aTool.py set-serial'' followed by your desired serial number, which can be up to 30 unicode characters.+
  
 //Example:// ''sudo python3 ./2221aTool.py set-serial 0123456789'' //Example:// ''sudo python3 ./2221aTool.py set-serial 0123456789''
Line 45: Line 44:
 //**Before proceeding with any steps in this section, you should only have one NinoTNC connected.  This ensures that the changes are made on the correct device.**// //**Before proceeding with any steps in this section, you should only have one NinoTNC connected.  This ensures that the changes are made on the correct device.**//
  
-You can change the reported product description to better identify the device.  This can be used as an alternative to the serial number.  The process is very similar.  Use ''sudo python3 ./2221aTool.py set-description'' followed by your desired description, which can be up to 30 unicode characters.+You can change the reported product description to better identify the device, and the process is very similar.  Use ''sudo python3 ./2221aTool.py set-description'' followed by your desired description, which can be up to 30 unicode characters.
  
 //Example:// ''sudo python3 ./2221aTool.py set-description NinoTNC-GB7BMY-HF'' //Example:// ''sudo python3 ./2221aTool.py set-description NinoTNC-GB7BMY-HF''
Line 69: Line 68:
 === Serial number names === === Serial number names ===
  
-This example will create a link for each NinoTNC using it's serial number as the device name, but requires you to remember which NinoTNC serial is used for each purpose+This example will create a link for each NinoTNC using it's serial number as the device name in ''/dev'', but requires you to remember which NinoTNC serial is used for each purpose
 <file shell /etc/udev/rules.d/99-ninotnc.rules> <file shell /etc/udev/rules.d/99-ninotnc.rules>
 # Create descriptive links to make refering to NinoTNC's easier # Create descriptive links to make refering to NinoTNC's easier
 SUBSYSTEM=="tty", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="00dd", SYMLINK+="NinoTNC-%s{serial}" SUBSYSTEM=="tty", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="00dd", SYMLINK+="NinoTNC-%s{serial}"
 </file> </file>
 +
 +<code>jonathan@GB7BMY /dev> ls -lah tnc-*
 +lrwxrwxrwx 1 root root 7 Aug 20 13:23 0003794435 -> ttyACM0
 +lrwxrwxrwx 1 root root 7 Aug 20 13:23 0004013920 -> ttyACM1</code>
  
 ---- ----
  
 +=== Product Description names ===
 +
 +This example shows that if you have set the Product Description for easier identification of a NinoTNC, it can also be used to create the name links in ''/dev'' 
 +<file shell /etc/udev/rules.d/99-ninotnc.rules>
 +SUBSYSTEM=="tty", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="00dd", ATTRS{product}=="NinoTNC-GB7BMY-VHF-2m", SYMLINK+="NinoTNC-VHF-2M"
 +SUBSYSTEM=="tty", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="00dd", ATTRS{product}=="NinoTNC-GB7BMY-HF", SYMLINK+="NinoTNC-HF-40M"
 +</file>
 +<code>jonathan@GB7BMY /dev> ls -lah NinoTNC-*
 +lrwxrwxrwx 1 root root 7 Aug 20 13:23 NinoTNC-VHF-2M -> ttyACM0
 +lrwxrwxrwx 1 root root 7 Aug 20 13:23 NinoTNC-HF-40M -> ttyACM1</code>
 +
 +This format could also be used in place of the two lines above, and would create the devices in ''/dev'' named with the exact product description.  It is not recommended to have spaces in the product description if you use this method.
 +<file shell /etc/udev/rules.d/99-ninotnc.rules>
 +SUBSYSTEM=="tty", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="00dd", SYMLINK+="%s{product}"
 +</file>
 +<code>jonathan@GB7BMY /dev> ls -lah NinoTNC-*
 +lrwxrwxrwx 1 root root 7 Aug 20 13:23 NinoTNC-GB7BMY-VHF-2m -> ttyACM0
 +lrwxrwxrwx 1 root root 7 Aug 20 13:23 NinoTNC-GB7BMY-HF -> ttyACM1</code>
 ==== Final Steps ==== ==== Final Steps ====
  
 To activate the newly-created rules you can either remove and reconnect the NinoTNC USB cable, or use the command ''sudo udevadm trigger'' Once either has been carried out, the new devices will be visible in ''/dev'' for use in your application. To activate the newly-created rules you can either remove and reconnect the NinoTNC USB cable, or use the command ''sudo udevadm trigger'' Once either has been carried out, the new devices will be visible in ''/dev'' for use in your application.
packet/ninotnc-udev.1755684224.txt.gz · Last modified: by gi3jmc