What steps will reproduce the problem?
1. run your app as user (not root)
2. call getPortNames on Linux
3. try to open any port
What is the expected output? What do you see instead?
Obviously I'd expect the port to be opened, however I get a "port busy".
What version of the product are you using? On what operating system?
This is running on Ubuntu 12.04 LTS.
The issue seems to be that getPortNames (calling getLinuxPortNames) is opening
the port. When opening the port on Linux, jssc currently issues a TIOCEXCL
which is never cleared, so remains active after a close ... preventing jssc
itself to open the port again.
Reproducable by this C program:
int f = open("/dev/ttyUSB0", O_RDWR | O_NOCTTY | O_NDELAY);
if (f != -1) {
ioctl(f, TIOCEXCL);
close(f);
} else {
printf("could not open port\n");
}
Just run it twice.
Original issue reported on code.google.com by dan...@dseifert.de on 5 Dec 2012 at 6:54
Original issue reported on code.google.com by
dan...@dseifert.de
on 5 Dec 2012 at 6:54