You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by H....@MI.unimaas.nl on 2004/11/29 20:42:01 UTC

Slightly OT: accessing serial port using Java

Guys,

This is slightly off-topic, but since there are so many Java experts around
here, I hope someone will react and help me off-list.

For a private pet project I need to connect to a microcontroller using the
serial port. I currently have this running as a Delphi program on a Windows
95 machine, but I want to replace it with an improved version in Java/Cocoon
on a Linux machine. 
To keep things simple I want to write a simple program that can read the
serial port and put the info in a text file in a directory and read a text
file from a (other) directory and put it on the serial port.

A Cocoon-based webapp will read the resulting files and generate graphs (in
SVG e.g.) and ask for user input which is written to other files.

The problem is: how do I write the part that can communicate with the serial
port? I don't know if I can do this in Java and I have never written
software specifically for the Linux platform.

Thanks.

Bye, Helma

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Slightly OT: accessing serial port using Java

Posted by Jorg Heymans <jh...@domek.be>.

Tony Collen wrote:
> H.vanderLinden@MI.unimaas.nl wrote:
> 
>> The problem is: how do I write the part that can communicate with the 
>> serial
>> port? I don't know if I can do this in Java and I have never written
>> software specifically for the Linux platform.
> 
> 
> I think I looked into this once a long time ago. There aren't any 
> built-in serial port libraries in Java, but I think there are a bunch of 

There is the java communications API [1] though. Not sure if it works on 
Linux as well, we've used it successfully on Windows.


HTH
Jorg

[1] http://java.sun.com/products/javacomm/downloads/index.html



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Slightly OT: accessing serial port using Java

Posted by Tony Collen <co...@umn.edu>.
H.vanderLinden@MI.unimaas.nl wrote:

> The problem is: how do I write the part that can communicate with the serial
> port? I don't know if I can do this in Java and I have never written
> software specifically for the Linux platform.

I think I looked into this once a long time ago. There aren't any 
built-in serial port libraries in Java, but I think there are a bunch 
of 3rd-party ones out there. Just Google around.

Tony

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Slightly OT: accessing serial port using Java

Posted by Thor Heinrichs-Wolpert <th...@lunartek.com>.
The sun javax.comm api is there and it works on Solaris & Windows, but 
I don't think it has been updated for quite sometime.

There are a few opensource ones that support the javax.comm interfaces 
on top of the serial io stuff from http://www.rxtx.org/

We've been looking at the SerialIO (http://www.serialio.com) product 
and have found it to be pretty good so far and fairly inexpensive.  As 
you need to hook in some binary libraries into the JVM for serial 
support, it's nice to get the source for both the driver and Java 
classes (which SerialIO) provides in case you run into any issues.

Cheers,
Thor HW

On 29-Nov-04, at 11:42 AM, H.vanderLinden@MI.unimaas.nl wrote:

> Guys,
>
> This is slightly off-topic, but since there are so many Java experts 
> around
> here, I hope someone will react and help me off-list.
>
> For a private pet project I need to connect to a microcontroller using 
> the
> serial port. I currently have this running as a Delphi program on a 
> Windows
> 95 machine, but I want to replace it with an improved version in 
> Java/Cocoon
> on a Linux machine.
> To keep things simple I want to write a simple program that can read 
> the
> serial port and put the info in a text file in a directory and read a 
> text
> file from a (other) directory and put it on the serial port.
>
> A Cocoon-based webapp will read the resulting files and generate 
> graphs (in
> SVG e.g.) and ask for user input which is written to other files.
>
> The problem is: how do I write the part that can communicate with the 
> serial
> port? I don't know if I can do this in Java and I have never written
> software specifically for the Linux platform.
>
> Thanks.
>
> Bye, Helma
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Slightly OT: accessing serial port using Java

Posted by Ugo Cei <ug...@apache.org>.
Il giorno 29/nov/04, alle 20:42, H.vanderLinden@MI.unimaas.nl ha 
scritto:

> Guys,

No gals here? ;)

> The problem is: how do I write the part that can communicate with the 
> serial
> port? I don't know if I can do this in Java and I have never written
> software specifically for the Linux platform.

I used the SerialPort library a few years ago and I just checked that 
they still seem to support it: 
http://serialio.com/products/serialport/serialport.htm

There is also at least one open project around: 
http://www.geeksville.com/~kevinh/linuxcomm.html

	HTH,

		Ugo

-- 
Ugo Cei - http://beblogging.com/

RE: Slightly OT: accessing serial port using Java

Posted by Bernard D'Have <bd...@tiscali.be>.
There is sun communication at least for Windows and Solaris

http://java.sun.com/products/javacomm/index.jsp

Bernard

-----Original Message-----
From: H.vanderLinden@MI.unimaas.nl [mailto:H.vanderLinden@MI.unimaas.nl] 
Sent: Monday, November 29, 2004 8:42 PM
To: users@cocoon.apache.org
Subject: Slightly OT: accessing serial port using Java


Guys,

This is slightly off-topic, but since there are so many Java experts around
here, I hope someone will react and help me off-list.

For a private pet project I need to connect to a microcontroller using the
serial port. I currently have this running as a Delphi program on a Windows
95 machine, but I want to replace it with an improved version in Java/Cocoon
on a Linux machine. 
To keep things simple I want to write a simple program that can read the
serial port and put the info in a text file in a directory and read a text
file from a (other) directory and put it on the serial port.

A Cocoon-based webapp will read the resulting files and generate graphs (in
SVG e.g.) and ask for user input which is written to other files.

The problem is: how do I write the part that can communicate with the serial
port? I don't know if I can do this in Java and I have never written
software specifically for the Linux platform.

Thanks.

Bye, Helma

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org