Discovering comm ports

From Rxtx

(Difference between revisions)
Jump to: navigation, search
 
(49 intermediate revisions not shown)
Line 1: Line 1:
-
[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30336 qwest ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1343 cheap carisoprodol] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=107 free sprint ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=125 sharp ringtones] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=55 cheap cyclobenzaprine] [http://students.hsc.unt.edu/housing/item.cfm?type=2885 tenuate online] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=64 diethylpropion online] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=92 rivotril online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=224 sagem ringtones] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/ultram_4782.htm buy ultram] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=832 free mono ringtones] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=68 buy tenuate] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=89 free samsung ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=15&tid=3758 rivotril online] [http://library.cshl.edu/wp/vb/member.php?u=1373 nextel ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2879 cheap clomid] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=57 buy ativan] [http://students.hsc.unt.edu/housing/item.cfm?type=2847 tramadol online] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/didrex_2512.htm didrex online] [http://wc1.worldcrossing.com/WebX/.1de60a05 sprint ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a2b ultracet] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=20 cheap tramadol] [http://library.cshl.edu/wp/vb/member.php?u=1366 buy propecia] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=119 free sharp ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=235 tenuate] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=30 buy tramadol] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=87 real ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1368 nokia ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2856 cialis online] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/ativan_9901.htm cheap ativan] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=84 cingular ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=54 buy ultram] [http://students.hsc.unt.edu/housing/item.cfm?type=2858 cheap viagra] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=37 cheap clonazepam] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=58 order viagra] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=131 sprint ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30307 zoloft online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30317 cheap zanaflex] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=34 carisoprodol online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=202 nokia ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2914 sony ericsson ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=135 cheap ultracet] [http://wc1.worldcrossing.com/WebX/.1de60a25 samsung ringtones] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=797 zoloft] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=772 cheap ativan] [http://wc1.worldcrossing.com/WebX/.1de60a16 levitra] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=819 qwest ringtones] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=817 free mp3 ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=124 samsung ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=15&tid=3764 real ringtones] [http://wc1.worldcrossing.com/WebX/.1de609f1 cheap lortab] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=70 free alltel ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30324 hoodia] [http://wc1.worldcrossing.com/WebX/.1de60a36 cheap zyban] [http://students.hsc.unt.edu/housing/item.cfm?type=2863 alprazolam online] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=71 cheap wellbutrin] [http://wc1.worldcrossing.com/WebX/.1de60a10 didrex online] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=15&tid=3768 free sagem ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=108 cheap nexium] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=191 cheap lorazepam] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30260 clonazepam online] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=59 cheap meridia] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30349 free cingular ringtones] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=93 free midi ringtones] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=42 cheap meridia] [http://wc1.worldcrossing.com/WebX/.1de60a0e celexa online] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=81 lisinopril online] [http://wc1.worldcrossing.com/WebX/.1de60a27 sildenafil] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=103 mono ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=15&tid=3772 midi ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=73 buy nexium] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=70 nokia ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30241 buy xanax] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30283 didrex online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=231 order rivotril] [http://library.cshl.edu/wp/vb/member.php?u=1377 free samsung ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3713 tenuate online] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=38 diazepam online] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=91 diethylpropion] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=147 cheap zoloft] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=102 midi ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=207 buy xanax] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/propecia_2137.htm propecia online] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=15&tid=3748 cyclobenzaprine online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=225 free wwe ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3722 free qwest ringtones] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=91 free music ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2874 ultracet online] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=86 sonyericsson ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3718 hoodia online] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3728 free sonyericsson ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30331 free free ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30252 meridia online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30356 cool ringtones] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=765 buy phentermine] [http://library.cshl.edu/wp/vb/member.php?u=1351 adipex online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30262 cheap paxil] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=160 adipex online] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=98 free mtv ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=121 free wwe ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30230 cheap tramadol] [http://wc1.worldcrossing.com/WebX/.1de60a22 cheap phentermine] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=86 cheap ortho] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=34 buy norco] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=208 phentermine online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=215 buy zoloft] [http://wc1.worldcrossing.com/WebX/.1de609db but adipex] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=47 clonazepam] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=76 cheap didrex] [http://library.cshl.edu/wp/vb/member.php?u=1372 mp3 ringtones] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=794 clomid] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=808 rivotril online] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=89 free alltel ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1371 funny ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=114 cheap pharmacy online] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=781 levitra] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=79 samsung ringtones] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=842 free mtv ringtones] [http://www.colorado.edu/studentgroups/backcountryclub/blahdocs/uploads/viagra_2557.htm cheap viagra] [http://students.hsc.unt.edu/housing/item.cfm?type=2866 levitra online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=229 cheap valium] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=777 cheap vicodin] [http://library.cshl.edu/wp/vb/member.php?u=1340 soma online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=233 free sonyericsson ringtones] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=85 free sagem ringtones] [http://wc1.worldcrossing.com/WebX/.1de609f9 order norco] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30238 cheap phentermine] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=784 lorazepam online] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=805 cheap zanaflex] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=187 free kyocera ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3731 sharp ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=212 propecia online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30357 sharp ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=237 free samsung ringtones] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=50 buy prozac] [http://library.cshl.edu/wp/vb/member.php?u=1341 valium online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=197 free mp3 ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=15&tid=3760 zyban online] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=115 free mono ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=85 ericsson ringtones] [http://wc1.worldcrossing.com/WebX/.1de609e6 buy cyclobenzaprine] [http://library.cshl.edu/wp/vb/member.php?u=1383 sagem ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=100 funny ringtones] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=31 cheap viagra] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=71 buy alprazolam] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=105 mp3 ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2884 celexa online] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=33 phentermine online] [http://students.hsc.unt.edu/housing/item.cfm?type=2900 free funny ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=96 levitra online] [http://library.cshl.edu/wp/vb/member.php?u=1339 cheap tramadol] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=51 cheap sildenafil] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=54 wellbutrin online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30269 cheap wellbutrin] [http://library.cshl.edu/wp/vb/member.php?u=1360 order lorazepam] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=73 zanaflex] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=802 buy pharmacy online] [http://students.hsc.unt.edu/housing/item.cfm?type=2861 cheap norco] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=60 adipex online] [http://wc1.worldcrossing.com/WebX/.1de609ff real ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=75 propecia online] [http://wc1.worldcrossing.com/WebX/.1de609ee but hydrocodone] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=241 sony ericsson ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=122 free kyocera ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1367 didrex online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30338 motorola ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2859 cheap meridia] [http://students.hsc.unt.edu/housing/item.cfm?type=2857 cheap ativan] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=57 propecia online] [http://wc1.worldcrossing.com/WebX/.1de60a13 fioricet online] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=123 sagem ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1357 cheap levitra] [http://students.hsc.unt.edu/housing/item.cfm?type=2851 carisoprodol online] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=42 lorazepam online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=186 jazz ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2915 free mono ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=232 sony ringtones] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=81 free ringtones] [http://wc1.worldcrossing.com/WebX/.1de609fa online pharmacy] [http://wc1.worldcrossing.com/WebX/.1de609e1 carisoprodol online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30314 pharmacy online online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=219 viagra online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30337 free real ringtones] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=90 free punk ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30363 sony ringtones] [http://www.ovu.edu/community/toast.asp?sub=show&action=posts&fid=5&tid=3704 cheap lorazepam] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=58 cheap didrex] [http://ae.siam.edu/forums/toast.asp?sub=show&action=posts&fid=2&tid=75 free qwest ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2917 free punk ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=146 zanaflex online] [http://library.cshl.edu/wp/vb/member.php?u=1387 alltel ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=104 free real ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1352 norco online] [http://www.aswsu-ddp.wsu.edu/toast/forums.asp?sub=show&action=posts&fid=3&tid=787 but cyclobenzaprine] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=190 cheap lisinopril] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=167 carisoprodol online] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=124 free ericsson ringtones] [http://www4.nau.edu/fera/index.asp?sub=show&action=posts&fid=4&tid=79 zyban online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=217 free punk ringtones] [http://kc.vanderbilt.edu/forums/toast.asp?sub=show&action=posts&fid=5&tid=49 phentermine online] This code snippet shows how to find out the available comms ports on your computer.:
+
This code snippet shows how to find out the available comms ports on your computer.:
<pre>
<pre>
 +
import gnu.io.*;
     static void listPorts()
     static void listPorts()
     {
     {
-
         Enumeration portEnum = CommPortIdentifier.getPortIdentifiers();
+
         java.util.Enumeration<CommPortIdentifier> portEnum = CommPortIdentifier.getPortIdentifiers();
         while ( portEnum.hasMoreElements() )  
         while ( portEnum.hasMoreElements() )  
         {
         {
-
             CommPortIdentifier portIdentifier = (CommPortIdentifier) portEnum.nextElement();
+
             CommPortIdentifier portIdentifier = portEnum.nextElement();
-
             System.out.println(portIdentifier.getName()   " - "   getPortTypeName(portIdentifier.getPortType()) );
+
             System.out.println(portIdentifier.getName() " - " getPortTypeName(portIdentifier.getPortType()) );
         }         
         }         
     }
     }
Line 31: Line 32:
     }
     }
