Pages: 1 [2]   Go Down

Author Topic: Ubuntu Linux, WSJT-X ,trying to get virtual com port set up for PTT  (Read 252 times)

W7XTV

  • Member
  • Posts: 1269
Re: Ubuntu Linux, WSJT-X ,trying to get virtual com port set up for PTT
« Reply #15 on: January 30, 2022, 07:21:38 PM »

Try sudo cat /dev/ttyUSB* and see what you get.  Again, enter your password when prompted.

I misspoke (mistyped?) that command.  It should be ls -l /dev/ttyUSB*, without the sudo.  A user can find devices, root not required.

I just tried it on my PC, and I get crw-rw-rw- 1 root dialout 188, 0 Jan 30 20:12 /dev/ttyUSB0.  Make sure you're a member of the dialout group.
Logged
He speaks fluent PSK31, in FT8...  One QSO with him earns you 5BDXCC...  His Wouff Hong has two Wouffs... Hiram Percy Maxim called HIM "The Old Man..."  He is... The Most Interesting Ham In The World!

WW5F

  • Posts: 451
    • HomeURL
Re: Ubuntu Linux, WSJT-X ,trying to get virtual com port set up for PTT
« Reply #16 on: January 31, 2022, 01:08:50 PM »

Assuming your <username> is "wx9m", the programs you start under this username should have access to all your serial ports, including USB ports that are *active*.

You see your RIGblaster with the "$ lsusb" command, but it's not connecting.

The great thing about Linux is that all this stuff happens automatically.  Your computer *sees* your RIGblaster, so this implies the module (driver) is already available.

The modprobe command is to install modules (drivers) that are not already available in your current distribution.

You *should* see it with a "# dmesg | grep /dev/ttyUSB" command, but you don't, because the handshaking didn't/couldn't complete.

The only thing I can suggest, and I've had to do this multiple times, is add a *powered* USB hub (one that comes with a 5 volt 2 amp wall wart) between your computer and your RIGblaster.

Sometimes the computer cannot provide enough USB power to the device and, therefore, cannot complete the handshaking to automatically install the driver.

Logged

WX9M

  • Member
  • Posts: 7
Re: Ubuntu Linux, WSJT-X ,trying to get virtual com port set up for PTT
« Reply #17 on: February 02, 2022, 10:12:31 AM »

Many thanks to David W1DRN for providing many tips that led to the conclusion that the ftdi driver didn't recognize the RIGblaster Duo's product ID thus would not create a serial port to it. David then found this article in a google search:

did some google searching and found the following forum post:
https://unix.stackexchange.com/ques...device-with-custom-pid-to-ttyusb0-on-embedded

Their solution to dynamically adding the product_id to the running kernel is:

1) Unplug the device
2) modprobe ftdi_sio
3) echo 0403 b338 >/sys/bus/usb-serial/drivers/ftdi_sio/new_id
4) Plug in the device

If that works, farther down in that same forum post is a way to make it happen automatically at boot time:

1) Add the following single line to /etc/udev/rules.d/99-ftdi.rules

ACTION=="add", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="b338", RUN+="/sbin/modprobe ftdi_sio" RUN+="/bin/sh -c 'echo 0403 b338 > /sys/bus/usb-serial/drivers/ftdi_sio/new_id'"

I did the commands to dynamically set up and since that worked, then created the 99-ftdi.rules file with the single line. Rebooted and all is ell with WSJT-X and PTT control!
Logged

WX9M

  • Member
  • Posts: 7
Re: Ubuntu Linux, WSJT-X ,trying to get virtual com port set up for PTT
« Reply #18 on: February 13, 2022, 08:57:44 AM »

Thanks to all who provided help to resolve this, it's much appreciated! I've written a Tech Tip type article with the full problem and solution.

rick/WX9M

RIGblaster duo will not plug and play on Ubuntu 20.04.3 LTS



Environment:

Laptop – Juno Nyx 15” AMD v2, 16GB memory, 512GB SSD
Operating System - Ubuntu 20.04.3 LTS
Software - WSJT-X v2.5.4
Hardware - RIGblaster duo


Setup:

Using a RIGblaster duo connected to a YAESU FT-100D and Kenwood TS-690S with receive audio going into the RIGblaster then out to mic input of a USB soundcard adapter plugged into the Laptop. RIGblaster USB cord is going to the Laptop for PTT control only. I am not using full rig control to the radios.


Background:

The setup was working fine for years with a older laptop running Windows 10. That laptop became so slow it was unbearable. So I opted to go with a new laptop running Linux preinstalled by Juno Computers. Hardware that Ubuntu just found and made work upon plugging in: Canon wireless printer, Logitech wireless mouse, HDMI port to 2nd display, and a USB sound card interface – all good!


Problem:

