Cross-platform communication Serial port in Java?

I am trying to do serial communication with Java. It is hard to believe that there is not any good, out-of-the-box solution, as in C #.

I am browsing the SerialIO website, but it is unclear if there is a free .jar that I can download to get the functionality I need. (Is it just for sale? I cannot find any type of .jar download link.)

All I need is read / write on the serial port and set the baud rate. Nothing more exciting.

Change I need it to work on 64-bit Windows and Mac OS X. The Java Communications API has only Linux versions.

+6
source share
7 answers

Perhaps the RxTx java library is what you are looking for http://rxtx.qbang.org/wiki/index.php/Main_Page

+4
source

SerialIO is a commercial product.

See a simple Java serial port

jSSC-0.9.0 Released and available for download. jSSC (Java Simple Serial Connector) - a library for working with a serial port with Java. jSSC> supports Win32 (Win98-Win7), Win64, Linux (x86, x86-64), Solaris (x86, x86-64), Mac OS X 10.5> and higher (x86, x86-64, PPC, PPC64).

License applies to LGPL. We have been successfully using it in production for more than six months. It has shown that it is stable, unlike RXTXcomm.

+3
source

Java Communication API

The Java Communications API 3.0 is a Java Extension that facilitates the development of platform-independent communications applications for smart cards, embedded systems and point of sale devices, financial services devices, fax machines, modems, display terminals, and robotic equipment. The Java Communication API (also known as javax.comm) provides applications with access to RS-232 equipment (serial ports) and limited access to IEEE-1284 (parallel ports), SPP mode.

+1
source

I believe that you are probably looking for Java Communications , which is the official extension.

0
source

Are you familiar with the Java Communications API?

The Java Communications API 3.0 is a Java Extension that facilitates the development of platform-independent communications applications for smart cards, embedded systems and point of sale devices, financial services devices, fax machines, modems, display terminals, and robotic equipment. The Java Communication API (also known as javax.comm) provides applications with access to RS-232 equipment (serial ports) and limited access to IEEE-1284 (parallel ports), SPP mode.

0
source

Purejavacomm is cross-platform and free: http://www.sparetimelabs.com/purejavacomm/purejavacomm.php

0
source

I am evaluating java-simple-serial-connector . Cross-platform Java library for communicating with serial ports. Tomorrow I will talk more about my tests.

Event

0
source

Source: https://habr.com/ru/post/885940/


All Articles