Reading from COM port

C

carmelo

Hi everybody,
I need to develop a java software that reads, at a defined periodical
time, some data through a COM port. How can I do that?


I hope you can help me, thank you very much in advance
Carmelo
 
M

Morten Omholt Alver

carmelo said:
Hi everybody,
I need to develop a java software that reads, at a defined periodical
time, some data through a COM port. How can I do that?

Have you looked at RXTX? I've used that for serial communication, and
it's stable and works fine:

http://users.frii.com/jarvi/rxtx/

The license is LGPL, so you can use it in closed-source applications.
 
C

carmelo

Thank you guys! I'll try them...
- Is RXTX proprietary?
- Javacomm is available with standard jdk or is it a package I need to
download separately?


Thank you
Carmelo
 
C

carmelo

Thank you guys! I'll try them...
- Is RXTX proprietary?
- Javacomm is available with standard jdk or is it a package I need to
download separately?

Thank you
Carmelo

- Regarding Javacomm, I found the jar for Linux, and the generic one.
Which should I use? Having Linux, I think it's clear I need the Linux
one, but in Windows case?

- Regarding RXTX, I found 3 things:
1) the Eclipse plugin. Why do I need it?
2) RXTX2.0 for use with javacomm
3) RXTX2.0 for use WITHOUT javacomm
Do I need (2) or (3) ?


For using RXTX do you suggest to get javacomm too?
Or, do you suggest to use directly javacomm, without RXTX?


Sorry but I'm new to this,
I hope you can help me starting

Thank you again
Carmelo
 
H

Henner Hucke

carmelo said:
- Regarding Javacomm, I found the jar for Linux, and the generic one.
Which should I use? Having Linux, I think it's clear I need the Linux
one, but in Windows case?

- Regarding RXTX, I found 3 things:
1) the Eclipse plugin. Why do I need it?
2) RXTX2.0 for use with javacomm
3) RXTX2.0 for use WITHOUT javacomm
Do I need (2) or (3) ?


For using RXTX do you suggest to get javacomm too?
Or, do you suggest to use directly javacomm, without RXTX?


Sorry but I'm new to this,
I hope you can help me starting

Thank you again
Carmelo

Hello Carmelo,

I used RXTX without javacomm and it is running without any problem in a
production environment. The examples provided by RXTX were very usefull too.

Henner
 
E

Eric Razny

Le Tue, 07 Oct 2008 20:08:06 +0200, Henner Hucke a écrit :
Hello Carmelo,

I used RXTX without javacomm and it is running without any problem in a
production environment. The examples provided by RXTX were very usefull too.

Hi
I'm using RXTX in a production environment too, without javacomm. I
also prefer RXTX because I can use it in more environments (for OS/X it
saved my day :) ).

You shouldn't have any problem with it, but I suggest to compile it from
sources on your platform rather than to use the binaries.

Eric
 
C

carmelo

Le Tue, 07 Oct 2008 20:08:06 +0200, Henner Hucke a écrit :






Hi
I'm using RXTX in a production environment too, without javacomm. I
also prefer RXTX because I can use it in more environments (for OS/X it
saved my day :) ).

You shouldn't have any problem with it, but I suggest to compile it from
sources on your platform rather than to use the binaries.

Eric

I see. Thank you very much Eric.
So, is it possible to compile RXTX source code for the Windows or
Linux platform?
For this, do I need RXTX2.0_withou_javacomm ?
 
C

carmelo

carmelo schrieb:









Hello Carmelo,

I used RXTX without javacomm and it is running without any problem in a
production environment. The examples provided by RXTX were very usefull too.

Henner

Thank you Henner. On which platform did you use RXTX?
What do you suggest about using it on Windows or Linux?
Eric said that is it possible to compile it from source code. What did
you do?
 
E

Eric Razny

Le Wed, 08 Oct 2008 00:54:16 -0700, carmelo a écrit :
I see. Thank you very much Eric.
So, is it possible to compile RXTX source code for the Windows or
Linux platform?
For this, do I need RXTX2.0_withou_javacomm ?

Yes you do.
Once you made the choice to use RXTX I think it's better to use the gnu.io
package rather than the javax.comm :

- if you have no javax.comm legacy namespace need, why should you add so? :)

- on some platforms you may have rxtx available as a package, so you won't
need to recompile it at all (be careful : read the package docs).

I suggested to recompile because I had some problems on old linux
versions, but if a package exists it should be ok -and in case of
problems, make rules- ;)

Btw if you prefer to keep the javax.comm legacy, there's a script in rxtx
sources to do so.

hth
Eric.
 
M

M8R-au4xqk

- Regarding Javacomm, I found the jar for Linux, and the generic one.
Which should I use? Having Linux, I think it's clear I need the Linux
one, but in Windows case?

On Windows I'm using an old version of the javacomm, which works
fine for me. I no longer see it anywhere on the Sun website, but
you can still download it from other places. The file name is
javacomm20-win32.zip. But since it is no longer supported, maybe
RXTX is a better choice. I have not used RXTX myself.

Eugene Zharkov
 
C

carmelo

On Windows I'm using an old version of the javacomm, which works
fine for me. I no longer see it anywhere on the Sun website, but
you can still download it from other places. The file name is
javacomm20-win32.zip. But since it is no longer supported, maybe
RXTX is a better choice. I have not used RXTX myself.

Eugene Zharkov

Ok thanks,
I'll try to use both of them, but if javax.comm works fine I'll use it
for avoiding compatibility problems
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,246
Members
46,840
Latest member
BrendanG78

Latest Threads

Top