Java中的跨平台串口通信?
我正在尝试用 Java 进行串行通信。很难相信没有像 C# 那样的好的、开箱即用的解决方案。
我正在浏览 SerialIO 网站,但不清楚是否有免费的 .jar 我可以下载以获得我需要的功能。 (它只是出售吗?我找不到任何类型的 .jar 下载链接。)
我需要的只是通过串行端口读/写,并设置波特率。没有什么比这更奇特的了。
编辑:我要求它可以在 64 位 Windows 和 Mac OS X 上运行。Java Communications API 仅具有适用于 Linux 的实现。
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.
Edit: I require that it works on 64 bit Windows and Mac OS X. The Java Communications API only has implementations for Linux.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
也许 RxTx java 库就是您正在寻找的 http://rxtx.qbang.org/wiki /index.php/Main_Page
Maybe RxTx java library is what you are looking for http://rxtx.qbang.org/wiki/index.php/Main_Page
SerialIO 是一种商业产品。
查看 Java 简单串行连接器
它是根据 LGPL 获得许可的。我们已经在生产中成功使用它半年多了。与 RXTXcomm 相比,它已被证明是稳定的。
SerialIO is a commercial product.
Take a look at Java simple serial connector
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 通信 API
Java Communications API
Purejavacomm 是跨平台且免费的: http://www.sparetimelabs.com/purejavacomm/purejavacomm.php
Purejavacomm is cross-platform and free: http://www.sparetimelabs.com/purejavacomm/purejavacomm.php
我相信您可能正在寻找 Java Communications 这是官方的扩大。
I believe you are probably looking for Java Communications which is an official extension.
您是否看过Java Communications API?
Have you taken a look at the Java Communications API?
我正在评估 java-simple-serial-connector。用于与串行端口通信的跨平台 java 库。明天我将提供有关我的测试的更多详细信息。
事件
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