Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Hardware) Replace RXTX #20

Closed
bengtmartensson opened this issue Apr 3, 2015 · 6 comments
Closed

(Hardware) Replace RXTX #20

bengtmartensson opened this issue Apr 3, 2015 · 6 comments

Comments

@bengtmartensson
Copy link
Owner

RXTX is a never ending source of problems, both in porting, installation, and reliability. It is essentially very old code, that appears never to have been finished.

There are alternatives on the Internet. First, Arduino IDE should be inspected; they migrated away from RXTX recently; is there anything there to "steal"?

@bengtmartensson
Copy link
Owner Author

Some alternatives: JSSC, nrjavaserial (Openremote migrated RXTX-> nrjavaserial)

@bengtmartensson bengtmartensson removed this from the Milestone 4. milestone Jun 20, 2016
@HelenFoster
Copy link

Arduino migrated to JSSC, and seem to be having much less trouble with serial. JSSC is also packaged in Fedora and Debian. Looks like no-one is maintaining it though.
https://github.com/scream3r/java-simple-serial-connector
arduino/Arduino@f334e67
arduino/Arduino@48c1223

@bengtmartensson
Copy link
Owner Author

Thank you for the comment.

The main difference is, I think, that JCCS does not do any locking of the device file at all. (So therefore there are less problems?). Does device locking still make sense, or is it an artifact from the VAX age? nrjavaserial still have issues.

@HelenFoster
Copy link

HelenFoster commented Jul 19, 2016

Not doing any locking makes the serial access more portable and avoids a large proportion of the problems.

It appears that Arduino with JSSC bypasses serial port locks placed by other applications. Since it is very popular software, this makes such locks ineffective in general, so the Arduino team have basically decided for the world that serial port locking is dead.

(Edited to add) Indeed, at least in Linux, serial port locking is cooperative, and not enforced by the OS.
http://tldp.org/HOWTO/Serial-HOWTO-13.html

@HelenFoster
Copy link

Testing in Windows 10, only one application can connect to the serial port, whether the applications are using RXTX, JSSC or a mixture. Probably the locking is done by the OS, though I haven't found any page stating this explicitly.

@bengtmartensson
Copy link
Owner Author

Replaced by bengtmartensson/HarcHardware#1. in the vein of #215.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants