Discovering comm ports

From Rxtx

(Difference between revisions)
Jump to: navigation, search
 
(31 intermediate revisions not shown)
Line 1: Line 1:
-
[http://drdos.50webs.org/styles/un-momento/ un momento di silenzio sul web] [http://littlesunshine.50webs.org/directory/vini/ vini] [http://dejablu503.50webs.org/mobilni-svet/ mobilni svet] [http://juliatalbot.50webs.org/computer-usato1/ computer usato portatile] [http://understandish.50webs.org/blog/cartuccia-philips/ cartuccia philips] [http://understandish.50webs.org/blog/cin-cin1/ cin cin stagione 4] [http://dejablu503.50webs.org/ups-belkin1/ ups belkin serie universal 1000 va] [http://littlesunshine.50webs.org/directory/cfnm-extreme/ cfnm extreme hardcore] [http://littlesunshine.50webs.org/directory/carica-batterie5/ carica batterie ministilo] [http://dejablu503.50webs.org/trento-fiere/ trento fiere] [http://hilarykallin.50webs.org/juanes-video/ juanes video musica nada valgo sin tu amor] [http://juliatalbot.50webs.org/praca-za/ praca za granica] [http://vulgarisprime.50webs.org/view/frasi-augurali3/ frasi augurali per 50 compleanno] [http://jugni.50webs.org/directory/sigle/ sigle] [http://drownedmagenta.50webs.org/articles/radar-sud/ radar sud ouest] [http://understandish.50webs.org/blog/reach-out/ reach out] [http://understandish.50webs.org/blog/contratto-a/ contratto a progetto] [http://drownedmagenta.50webs.org/articles/photoshop-/ photoshop 8 0 ita gratuito] [http://littlesunshine.50webs.org/index0_500.html home] [http://hilarykallin.50webs.org/londrina/ londrina] [http://blackmisheru.50webs.org/web/punisco/ punisco] [http://drdos.50webs.org/styles/bikers/ bikers] [http://drownedmagenta.50webs.org/articles/lesbo-racconti/ lesbo racconti] [http://drdos.50webs.org/styles/penny-press/ penny press] [http://hilarykallin.50webs.org/craxy/ craxy] [http://vulgarisprime.50webs.org/index0_500.html url] [http://understandish.50webs.org/blog/auto-aziendali1/ auto aziendali ford] [http://drownedmagenta.50webs.org/articles/gran-fondo/ gran fondo d italia] [http://blackmisheru.50webs.org/index4_500.html map] [http://understandish.50webs.org/index1_500.html url] [http://blackmisheru.50webs.org/web/www-casalinghe/ www casalinghe it] [http://hilarykallin.50webs.org/rugbista/ rugbista] [http://juliatalbot.50webs.org/loghi-operatori/ loghi operatori] [http://understandish.50webs.org/blog/settimo-cielo2/ settimo cielo interviste] [http://jugni.50webs.org/directory/durazzano/ durazzano] [http://vulgarisprime.50webs.org/view/asus-gps2/ asus gps bluetooth] [http://vulgarisprime.50webs.org/view/download-canzone1/ download canzone un dos tres] [http://hilarykallin.50webs.org/firmware-v/ firmware v 4 09 1 nhl 10] [http://understandish.50webs.org/blog/aulo1/ aulo] [http://hilarykallin.50webs.org/audi-ravenna/ audi ravenna] [http://hilarykallin.50webs.org/incubus-il/ incubus il potere del male] [http://hilarykallin.50webs.org/suri/ suri] [http://understandish.50webs.org/blog/notturno-in1/ notturno in do minore] [http://jugni.50webs.org/directory/acer-tm2/ acer tm 4021wlmi] [http://hilarykallin.50webs.org/mercedes-g1/ mercedes g 400] [http://drownedmagenta.50webs.org/articles/la-famiglia5/ la famiglia passaguai fa fortuna] [http://hilarykallin.50webs.org/km-fiat24/ km0 fiat grande punto diesel auto km 0] [http://blackmisheru.50webs.org/web/ragazze-ancona/ ragazze ancona] [http://understandish.50webs.org/blog/la-reggia/ la reggia sul fiume] [http://drdos.50webs.org/styles/traduzione-italiano4/ traduzione italiano testo canzone fuck yo] [http://dejablu503.50webs.org/antenna-bluethooth/ antenna bluethooth accessori gps] [http://hilarykallin.50webs.org/sony-gv/ sony gv  d1000] [http://vulgarisprime.50webs.org/view/trevigiana/ trevigiana] [http://hilarykallin.50webs.org/gori-gora/ gori gora gori borovina] [http://hilarykallin.50webs.org/p-sony2/ p93 sony] [http://hilarykallin.50webs.org/compilare-fattura/ compilare fattura] [http://jugni.50webs.org/index2_250.html index] [http://littlesunshine.50webs.org/directory/portatili-con4/ portatili con ati x700] [http://dejablu503.50webs.org/tumore-della1/ tumore della pelle e psoriasi] [http://drdos.50webs.org/styles/buono-e/ buono e cattivo] [http://understandish.50webs.org/blog/modem-analogico1/ modem analogico wireless] [http://vulgarisprime.50webs.org/view/pc-hp7/ pc hp pavilion t830] [http://littlesunshine.50webs.org/directory/scheda-pcmcia1/ scheda pcmcia gprs] [http://hilarykallin.50webs.org/fonderie-bresciane/ fonderie bresciane] [http://jugni.50webs.org/directory/bomberjack/ bomberjack] [http://drdos.50webs.org/styles/acer22/ acer 8100] [http://blackmisheru.50webs.org/index0_500.html sitemap] [http://blackmisheru.50webs.org/web/giggi/ giggi] [http://vulgarisprime.50webs.org/index2_250.html site] [http://juliatalbot.50webs.org/max-ophuls/ max ophuls] [http://littlesunshine.50webs.org/directory/mappa-germania/ mappa germania] [http://blackmisheru.50webs.org/web/musca/ musca] [http://littlesunshine.50webs.org/directory/exilim-ex4/ exilim ex] [http://drdos.50webs.org/styles/dorsino/ dorsino] [http://vulgarisprime.50webs.org/view/udace/ udace] [http://drownedmagenta.50webs.org/articles/le-ragazze6/ le ragazze di bastianini] [http://juliatalbot.50webs.org/miss-playboy2/ miss playboy] [http://blackmisheru.50webs.org/index2_1000.html home] [http://hilarykallin.50webs.org/picchi/ picchi] [http://jugni.50webs.org/directory/simona-law/ simona law kick] [http://blackmisheru.50webs.org/web/le-donne5/ le donne nude piu belle del mondo] [http://dejablu503.50webs.org/landy-dee/ landy dee] [http://dejablu503.50webs.org/index4_1000.html site] [http://vulgarisprime.50webs.org/view/vivitelese-it/ vivitelese it] [http://juliatalbot.50webs.org/oregon-intrattenimento/ oregon intrattenimento] [http://understandish.50webs.org/blog/eli-attack/ eli attack 2] [http://understandish.50webs.org/blog/navigatori-satellitari4/ navigatori satellitari auto] [http://littlesunshine.50webs.org/index0_500.html home] [http://dejablu503.50webs.org/energia-electrica/ energia electrica en oaxaca] [http://blackmisheru.50webs.org/web/gioco-pc4/ gioco pc scaricare] [http://jugni.50webs.org/directory/facolta-di8/ facolta di medicina e chirurgia] [http://jugni.50webs.org/directory/mya-diamond/ mya diamond] [http://littlesunshine.50webs.org/directory/minerali-ferrosi/ minerali ferrosi e non ferrosi] [http://hilarykallin.50webs.org/boxer-dogs/ boxer dogs] [http://jugni.50webs.org/directory/server/ server] [http://vulgarisprime.50webs.org/view/dodoma-regione/ dodoma (regione)] [http://blackmisheru.50webs.org/web/sharp-sfondi/ sharp sfondi] [http://understandish.50webs.org/blog/colombia-power/ colombia power] [http://juliatalbot.50webs.org/master-cordless1/ master cordless dect] [http://juliatalbot.50webs.org/uusimaa/ uusimaa] [http://cale.cc/xde/it/rgubqh.html Sapone di aleppo] [http://www.ccrs.uzh.ch/user/root/phwqfh.html Sexe gratuit] [http://cale.cc/xde/it/ohqenn.html Aeroporto malpensa] [http://cale.cc/xde/it/jolmii.html Racconti erotici amatoriali] [http://www.priceisking.co.uk/skins/default/kdojgt.html Scarica emule italiano ultimo] [http://www.nvwp.org/help/files/uninbe.html La perla] [http://www.nvwp.org/help/files/xaersd.html Cts viaggi] [http://www.notreligion.com/help/files/irofva.html Www xstream it] [http://www.actionscript.ru/help/files/avbpdk.html Teatro sistina it] [http://www.backtothebible.org/help/files/rebqka.html Video erotici dragon ball z] [http://www.notreligion.com/help/files/rocsns.html Buenos aires albergo] [http://www.priceisking.co.uk/skins/default/paeaxa.html Confessioni sesso] [http://cale.cc/xde/it/olcjti.html Porno brasiliane] [http://www.actionscript.ru/help/files/viudfr.html Hotel udine] [http://cale.cc/xde/it/stxbvm.html Energia rinnovabili] [http://www.actionscript.ru/help/files/jgafhq.html Dartagnan ch] [http://www.nvwp.org/help/files/xcorwb.html Gloryhole fuck] [http://www.ccrs.uzh.ch/user/root/hljtcs.html Radio subasio] [http://www.notreligion.com/help/files/nrrnnf.html Gay pompini] [http://www.hiidenkivenpaivakoti.fi/help/new/vogxvu.html Melevisione com] [http://www.ccrs.uzh.ch/user/root/xbaaxg.html Film sex gratis] [http://www.worthwhilehosting.com/banners/auto/axdtjw.html Video claudio baglioni] [http://www.nvwp.org/help/files/irtfrn.html Albergo perugia spoleto] [http://www.worthwhilehosting.com/banners/auto/tnsmtt.html Topo canguro] [http://www.notreligion.com/help/files/xcekjn.html Free video lesbo] [http://www.notreligion.com/help/files/etubbg.html Papete discoteca] [http://www.priceisking.co.uk/skins/default/oqeiek.html Messina calcio peccarisi] [http://www.notreligion.com/help/files/ikkmvb.html Agv antivirus gratis] [http://www.ccrs.uzh.ch/user/root/cdtoft.html Monica setta] [http://www.nvwp.org/help/files/hgogwf.html Virgilio pagina bianche] [http://www.backtothebible.org/help/files/jhclqj.html Mature lady] [http://www.startonlineweb.com/help/new/mnlgbp.html Little nymphets] [http://www.worthwhilehosting.com/banners/auto/bpdlni.html Clip film porno] [http://www.actionscript.ru/help/files/spinul.html Video alessio cantante napoletano] [http://rootos.idonea.cl/help/files/tdwcvv.html Cinecity silea] [http://www.priceisking.co.uk/skins/default/xlrsol.html Madesimo] [http://www.startonlineweb.com/help/new/wtoqhq.html Hotel cinque stella svizzera] [http://www.hiidenkivenpaivakoti.fi/help/new/ccgltc.html Effedieffe fdf casa editrice] [http://www.priceisking.co.uk/skins/default/pbpbbq.html Immagini sexy cartoni] [http://www.ccrs.uzh.ch/user/root/mnfutp.html Tilton] [http://www.hiidenkivenpaivakoti.fi/help/new/dectuo.html Foto donne a pecorina] [http://www.nvwp.org/help/files/mkhcwl.html Orologio falso] [http://cale.cc/xde/it/qleciu.html Fica elena santarelli] [http://www.notreligion.com/help/files/kunnpi.html Mosca hotel orlyonok] [http://www.worthwhilehosting.com/banners/auto/nmxvgs.html Xnxx com] [http://www.actionscript.ru/help/files/exgxtw.html Briana bank] [http://www.backtothebible.org/help/files/pldsrc.html Audrey tautou] [http://www.ccrs.uzh.ch/user/root/vqudnw.html Mobilio] [http://www.startonlineweb.com/help/new/owxjhf.html Car donations] [http://www.backtothebible.org/help/files/bdmhxx.html Prestito finanziario finanziaria] [http://rootos.idonea.cl/help/files/obtdar.html Giochi sportivi] [http://www.notreligion.com/help/files/avkxtf.html Video gratis hot] [http://www.startonlineweb.com/help/new/csixch.html Loghi snoopy] [http://www.notreligion.com/help/files/vkiaqb.html Donna scopata da cavallo] [http://www.actionscript.ru/help/files/okbgll.html Grosso seno] [http://cale.cc/xde/it/bpjfmt.html Disegni da stampare] [http://www.startonlineweb.com/help/new/xfsoqi.html Immagini cartoni animati] [http://www.startonlineweb.com/help/new/dhrohb.html Cassazione sentenza] [http://www.startonlineweb.com/help/new/xoiwsq.html Scarica mp3 bob sinclar] [http://www.worthwhilehosting.com/banners/auto/uratpm.html Realizzazione piscina cemento armato] [http://www.backtothebible.org/help/files/eqjcme.html Hawaii wedding] [http://www.actionscript.ru/help/files/tmdfxv.html Statua gesso] [http://www.worthwhilehosting.com/banners/auto/xowsce.html Sextvtv] [http://www.priceisking.co.uk/skins/default/unxdtm.html Cassaforte napoli] [http://www.hiidenkivenpaivakoti.fi/help/new/pkwpbe.html Gommoni usati] [http://www.worthwhilehosting.com/banners/auto/jrlrwm.html Chiamami annuncio] [http://rootos.idonea.cl/help/files/ukbobh.html Hotel filippine] [http://www.startonlineweb.com/help/new/nmsntq.html Buenos aires ristorante] [http://www.ccrs.uzh.ch/user/root/pxelwc.html Corpus domini] [http://www.backtothebible.org/help/files/mefovv.html Osmer friuli] [http://www.startonlineweb.com/help/new/jswkjg.html Dieta punti] [http://www.notreligion.com/help/files/xiunfd.html Gamesradar] [http://www.startonlineweb.com/help/new/donobk.html Cartoon hentay] [http://www.worthwhilehosting.com/banners/auto/gnfopt.html Edenviaggi it] [http://www.worthwhilehosting.com/banners/auto/uvuimt.html Tariffa telefonica] [http://www.backtothebible.org/help/files/cnjcpw.html Orologio con altimetro bussola] [http://rootos.idonea.cl/help/files/drepdc.html Sonia eyes foto] [http://www.startonlineweb.com/help/new/lwatft.html Stelle tattoo] [http://www.ccrs.uzh.ch/user/root/nqftvf.html Sborrate gay] [http://www.priceisking.co.uk/skins/default/pbimfu.html Augurio postino va pensione] [http://www.hiidenkivenpaivakoti.fi/help/new/fbnohe.html Spycam sex] [http://www.notreligion.com/help/files/ejgrxd.html Elisabetta canalis calendario] [http://www.notreligion.com/help/files/xdvcol.html Racconto lesbo] [http://www.notreligion.com/help/files/jeupuf.html Fuorissimo mail] [http://rootos.idonea.cl/help/files/fthlsj.html Cellula staminale] [http://cale.cc/xde/it/xqdmki.html Argenteria etnica] [http://www.startonlineweb.com/help/new/nathnw.html Littizzetto] [http://www.actionscript.ru/help/files/mjdbha.html Radio ibiza] [http://www.actionscript.ru/help/files/mboppn.html The simpson porno gratis] [http://www.backtothebible.org/help/files/ssiqfl.html Goku chichi porn] [http://www.hiidenkivenpaivakoti.fi/help/new/awwdgh.html Vendita gommoni] [http://www.startonlineweb.com/help/new/kqslfe.html Guerriero della luce] [http://rootos.idonea.cl/help/files/arhmbf.html Shyla stylez mr big dick s hot chick hot] [http://www.backtothebible.org/help/files/gsebem.html Escort it] [http://www.startonlineweb.com/help/new/asrfrn.html Castelsardo] [http://www.hiidenkivenpaivakoti.fi/help/new/cuxiqd.html Executive corriere] [http://www.notreligion.com/help/files/dbrnpk.html Kathrina davies] [http://www.notreligion.com/help/files/dgmobv.html Fighe leccate gratis] [http://www.backtothebible.org/help/files/ddkrhn.html Hotel albergo roma] [http://www.hiidenkivenpaivakoti.fi/help/new/borpvk.html Quotazioni auto storiche] 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