This page will help you determine which serial port is your radio, and in some instances, how to give the port a more obvious name. For Linux, there are detailed directions on the use of udev.
Jump to: macOS, Windows, Linux
macOS Configuration
macOS users wishing for more consistent device names may wish to check out Discover 7610 and CI-V Redirect, both by Kok Chen, W7AY. Note that while these tools are designed for the 7610, the method outlined on the pages shows how to use the System Profiler to see which device is the radio, and that method should be equally valid for other radio models. You can access the System Profiler (also known as “System Information”) by choosing “About this Mac” from the apple menu and then pressing “System Profiler”. You can also use the system_profiler and ioreg commands, as outlined here.
Windows Configuration
Windows users can use the Device Manager to determine which COM device is the radio. To connect to your rig via USB, the (USB) serial port will appear in the list of available devices in the Serial Device: combobox of wfview. Where your rig has two serial ports (A/B) you must select port A (this is usually the lower numbered of the two.
Linux Configuration
With linux, the user logged in may or may not actually have write-access to the serial port, which is needed in order to run software like wfview. There are also times where it is useful to know which serial devices are connected to radios (or perhaps to which radios).
Basic Serial Port Ownership and Group Membership:
A quick command may be run to temporarly enable full access, however, this is not a good long-term solution as the command must be run every time:
sudo chown $USER /dev/ttyUSB*
A better solution is to modify the current user’s account, adding membership into the group that the system defaults to for serial ports.
First determine the name of the group:
ls -l /dev/ttyUSB*
The group name will be the second name, after the owner’s name. Here is an example output:
eliggett@zep:~$ ls -l /dev/ttyUSB* crw-rw---- 1 root dialout 188, 0 May 2 01:48 /dev/ttyUSB0 crw-rw---- 1 root dialout 188, 1 Apr 3 14:38 /dev/ttyUSB1 crw-rw---- 1 root dialout 188, 2 Apr 3 14:38 /dev/ttyUSB2
Here, the owner is root and the group owner is “dialout”. On some systems, this might be “modem”.
To append group membership, issue the following command:
sudo usermod -aG dialout $USER
You may need to log out and log back in for this to take effect.
On some systems, you really will need to be the owner of the port, and this depends upon how the system security is configured. In this next section, you’ll have the opportunity to become the default serial port owner.
Using UDEV for nice port names and default ownership:
Linux provides a subsystem called “udev” which, among other things, helps name entries in /dev when devices are connected to the computer. Using a custom udev entry, we can create symlinks to nice device names. For example, on my system, /dev/IC9700 is my IC-9700 serial port, and /dev/IC7300 is my IC-7300 serial port. These names are much easier to remember and to use than their default ttyUSB names, which will have different numbers when you reboot or re-connect a radio.
To do this, we’ll first need to determine the USB device serial number for each radio.
Issue the following command to show the device ids:
ls -l /dev/serial/by-id
Note, some linux kernels do not provide /dev/serial/by-id. For those systems, use the following command for each serial device (/dev/ttyUSB*) and look at the “ID_SERIAL” attribute:
udevadm info /dev/ttyUSB0
You will see output similar to what follows:
lrwxrwxrwx 1 root root 13 Feb 3 19:25 usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_IC-9700_13001202_A-if00-port0 -> ../../ttyUSB3 lrwxrwxrwx 1 root root 13 Feb 3 19:25 usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_IC-9700_13001202_B-if00-port0 -> ../../ttyUSB2 lrwxrwxrwx 1 root root 13 Feb 3 19:25 usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_IC-7300_03001507-if00-port0 -> ../../ttyUSB4 lrwxrwxrwx 1 root root 13 Feb 3 19:25 usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_IC-7851_03001140_A-if00-port0 -> ../../ttyUSB0 lrwxrwxrwx 1 root root 13 Feb 3 19:25 usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_IC-7851_03001140_B-if00-port0 -> ../../ttyUSB1
The part we’re concerned with here isn’t how many nice radios this person has, but rather, the name and serial numbers, for example “IC-7851_03001140_A”. Here, the model is IC-7851, and the serial number is 03001140. Some Icom radios present more than one serial port, and in most cases, we are interested in the “A” port for rig control. The “B” port is for other uses.
Now we need to make a new udev rule. Open up a text document and prepare the text that we will put in. Start with this:
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ATTRS{serial}=="IC-7851 03001140 A", SYMLINK+="IC7851A", OWNER="eliggett" SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ATTRS{serial}=="IC-7851 03001140 B", SYMLINK+="IC7851B", OWNER="eliggett" SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ATTRS{serial}=="IC-7300 03001507", SYMLINK+="IC7300", OWNER="eliggett" SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ATTRS{serial}=="IC-9700 13001202 A", SYMLINK+="IC9700A", OWNER="eliggett" SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ATTRS{serial}=="IC-9700 13001202 B", SYMLINK+="IC9700B", OWNER="eliggett"
Edit the file so that your serial numbers, model numbers, and username are reflected. Remove any lines for radios you don’t own (yet).
Save the file to /tmp/rules.txt (or any other location you can easily get to)
Now from the terminal, copy the file in to the udev rule location for your system (commonly as shown):
sudo cp /tmp/rules.txt /etc/udev/rules.d/90-persistent-usb.rules
To test it out, disconnect the USB cables from your rigs, and then reconnect. You should now see nice entries in /dev for your radios:
eliggett@zep45:~$ ls -l /dev/IC* lrwxrwxrwx 1 root root 7 Apr 3 14:38 /dev/IC7300 -> ttyUSB0 lrwxrwxrwx 1 root root 7 Apr 3 14:38 /dev/IC9700 -> ttyUSB1 lrwxrwxrwx 1 root root 7 Apr 3 14:38 /dev/IC9700-data -> ttyUSB2
(Note that I named my “B” port “-data”. You can select whatever you like for yours.)
You can make individual shortcuts to wfview which use settings files that specify different serial ports. See the Preferences File manual page as well as the Command-Line Arguments page for more information.