How to add a "driver" to javax.comm? Serial Port Programming in Java

I am trying to use the RS-232 serial port on my PC with class javax.comm. I am new to this API, so the first thing I look at is the documentation, and I find out that the first thing you need to do is to "list" all the ports from the CommPortListener class and select one of them.

It worked just fine! The problem is that my port is missing. It lists the ports / dev / ttyS 0 and / dev / ttyS1 that do not exist on my computer. My ports (I have worked with them several times): / dev / ttySNX0 and / dev / ttySNX 1.

Looking over the websites again, I find out that I need to do something like β€œregister” or β€œload” the driver of my card into the API system, which could be done in previous versions, but not now. Moreover, I tried to do this under windows, and they offer me a β€œgeneric” version of the API, which requires some RXTX application that starts to beat me.

I would thank any sugestions, documentation links ... something ... that allow me to use my serial ports through Java, after all, this is my goal ...

Thanks guys!!!!

+4
source share
1 answer

Have you tried RXTX? I have had success with this API on Windows / XP. I'm not sure what you mean by "start hitting me."

There has been a lot of recent activity in the RXTX project, and a new version, including a number of fixes and additional support, is inevitable. The mailing list is also relatively active. javax.comm been more or less dead for a while.

+1
source

All Articles