The RIGblaster duo was also “found” when plugging in the USB cable to the laptop. It can “hear” received audio from the radios via the USB Soundcard interface mic input. WSJT-X needs to have a serial com port configured to allow the PTT function over the USB port to the RIGblaster duo so it can then control PTT through the radios mic input.

I was able to see the RIGblaster duo connected to USB:

$ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 5986:9102 Acer, Inc BisonCam,NB Pro
Bus 003 Device 002: ID 8087:0029 Intel Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 0c76:120b JMTek, LLC. Plugable USB Audio Device
Bus 001 Device 002: ID 0403:b338 Future Technology Devices International, Ltd RIGblaster Duo
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub





Now I attempt to look for com ports associated to this USB, but this is all I see:

$ dmesg | grep tty
[    0.097886] printk: console [tty0] enabled



Maybe the FTDI driver is not installed? So I issue the following commands and it does find it:

$ dmesg | grep -i ftdi
[10141.816157] usbcore: registered new interface driver ftdi_sio
[10141.816167] usbserial: USB Serial support registered for FTDI USB Serial Device



Check if the FTDI driver is  pre-compiled as dynamically-loadable kernel modules.
You should see an ftdi_sio (Serial I/O) module (and we do) with the command:

$ find /lib/modules | grep -i ftdi
/lib/modules/5.14.0-1011-oem/kernel/drivers/usb/misc/ftdi-elan.ko
/lib/modules/5.14.0-1011-oem/kernel/drivers/usb/serial/ftdi_sio.ko
/lib/modules/5.13.0-27-generic/kernel/drivers/usb/misc/ftdi-elan.ko
/lib/modules/5.13.0-27-generic/kernel/drivers/usb/serial/ftdi_sio.ko
/lib/modules/5.14.0-1020-oem/kernel/drivers/usb/misc/ftdi-elan.ko
/lib/modules/5.14.0-1020-oem/kernel/drivers/usb/serial/ftdi_sio.ko



Check to see if the FTDI module has been dynamically loaded into the running kernel (and it is), by using the command:

$ lsmod | grep -i ftdi
ftdi_sio 61440 0
usbserial 57344 1 ftdi_sio



With all that in place, the FTDI driver should have created a tty device. Checking with the following command we do not see one:

$ ls -l /dev/serial/by-id/ | grep -i ftdi
ls: cannot access '/dev/serial/by-id/': No such file or directory



It appears that the /dev/ttyUSBx device file is not being created. Verify with the command:

$ ls -l /dev/ttyUSB*
ls: cannot access '/dev/ttyUSB*': No such file or directory



Root Cause:

At this point I reached out for help from Tech Support at West Mountain Radio, the manufacturer of the RIGblaster duo. Here was their response:

“My best guess is that the RIGblaster hardware id isn't listed in the current ftdi driver.”

Looking at the source code for the current ftdi linux driver, specifically the file ftdi_sio_ids.h (see
https://github.com/torvalds/linux/blob/master/drivers/usb/serial/ftdi_sio_ids.h) It has no definition for a product_id pid=0xb338, so that is surely the cause of the problem, i.e. the USB product_id for the RigBlaster Duo is not known to the built-in ftdi serial-I/O driver in Linux.


Solution:

Now knowing what the actual cause of the problem is, an internet search produced the following forum post:
https://unix.stackexchange.com/questions/67936/attaching-usb-serial-device-with-custom-pid-to-ttyusb0-on-embedded

Their solution to dynamically add the product_id to the running kernel worked! Here is the sequence:

1) Unplug the device
2) issue commands:
$modprobe ftdi_sio
 $echo 0403 b338 >/sys/bus/usb-serial/drivers/ftdi_sio/new_id

4) Plug in the device

Farther down in that same forum post is a way to make it happen automatically at boot time which also worked:

1) Add the following single line to /etc/udev/rules.d/99-ftdi.rules

ACTION=="add", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="b338", RUN+="/sbin/modprobe ftdi_sio" RUN+="/bin/sh -c 'echo 0403 b338 > /sys/bus/usb-serial/drivers/ftdi_sio/new_id'"


Credits:

Many thanks to the following sources!

QRZ.com Forum - click here to view post
eham.net Forum - click here to view post
unix.stackexchange.com Forum – see link above in Solution section
David Nessl, W1DRN – Linux commands, ftdi driver source code troubleshooting and suggestions
Sholto Fisher, K7TMG -  Tech Support at West Mountain Radio




Thanks,
Rick/WX9M
Logged

W9IQ

  • Member
  • Posts: 8866
Re: Ubuntu Linux, WSJT-X ,trying to get virtual com port set up for PTT
« Reply #19 on: February 13, 2022, 09:16:30 AM »

That is a super job of documenting the symptom, problem and solution, Rick.

- Glenn W9IQ
Logged
- Glenn W9IQ

God runs electromagnetics on Monday, Wednesday and Friday by the wave theory and the devil runs it on Tuesday, Thursday and Saturday by the Quantum theory.
Pages: 1 [2]   Go Up