[GTALUG] Problem with /dev/ttyUSB* serial port

Lennart Sorensen lsorense at csclub.uwaterloo.ca
Fri Nov 1 12:28:50 EDT 2019


On Thu, Oct 31, 2019 at 09:13:15PM -0400, Jim Ruxton via talk wrote:
> The problem isn't really identifying the USB device. It is the fact that the
> software I am using only works when the device shows up as /dev/ttyUSB0 .
> When it shows up as /dev/ttyUSB1 it doesn't work. For some reason the motor
> control software I am using will only work if the serial port shows up as
> /dev/ttyUSB0 so I was hoping I could have it show up as this every time the
> device is inserted. I will try setting up a udev rule to do this .

Well looking at that python code you linked to, it appears that if
you forget to tell it the port when making a connection, it defaults
to ttyUSB0.  Maybe you have a spot in the code that forgets to pass the
port rgumentand that makes it only work when the name is ttyUSB0.

I am curious if changing that default in the code to something different
(like /dev/ttyUSBwrong) would make it always fail even when it is ttyUSB0.
If so, you could then hunt down where the connection is being done
without a port parameter and fix it once and for all.

-- 
Len Sorensen


More information about the talk mailing list