开发者

Cross Platform Serial port communication in Java?

开发者 https://www.devze.com 2023-02-25 03:05 出处:网络
I\'m trying to do serial communication with Java. It\'s hard to believe that there\'s not some nice, out of the box solution like there is in C#.

I'm trying to do serial communication with Java. It's hard to believe that there's not some nice, out of the box solution like there is in C#.

I'm looking around the SerialIO website, but it's not clear that there's a free .jar I can download to get the functionality I need. (Is it just for sale? I can't find a link for a .jar download of any sort.)

All I need is read/write over a serial port, and setting a baud rate. Nothing fancier than that.

开发者_如何学Go

Edit: I require that it works on 64 bit Windows and Mac OS X. The Java Communications API only has implementations for Linux.


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


SerialIO is a commercial product.

Take a look at Java simple serial connector

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

It is licensed under LGPL. We have been succesfully using it in production for over half a year now. It has shown to be stable, as opposed to RXTXcomm.


Java Communications API

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.


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


I believe you are probably looking for Java Communications which is an official extension.


Have you taken a look at the Java Communications API?

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.


I am evaluating java-simple-serial-connector. A cross platform java library to comunicate with serial ports. Tomorrow I'll give more details about my tests.

Event

0

精彩评论

暂无评论...
验证码 换一张
取 消