<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://rxtx.qbang.org/wiki/skins/common/feed.css?207"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://rxtx.qbang.org/wiki/index.php?feed=atom&amp;target=Goodness&amp;title=Special%3AContributions</id>
		<title>Rxtx - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://rxtx.qbang.org/wiki/index.php?feed=atom&amp;target=Goodness&amp;title=Special%3AContributions"/>
		<link rel="alternate" type="text/html" href="http://rxtx.qbang.org/wiki/index.php/Special:Contributions/Goodness"/>
		<updated>2026-06-21T09:34:49Z</updated>
		<subtitle>From Rxtx</subtitle>
		<generator>MediaWiki 1.15.4</generator>

	<entry>
		<id>http://rxtx.qbang.org/wiki/index.php/User:Goodness</id>
		<title>User:Goodness</title>
		<link rel="alternate" type="text/html" href="http://rxtx.qbang.org/wiki/index.php/User:Goodness"/>
				<updated>2006-07-03T12:28:48Z</updated>
		
		<summary type="html">&lt;p&gt;Goodness:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Goodness gratious me!&lt;/div&gt;</summary>
		<author><name>Goodness</name></author>	</entry>

	<entry>
		<id>http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port</id>
		<title>Two way communcation with the serial port</title>
		<link rel="alternate" type="text/html" href="http://rxtx.qbang.org/wiki/index.php/Two_way_communcation_with_the_serial_port"/>
				<updated>2006-07-03T12:27:40Z</updated>
		
		<summary type="html">&lt;p&gt;Goodness:&amp;#32;replace hardcoded &amp;quot;COM3&amp;quot; with portName&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Below is a simple program that shows how to open a connection to a serial device and then interact with it (receiving data and sending data). One thing to note is that the package gnu.io is used instead of javax.comm, though other than the change in package name the API follows the [http://java.sun.com/products/javacomm/ Java Communication API]. To find the names of the available, see the [[Discovering comm ports]] example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import gnu.io.CommPort;&lt;br /&gt;
