The other option is to write your software so that it gets notified
when a USB device is installed/removed. You will be told the actual
device name. I needed to do this to detect insertion/removal of a
barcode reader.
Looking at the actual code it is setting a default value of /dev/ttyUSB0.
It should not be defaulting when you try to set it in the call but it
may be interesting to set the default to /dev/null so that it will not
do something that may be reasonable part of the time.
When you say that you cannot get anything but /dev/ttyUSB0 to work it
makes me ask is there a problem that is causing the default to always
be taken.
Forcibly breaking things can be a useful tool.
Thanks very much for looking at the code. I believe I found my culprit.
I had another daemon running in the background for a lighting program
that was trying to get a lock on /dev/ttyUSB1 . If I stop that daemon
loading /dev/ttyUSB1 will now work for me. I'm going to reconfigure that
daemon to leave the serial ports alone since I am not using that feature
of the lighting program. Thanks again to everyone who helped me with
this. In the process I also set up a udev rule so I can now just load my
serial port as /dev/motor and let udev create the symlinks .
Cheers,
Jim
---
Post to this mailing list talk@gtalug.org
Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk