You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We recently switched JMRI: https://jmri.org over from PureJavaComm to jSerialComm to future-proof it.
One issue we are just now running into: Since Linux re-enumerates USB-Serial-Adapters depending on the order of plugging them in, some of our Linux users use udev-generated symlinks to tell multiple different USB->Serial adapters apart. For example, what could today be:
another iteration through /dev, looking for symlinks to ports already in the vector and adding the symlinks to the comPorts vector? (Would that even work if they refer to the same physical port but show up twice in the result?)
If not, I'll give our port selector another deep look.
Thanks,
Heiko
The text was updated successfully, but these errors were encountered:
I guess it would be cleaner to add another loop, so it could just check any symlink in /dev/ if it links against a file already in the comPorts-Vector.
And probably copy the properties of the device it links to, instead of just filling it with "Unknown", "Unknown".
Heiko
edit: But let's wait for comments from the maintainer(s) of this library before discussing implementation details...
Hello and thanks for this piece of software!
We recently switched JMRI: https://jmri.org over from PureJavaComm to jSerialComm to future-proof it.
One issue we are just now running into: Since Linux re-enumerates USB-Serial-Adapters depending on the order of plugging them in, some of our Linux users use udev-generated symlinks to tell multiple different USB->Serial adapters apart. For example, what could today be:
/dev/PR3Adapter -> /dev/ttyUSB0
/dev/NCEAdapter -> /dev/ttyUSB1
/dev/LokProgrammer -> /dev/ttyACM4
might tomorrow or after a couple of unplugging/replugging cycles look like:
/dev/PR3Adapter -> /dev/ttyUSB1
/dev/NCEAdapter -> /dev/ttyUSB0
/dev/LokProgrammer -> /dev/ttyACM2
We'd love to have the return value of GetCommPorts include those symlinks. Would you accept a PR that adds to
jSerialComm/src/main/c/Posix/PosixHelperFunctions.c
Line 649 in a8a307d
If not, I'll give our port selector another deep look.
Thanks,
Heiko
The text was updated successfully, but these errors were encountered: