[Rxtx] RXTXCommDriver.registerSpecifiedPorts

Trent Jarvi tjarvi at qbang.org
Sun Apr 22 11:40:48 MDT 2012


The best way is to post diff -uw reslts between the original and new files 
to the mail-list.  Keeping the changes to just want you are trying to do 
means there is a better chance people will be able to follow the changes 
and approve of them here.  One fix at a time facilitates others reading 
the changes.

If you post a few changes and people like them, we can give you write 
access to CVS.

On Sun, 22 Apr 2012, Francesco Agosti wrote:

> Hello, I am new around here, so, I am not sure how this process should
> work...
> 
> I am trying to have the RXTX working on BeagleBone, using the "internal"
> UARTS ttyO0..5 (with an usb virtual serial ttyUSB0 it worked smoothly,
> thanks to Otavio who ported the compiled part).
> 
> One of the things I bumped into is the registerSpecifiedPorts.
> I have slightly modified it as visible below (added the StringTokenizer to
> parse all the possible ext folders if more than one is specified).
> I might eventually come across some more trivial things like these ones,
> does it make sense that I "contribute" them?
> If yes, how? (Is there a doc describing the process?)
> 
> Thanks.
> Francesco
> 
> P.S. did anyone manage to have ttyOx working with RXTX on the BeagleBone?
> 
> ...
> try
>    {
>                       StringTokenizer extFolders = new
> StringTokenizer(System.getProperty("java.ext.dirs"),
>                                                                      
> System.getProperty("path.separator",":"));
>                      while (extFolders.hasMoreTokens())
>                      {  
>      String
> ext_dir=extFolders.nextToken()+System.getProperty("file.separator","/");
>                       if ((new
> File(ext_dir+"gnu.io.rxtx.properties")).exists())
>      {
>                        if (debug) System.out.println("Lading
> "+ext_dir+"gnu.io.rxtx.properties");
>                        FileInputStream rxtx_prop=new
> FileInputStream(ext_dir+"gnu.io.rxtx.properties");
>       Properties p=new Properties();
>       p.load(rxtx_prop);
>       System.setProperties(p);
>       for (Iterator it = p.keySet().iterator(); it.hasNext();) 
>                        {
>        String key = (String) it.next();
>        System.setProperty(key, p.getProperty(key));
>       }
>                       }
>                      } // end while
>                     }catch(Exception e){
> if (debug){
>    System.out.println("The file: gnu.io.rxtx.properties doesn't exists.");
>    System.out.println(e.toString());
>    }//end if
>                  }//end catch
> 
> ...
> 
>


More information about the Rxtx mailing list