import gnu.io.CommPortIdentifier;&lt;br /&gt;
import gnu.io.SerialPort;&lt;br /&gt;
&lt;br /&gt;
import java.io.FileDescriptor;&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
import java.io.InputStream;&lt;br /&gt;
import java.io.OutputStream;&lt;br /&gt;
&lt;br /&gt;
public class TwoWaySerialComm&lt;br /&gt;
{&lt;br /&gt;
    public TwoWaySerialComm()&lt;br /&gt;
    {&lt;br /&gt;
        super();&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    void connect ( String portName ) throws Exception&lt;br /&gt;
    {&lt;br /&gt;
        CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName);&lt;br /&gt;
        if ( portIdentifier.isCurrentlyOwned() )&lt;br /&gt;
        {&lt;br /&gt;
            System.out.println(&amp;quot;Error: Port is currently in use&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            CommPort commPort = portIdentifier.open(this.getClass().getName(),2000);&lt;br /&gt;
            &lt;br /&gt;
            if ( commPort instanceof SerialPort )&lt;br /&gt;
            {&lt;br /&gt;
                SerialPort serialPort = (SerialPort) commPort;&lt;br /&gt;
                serialPort.setSerialPortParams(57600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE);&lt;br /&gt;
                &lt;br /&gt;
                InputStream in = serialPort.getInputStream();&lt;br /&gt;
                OutputStream out = serialPort.getOutputStream();&lt;br /&gt;
                &lt;br /&gt;
                (new Thread(new SerialReader(in))).start();&lt;br /&gt;
                (new Thread(new SerialWriter(out))).start();&lt;br /&gt;
&lt;br /&gt;
            }&lt;br /&gt;
            else&lt;br /&gt;
            {&lt;br /&gt;
                System.out.println(&amp;quot;Error: Only serial ports are handled by this example.&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
        }     &lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /** */&lt;br /&gt;
    public static class SerialReader implements Runnable &lt;br /&gt;
    {&lt;br /&gt;
        InputStream in;&lt;br /&gt;
        &lt;br /&gt;
        public SerialReader ( InputStream in )&lt;br /&gt;
        {&lt;br /&gt;
            this.in = in;&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        public void run ()&lt;br /&gt;
        {&lt;br /&gt;
            byte[] buffer = new byte[1024];&lt;br /&gt;
            int len = -1;&lt;br /&gt;
            try&lt;br /&gt;
            {&lt;br /&gt;
                while ( ( len = this.in.read(buffer)) &amp;gt; -1 )&lt;br /&gt;
                {&lt;br /&gt;
                    System.out.print(new String(buffer,0,len));&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            catch ( IOException e )&lt;br /&gt;
            {&lt;br /&gt;
                e.printStackTrace();&lt;br /&gt;
            }            &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /** */&lt;br /&gt;
    public static class SerialWriter implements Runnable &lt;br /&gt;
    {&lt;br /&gt;
        OutputStream out;&lt;br /&gt;
        &lt;br /&gt;
        public SerialWriter ( OutputStream out )&lt;br /&gt;
        {&lt;br /&gt;
            this.out = out;&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        public void run ()&lt;br /&gt;
        {&lt;br /&gt;
            try&lt;br /&gt;
            {                &lt;br /&gt;
                int c = 0;&lt;br /&gt;
                while ( ( c = System.in.read()) &amp;gt; -1 )&lt;br /&gt;
                {&lt;br /&gt;
                    this.out.write(c);&lt;br /&gt;
                }                &lt;br /&gt;
            }&lt;br /&gt;
            catch ( IOException e )&lt;br /&gt;
            {&lt;br /&gt;
                e.printStackTrace();&lt;br /&gt;
            }            &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    public static void main ( String[] args )&lt;br /&gt;
    {&lt;br /&gt;
        try&lt;br /&gt;
        {&lt;br /&gt;
            (new TwoWaySerialComm()).connect(&amp;quot;COM3&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        catch ( Exception e )&lt;br /&gt;
        {&lt;br /&gt;
            // TODO Auto-generated catch block&lt;br /&gt;
            e.printStackTrace();&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Goodness</name></author>	</entry>

	<entry>
		<id>http://rxtx.qbang.org/wiki/index.php/Installation_for_Windows</id>
		<title>Installation for Windows</title>
		<link rel="alternate" type="text/html" href="http://rxtx.qbang.org/wiki/index.php/Installation_for_Windows"/>
				<updated>2006-07-03T11:04:17Z</updated>
		
		<summary type="html">&lt;p&gt;Goodness:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Short Install Instructions for Windows'''&lt;br /&gt;
&lt;br /&gt;
* Copy RXTXcomm.jar to {java.home}\lib\ext&lt;br /&gt;
* Copy rxtxSerial.dll to {java.home}\bin&lt;br /&gt;
&lt;br /&gt;
Where {java.home} is the location of the &amp;quot;java.home&amp;quot; system property, for&lt;br /&gt;
example &amp;quot;C:\Program Files\Java\j2re1.4.1_02&amp;quot;&lt;/div&gt;</summary>
		<author><name>Goodness</name></author>	</entry>

	<entry>
		<id>http://rxtx.qbang.org/wiki/index.php/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://rxtx.qbang.org/wiki/index.php/Main_Page"/>
				<updated>2006-07-03T10:59:00Z</updated>
		
		<summary type="html">&lt;p&gt;Goodness:&amp;#32;Fix INSTALL File link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the RXTX wiki!&lt;br /&gt;
&lt;br /&gt;
This is intended to be by and for RXTX users and developers.  To get things started, we will put the INSTALL information here.  But feel free to add your own content.&lt;br /&gt;
&lt;br /&gt;
*[http://www.rxtx.org RXTX home page]&lt;br /&gt;
*[[Installation|INSTALL File]] (RXTX 2.1)&lt;br /&gt;
*[[Installation for Windows]] (RXTX 2.1)&lt;br /&gt;
*[[Using RXTX]]&lt;br /&gt;
*[[Development]]&lt;br /&gt;
*[http://bugzilla.qbang.org/ Reporting Bugs]&lt;br /&gt;
*[[Projects]] using RXTX&lt;br /&gt;
&lt;br /&gt;
If you don't find an answer to your questions, create one here and ask on the rxtx [http://mailman.qbang.org/mailman/listinfo/rxtx mail-list].&lt;br /&gt;
&lt;br /&gt;
We can fill it in from there.&lt;/div&gt;</summary>
		<author><name>Goodness</name></author>	</entry>

	<entry>
		<id>http://rxtx.qbang.org/wiki/index.php/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://rxtx.qbang.org/wiki/index.php/Main_Page"/>
				<updated>2006-07-03T10:57:05Z</updated>
		
		<summary type="html">&lt;p&gt;Goodness:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the RXTX wiki!&lt;br /&gt;
&lt;br /&gt;
This is intended to be by and for RXTX users and developers.  To get things started, we will put the INSTALL information here.  But feel free to add your own content.&lt;br /&gt;
&lt;br /&gt;
*[http://www.rxtx.org RXTX home page]&lt;br /&gt;
*[[INSTALL File]] (RXTX 2.1)&lt;br /&gt;
*[[Installation for Windows]] (Rxtx 2.1)&lt;br /&gt;
*[[Using RXTX]]&lt;br /&gt;
*[[Development]]&lt;br /&gt;
*[http://bugzilla.qbang.org/ Reporting Bugs]&lt;br /&gt;
*[[Projects]] using RXTX&lt;br /&gt;
&lt;br /&gt;
If you don't find an answer to your questions, create one here and ask on the rxtx [http://mailman.qbang.org/mailman/listinfo/rxtx mail-list].&lt;br /&gt;
&lt;br /&gt;
We can fill it in from there.&lt;/div&gt;</summary>
		<author><name>Goodness</name></author>	</entry>

	</feed>