Serial VCP Access on Linux?

About to polish an xplatform Desktop app to work on Linux too. Here a serial device is targeted that is built on a VCP driver module. macOS and Windows work mostly out of the box, where on Windows sometimes a Silicon Labs VCP driver must be installed by Innosetup.
Linux/Ubuntu is said to have a built-in VCP driver, and I checked it is so. Anyway, when I try to access the serial, I see dozens of serial ports but none that seems to be the real one. This test app is working with the device on Win and macOS, but it will not find a single usable port on Ubuntu.
Where do all this ports come from? Shouldn’t there only be connected ones like on the other platforms?
And any idea how to access the VCP device? There is also a Silicon Labs driver (as source code), but it will not compile with current Ubuntu Make.
EDIT: Found also this old case. Could be related.

Maybe a permissions issue?

In Linux users usually can’t access serial devices unless they belongs to an specific group, usually modem or in older OSs uucp.

Check that. When you plug the adapter and the device(s) is/are created the owner group is one of those, and only root and group’s users can open it.

You may need to have a clean instance and use the /dev/ttyUSB (with the num at the end) device path if this plugged into a usb port. On most linux (debian based) it should work out of the box.

Make sure to set the DTR to the correct position as some devices will remain in a reset mode in the class default DTR value when the port is opened.

Thank you both!
I created a new Admin user, but still the same. The serial port is registered als /dtv/tty/USB0. Trying to open it (with either DTR setting) will result in error code 100, like all the other ports do. Group by default is Parallels or the test user. As how to add a modem group, I have no idea.

Is the port already in use some how?

maybe “ps -aux” wil show you if there is some port in use?

make sure your user is in the “dialout” group

Thank you! Uh, it would be valuable to have that info in Xojo docs!

1 Like

I’d be happy to have xojo add this to their docs. For it’s mostly a trial and error to get things that seems abvious to work properly.

So the “dialout” group did the trick?

Yes.
sudo adduser *username* dialout

1 Like