[英]How to add a “driver” to javax.comm? Serial port programming in Java
I am trying to use a RS-232 serial port on my PC with javax.comm class. 我试图在我的电脑上使用带有javax.comm类的RS-232串口。 I am newby on that API, so first of all I go through the documentation and I find out that the first thing you should do is "list" all the ports from the class CommPortListener and pick up one of them.
我刚开始使用该API,所以首先我要查看文档,然后我发现你应该做的第一件事是“列出”CommPortListener类中的所有端口并选择其中一个端口。
That worked just fine! 这工作得很好! Problem is, now, that my port is missing.
问题是,现在,我的端口丢失了。 It lists the /dev/ttyS0 and /dev/ttyS1 ports, non existents on my computer.
它列出了我的计算机上的/ dev / ttyS0和/ dev / ttyS1端口,非存在端口。 My ports (I have been working with them several times) are /dev/ttySNX0 and /dev/ttySNX1.
我的端口(我已经多次使用它们)是/ dev / ttySNX0和/ dev / ttySNX1。
Again surfing the web I find out that I should do something like "register" or "load" the driver of my card onto the API system, stuff that could be done in previous versions, but not now. 再次浏览网页我发现我应该做一些事情,比如“注册”或“加载”我的卡的驱动程序到API系统上,这可以在以前的版本中完成,但现在不行。 Moreover, I tried to do it under windows and they offer me a "generic" version of the API, with needs some RXTX application which is starting to beat me.
此外,我尝试在Windows下进行,他们为我提供了API的“通用”版本,需要一些RXTX应用程序,它开始打败我。
I would thank any sugestions, links to documentation... something... that allow me to use my serial ports through Java, wich, in the end, is my objective... 我要感谢任何sugestions,文档的链接......允许我通过Java使用我的串口,最终,我的目标......
Thanks folks!!!! 谢谢大家!!!!
Have you tried RXTX? 你试过RXTX吗? I've had successf with that API on Windows/XP.
我已经在Windows / XP上使用该API获得了成功。 I'n not sure what you mean by "starting to beat me".
我不确定你的意思是“开始打败我”。
There has been a lot of recent activity on the RXTX project and a new release incorporating a number of fixes and additional support is imminent. 最近有很多关于RXTX项目的活动,一个包含大量修复和额外支持的新版本迫在眉睫。 The mailing list is also relatively active.
邮件列表也相对活跃。
javax.comm
has been more or less dead for a while. javax.comm
已经或多或少地死了一段时间。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.