RSS Feed for This PostCurrent Article

Java Serial Communication Library

If you want to access the serial (RS232) or parallel port with JAVA, you need to install a platform/operating system dependent library. Install either javax.comm from SUN (no windows version as of javax.comm version 3.0) or better install the rxtxSerial and/or rxtxParallel library from rxtx.org (Windows, Linux, Mac OS X).

Java Communications

The Java Communications 3.0 API is a Java extension that facilitates developing platform-independent communications applications for technologies such as Smart Cards, embedded systems, and point-of-sale devices, financial services devices, fax, modems, display terminals, and robotic equipment.

The Java Communications API (also known as javax.comm) provides applications access to RS-232 hardware (serial ports) and limited access to IEEE-1284 (parallel ports), SPP mode.

Implementations of the API are currently available for Solaris SPARC, Solaris x86, and Linux x86.

API serial features:

  • Enumeration of ports (administrator and user configurable port mapping)
  • Port configuration (baud rate, speed, stop bits, parity)
  • Access to EIA232 standard DTR, CD, CTS, RTS and DSR signals
  • Transfer of data over RS-232 ports
  • Hardware and software flow-control options
  • Receive-buffer threshold control
  • Asynchronous event option for notification of:
    • Data available on an RS-232 port
    • Port hardware line level changes
    • Port ownership changes within a single JVM

RXTX

RXTX is a Java library, using a native implementation (via JNI), providing serial and parallel communication for the Java Development Toolkit (JDK). All deliverables are under the GNU LGPL license. It is based on the specification for Sun’s Java Communications API, though while many of the class descriptions are the same the package used it not, since gnu.io is used instead. A certain amount of compatibility is intended with API, though this project should be considered as a fork and therefore compatible in spirit, but not in implementation.


Trackback URL


Sorry, comments for this entry are closed at this time.