Discovering comm ports

From Rxtx

(Difference between revisions)
Jump to: navigation, search
 
(25 intermediate revisions not shown)
Line 1: Line 1:
-
[http://dacrackster.freehostia.com/foto-uomini7/ foto uomini] [http://tommyw.h18.ru/view/maro-world/ maro world] [http://is-bel.freehostia.com/description/calendari-di5/ calendari di nudi] [http://bloodmader.quotaless.com/orchestr-bagutti/ orchestr bagutti franco] [http://imjss.freehostia.com/topic/ga-sesso.htm ga sesso] [http://sugarbear280.freehostia.com/assicurazione-chiavari.htm assicurazione chiavari] [http://super-ioziki.freehostia.com/blog/francine-prieto.htm francine prieto pics] [http://lazy-murrr.freehostia.com/resources/mai-ai5/ mai ai hiii] [http://seholwag.quotaless.com/text/winmx-manuali/ winmx manuali in italiano] [http://orangeyuni.freehostia.com/html/broken-vow/ broken vow] [http://tacogrrl.freehostia.com/library/ellery/ ellery] [http://xkobo.freehostia.com/blog/www-spaziogame/ www spaziogame com] [http://is-bel.freehostia.com/description/fuga-dal8/ fuga dal futuro] [http://www.earth-nomad.pop3.ru/lib/pornograficas/ pornograficas] [http://dacrackster.freehostia.com/valentino-giovanni/ valentino giovanni pascoli] [http://drakuldemonking.freehostia.com/directory/love-x/ love x love] [http://arqene.freehostia.com/data/waggerl-karl/ waggerl karl heinrich] [http://titinthewind.freehostia.com/blog/dramma-nel.htm dramma nel porto  ultimo addio] [http://sadmelodies.quotaless.com/fulvio/ fulvio] [http://egocentricfreak.freehostia.com/html/armadilo1/ armadilo 2] [http://sugarbear280.freehostia.com/schede-memoria2.htm schede memoria xd] [http://mariannah.pop3.ru/topic/fuck-it2/ fuck it frankee] [http://dacrackster.freehostia.com/amd-57/ amd 3700 san diego] [http://www.perla-e.pop3.ru/styles/kof/ kof 2004] [http://super-ioziki.freehostia.com/blog/sdram-memoria.htm sdram memoria 128] [http://beloyar.freehostia.com/html/stampante-per8.htm stampante per cd card] [http://seholwag.quotaless.com/text/poesia-sulla/ poesia sulla tartaruga] [http://tacogrrl.freehostia.com/library/qosmio-g4/ qosmio g20 105] [http://lazy-murrr.freehostia.com/resources/quattro-giorni/ quattro giorni a settembre] [http://xkobo.freehostia.com/blog/harman-kardon36/ harman kardon avr 335] [http://drakuldemonking.freehostia.com/directory/toshiba-tdpt1/ toshiba tdpt40] [http://lazy-murrr.freehostia.com/resources/bobsleddin/ bobsleddin] [http://seholwag.quotaless.com/text/sandra-gradi/ sandra 360gradi] [http://www.perla-e.pop3.ru/styles/produttori-di/ produttori di zucchero] [http://orangeyuni.freehostia.com/html/rumeni/ rumeni] [http://yarowrath.quotaless.com/new/nilo-egitto/ nilo egitto] [http://seholwag.quotaless.com/text/stampanti-laser3/ stampanti laser a colori epson] [http://is-bel.freehostia.com/description/on-line5/ on line] [http://www.wojzeh.pop3.ru/new/jack-audio/ jack audio rca] [http://lazy-murrr.freehostia.com/resources/reti-con2/ reti con doghe 160x190 in legno] [http://titinthewind.freehostia.com/blog/bang-e.htm bang e deo] [http://drakuldemonking.freehostia.com/directory/viva-la8/ viva la mamma bennato] [http://orangeyuni.freehostia.com/html/elettrostimolatori-offerta/ elettrostimolatori offerta] [http://sugarbear280.freehostia.com/amplificatori-audio6.htm amplificatori audio schema elettrico] [http://egocentricfreak.freehostia.com/html/crociera-fluviale/ crociera fluviale] [http://www.squirrel94085.pop3.ru/o-mia/ o mia rosina] [http://alitronthegr.h18.ru/braveheart/ braveheart] [http://imjss.freehostia.com/topic/le-citta2.htm le citta invisibili] [http://yutta.quotaless.com/description/boris/ boris] [http://arqene.freehostia.com/data/foto-perizoma/ foto perizoma] [http://renkokitomi.freehostia.com/text/kmetoband.htm kmetoband] [http://sugarbear280.freehostia.com/la-notte34.htm la notte] [http://talindras.freehostia.com/styles/esami-di7.htm esami di maturita it] [http://egocentricfreak.freehostia.com/html/empyre/ empyre] [http://lesgirly.quotaless.com/topic/apocalypse-domani/ apocalypse domani] [http://imjss.freehostia.com/topic/alloggio-economico3.htm alloggio economico roma] [http://egocentricfreak.freehostia.com/html/direct-connect1/ direct connect dc] [http://egocentricfreak.freehostia.com/html/paradise-beach/ paradise beach] [http://beloyar.freehostia.com/html/yamaha-dvd4.htm yamaha dvd dvx] [http://cthfht5.freehostia.com/directory/gli-uomini13.htm gli uomini non possono essere violentati] [http://embem30.quotaless.com/india-industrie/ india industrie chimiche spa] [http://lazy-murrr.freehostia.com/resources/lightsaber/ lightsaber] [http://beloyar.freehostia.com/html/md2.htm md] [http://lesgirly.quotaless.com/topic/belsen-was/ belsen was a gas] [http://lesgirly.quotaless.com/topic/asciugamani-casa/ asciugamani casa] [http://egocentricfreak.freehostia.com/html/il-segreto28/ il segreto del bosco vecchio dino] [http://lazy-murrr.freehostia.com/resources/depravazione/ depravazione] [http://arqene.freehostia.com/data/zafira3/ zafira 2 0] [http://super-ioziki.freehostia.com/blog/telecomando-ps2.htm telecomando ps2 sony] [http://www.squirrel94085.pop3.ru/maglia-maradona/ maglia maradona] [http://sugarbear280.freehostia.com/toyota-rav26.htm toyota rav 4 in toscana] [http://www.earth-nomad.pop3.ru/lib/rapina-a/ rapina a nave armata] [http://talindras.freehostia.com/styles/doppio-intrigo.htm doppio intrigo] [http://tommyw.h18.ru/view/xfiles-season/ xfiles season 7] [http://imjss.freehostia.com/topic/sao-roma.htm sao roma balkan] [http://alitronthegr.h18.ru/con-noi/ con noi divise il pane] [http://arqene.freehostia.com/data/the-pretenders/ the pretenders greatest hits] [http://www.shlomif.pop3.ru/view/prostitute-a/ prostitute a pagamento] [http://super-ioziki.freehostia.com/blog/calendario-mogli.htm calendario mogli russe] [http://cthfht5.freehostia.com/directory/liborio-sciacca.htm liborio sciacca] [http://www.wojzeh.pop3.ru/new/camera-imperia/ camera imperia] [http://drakuldemonking.freehostia.com/directory/usb-42/ usb 120 gb hard disk e floppy] [http://just-whelmed.freehostia.com/html/autoabbronzante.htm autoabbronzante] [http://lazy-murrr.freehostia.com/resources/harris-frank/ harris frank] [http://yarowrath.quotaless.com/new/yes/ yes] [http://super-ioziki.freehostia.com/blog/jawel-diamond.htm jawel diamond] [http://embem30.quotaless.com/holding-out/ holding out for a hero tyler bonnie] [http://dacrackster.freehostia.com/signor-meteo/ signor meteo] [http://titinthewind.freehostia.com/blog/my-street.htm my street] [http://lesgirly.quotaless.com/topic/classic-car/ classic car] [http://www.shlomif.pop3.ru/view/linksys-wrtgs/ linksys wrt54gs] [http://yarowrath.quotaless.com/new/bataglie-in1/ bataglie in mare] [http://xkobo.freehostia.com/blog/omnitel/ omnitel] [http://xkobo.freehostia.com/blog/pioneer-ts/ pioneer ts05] [http://embem30.quotaless.com/hotel-corsica/ hotel corsica] [http://dacrackster.freehostia.com/hans-zimmer4/ hans zimmer il gladiatore] [http://egocentricfreak.freehostia.com/html/sciopero-mezzi/ sciopero mezzi di trasporto] [http://tyttor.freehostia.com/blog/happysexo/ happysexo] [http://titinthewind.freehostia.com/blog/quirino-provincia.htm quirino (provincia delle fili] [http://tommyw.h18.ru/view/stampanti-laser/ stampanti laser nt] [http://www.backtothebible.org/help/files/nnxrfo.html Anteprima video gratis] [http://www.nvwp.org/help/files/tifavr.html Monster anal] [http://cale.cc/xde/it/fgrrus.html pompino gay] [http://www.ccrs.uzh.ch/user/root/vtwqrb.html Fondazione cellula staminale] [http://www.worthwhilehosting.com/banners/auto/abtpic.html Audrey hepburn] [http://www.backtothebible.org/help/files/qtdcin.html Telesimo] [http://www.actionscript.ru/help/files/bjqdsx.html Antinfiammatori non steroidi] [http://www.actionscript.ru/help/files/kohovf.html Porno mature movie] [http://cale.cc/xde/it/lbxsrj.html Agriturismo calabria] [http://www.ccrs.uzh.ch/user/root/pqvkdb.html Scimmia] [http://www.notreligion.com/help/files/caerxq.html Roberto malone] [http://rootos.idonea.cl/help/files/tgkofd.html Tettone negre] [http://www.notreligion.com/help/files/chhdvg.html Melissa satta] [http://rootos.idonea.cl/help/files/qfknuh.html Pompino al cavallo] [http://www.hiidenkivenpaivakoti.fi/help/new/cckcnn.html Lampadina led 220v] [http://www.backtothebible.org/help/files/gpdwwe.html Mercato online] [http://www.hiidenkivenpaivakoti.fi/help/new/fxjjfg.html Gambe fighe] [http://rootos.idonea.cl/help/files/maxerl.html Titty silvestro] [http://www.backtothebible.org/help/files/asxxoa.html Polito] [http://www.notreligion.com/help/files/hliwng.html Foto cazzi grossi gratis] [http://www.startonlineweb.com/help/new/qcfikd.html Emanuele inglese] [http://www.actionscript.ru/help/files/ckuprn.html Servizi piatti] [http://www.worthwhilehosting.com/banners/auto/dffkax.html Puntatori diddl] [http://www.priceisking.co.uk/skins/default/nxarev.html Tiscali itwww bastardo dentro com] [http://www.backtothebible.org/help/files/xbkalp.html Tette mania] [http://www.priceisking.co.uk/skins/default/faqqsl.html Mv agusta moto] [http://www.ccrs.uzh.ch/user/root/vslchp.html Deep inside tawny roberts] [http://www.hiidenkivenpaivakoti.fi/help/new/ssxsmu.html Albergo firenze hotel] [http://www.ccrs.uzh.ch/user/root/cdtoft.html Monica setta] [http://www.notreligion.com/help/files/smchmn.html Blow job asian black] [http://www.startonlineweb.com/help/new/wvurim.html Melita toniolo] [http://www.worthwhilehosting.com/banners/auto/uqbacf.html Offerta hotel sorrento] [http://www.backtothebible.org/help/files/rgghjn.html Prestito catania personale] [http://www.worthwhilehosting.com/banners/auto/ouhixo.html Cernobbio] [http://www.backtothebible.org/help/files/cprdek.html Cuba vacanza] [http://www.nvwp.org/help/files/eqpgss.html Dvd vergini economici] [http://www.hiidenkivenpaivakoti.fi/help/new/akhrio.html Assicurazione alleanza dell agenzia] [http://www.nvwp.org/help/files/bbsboj.html Sheila stone foto] [http://www.actionscript.ru/help/files/mvwmxf.html Racconti saffici] [http://www.startonlineweb.com/help/new/cqhalj.html Gioco scaricabile sexi] [http://www.nvwp.org/help/files/lkvfcl.html Age of mythology] [http://www.worthwhilehosting.com/banners/auto/lfljaf.html Recupero credito] [http://www.hiidenkivenpaivakoti.fi/help/new/tknxxp.html Sauna gay milano] [http://www.notreligion.com/help/files/rhmexu.html Gestione condominio free] [http://www.startonlineweb.com/help/new/ncboqp.html Agenzia casting per bambini] [http://www.actionscript.ru/help/files/vnpfvt.html Hotel city pisa] [http://www.backtothebible.org/help/files/nsihgv.html Consulto astrologia cartomanzia gratis] [http://www.priceisking.co.uk/skins/default/jdclpg.html Disney channel com] [http://cale.cc/xde/it/hatubv.html Marco anarchia virgilio it] [http://www.actionscript.ru/help/files/qjrnnu.html Aeroporto roma ciampino] [http://www.hiidenkivenpaivakoti.fi/help/new/jaliia.html Detect spyware] [http://cale.cc/xde/it/otdivq.html Contatti msn zoccole] [http://www.startonlineweb.com/help/new/slfjcv.html Paola senatore immagine convento] [http://www.startonlineweb.com/help/new/cngdna.html Grazia playhouse disney] [http://www.notreligion.com/help/files/kbkonq.html Anteprima video sesso] [http://www.actionscript.ru/help/files/dxvgbh.html Apuleio] [http://www.startonlineweb.com/help/new/mmwvhe.html Ristorante italiano giappone] [http://www.worthwhilehosting.com/banners/auto/lofwri.html Helen svedin] [http://cale.cc/xde/it/oqjxrb.html Coconuda basket] [http://www.actionscript.ru/help/files/khlwtk.html Copenaghen vacanza] [http://www.notreligion.com/help/files/onwsna.html Cocorico riccione] [http://www.nvwp.org/help/files/eppwpg.html Briana bank book] [http://cale.cc/xde/it/uogtjp.html Ricette bimby] [http://www.backtothebible.org/help/files/nmehwo.html Massaggiatore bergamo] [http://www.backtothebible.org/help/files/chingc.html Troie africane] [http://www.startonlineweb.com/help/new/vskvmp.html Storie porno] [http://www.nvwp.org/help/files/uwhwvn.html Scarpa calcetto nike] [http://www.hiidenkivenpaivakoti.fi/help/new/nvrpbg.html Schema basket] [http://www.priceisking.co.uk/skins/default/oobelr.html Imitazioni orologio] [http://www.worthwhilehosting.com/banners/auto/cvbxnx.html Aprire franchising] [http://rootos.idonea.cl/help/files/jevcfc.html Sexhard] [http://www.nvwp.org/help/files/wmvgcg.html Cazzo foto] [http://www.notreligion.com/help/files/nuvwhf.html Shannon elizabeth] [http://www.worthwhilehosting.com/banners/auto/iwtngr.html Donne amatoriali] [http://www.startonlineweb.com/help/new/jdlnue.html Scarica film hard] [http://www.worthwhilehosting.com/banners/auto/gncndn.html Granchio] [http://www.notreligion.com/help/files/tnmwrc.html Pernottare] [http://www.actionscript.ru/help/files/vpfolj.html Gemelli] [http://www.notreligion.com/help/files/hxvofh.html Very young pussy] [http://www.nvwp.org/help/files/bresou.html Tonsilla] [http://www.startonlineweb.com/help/new/klmcqi.html Scopate brasiliane] [http://www.worthwhilehosting.com/banners/auto/vsirmi.html Italia franchising] [http://www.backtothebible.org/help/files/uxliwa.html Pissing girls] [http://www.actionscript.ru/help/files/plbckn.html Incontro escort bari] [http://www.hiidenkivenpaivakoti.fi/help/new/blrbkj.html 18enni porno gratis] [http://www.hiidenkivenpaivakoti.fi/help/new/bgmhhp.html Melita calendario 2007] [http://www.worthwhilehosting.com/banners/auto/bgubvr.html Pornovideo] [http://www.ccrs.uzh.ch/user/root/phqcrh.html vecchie troie pompinare] [http://www.priceisking.co.uk/skins/default/hsdkof.html Loghi suoneria samsung] [http://www.priceisking.co.uk/skins/default/rbafdo.html Manga giapponesi porno] [http://www.backtothebible.org/help/files/gveatb.html Albergo 4 stella venezia] [http://www.ccrs.uzh.ch/user/root/caeqis.html tatuaggi angeli] [http://www.worthwhilehosting.com/banners/auto/fufovs.html Pressa piegatrice elettrica] [http://www.backtothebible.org/help/files/uxglhg.html Dizionario sogno symbolism] [http://www.backtothebible.org/help/files/owsmes.html Regnodelleanime gamesurf it] [http://www.priceisking.co.uk/skins/default/lfgdad.html Programmatori] [http://www.priceisking.co.uk/skins/default/jmdped.html Suicidegirls] [http://www.priceisking.co.uk/skins/default/nddoio.html Incesto fratello sorella] [http://www.hiidenkivenpaivakoti.fi/help/new/smoacx.html Big tit boob melon] [http://www.hiidenkivenpaivakoti.fi/help/new/ksgbow.html Free gyno exam] 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