</pre>
</pre>
 +
 +
Please note that on Ubuntu 11.04, the Arduino Uno and possibly others are recognised as /dev/ttyACMxx .
 +
The RXTX library only searches through /dev/ttySxx, so you need to make symlinks if your distro does the same,
 +
so for example ln -s /dev/ttyACM0 /dev/ttyS33 .
 +
 +
Besides that, you need to close the serial port after starting, to prevent Linux from making new devices, like /dev/ttyACM2.
 +
Do not forget to remove the lock file from /var/lock if you forgot to close the port.

Latest revision as of 00:35, 15 June 2011

This code snippet shows how to find out the available comms ports on your computer.:

import gnu.io.*;
    static void listPorts()
    {
        java.util.Enumeration<CommPortIdentifier> portEnum = CommPortIdentifier.getPortIdentifiers();
        while ( portEnum.hasMoreElements() ) 
        {
            CommPortIdentifier portIdentifier = portEnum.nextElement();
            System.out.println(portIdentifier.getName()  +  " - " +  getPortTypeName(portIdentifier.getPortType()) );
        }        
    }
    
    static String getPortTypeName ( int portType )
    {
        switch ( portType )
        {
            case CommPortIdentifier.PORT_I2C:
                return "I2C";
            case CommPortIdentifier.PORT_PARALLEL:
                return "Parallel";
            case CommPortIdentifier.PORT_RAW:
                return "Raw";
            case CommPortIdentifier.PORT_RS485:
                return "RS485";
            case CommPortIdentifier.PORT_SERIAL:
                return "Serial";
            default:
                return "unknown type";
        }
    }

Please note that on Ubuntu 11.04, the Arduino Uno and possibly others are recognised as /dev/ttyACMxx . The RXTX library only searches through /dev/ttySxx, so you need to make symlinks if your distro does the same, so for example ln -s /dev/ttyACM0 /dev/ttyS33 .

Besides that, you need to close the serial port after starting, to prevent Linux from making new devices, like /dev/ttyACM2. Do not forget to remove the lock file from /var/lock if you forgot to close the port.

Personal tools