Freerunner, Jalimo, rxtx, GPS

Jim Ancona jim at anconafamily.com
Thu Mar 5 21:27:00 CET 2009


You don't say which distro you are trying this on, but my guess is
that you are fighting with gpsd or frameworkd for access to the GPS
serial port. You probably should be talking to gpsd/ogpsd or via dbus
to the framework, rather than directly to the serial port.

Jim
On Thu, Mar 5, 2009 at 2:48 PM, Juan Lucas Dominguez Rubio
<jldominguez at prodevelop.es> wrote:
> Dear list,
>
> I am trying to use librxtx to access the GPS device in my FreeRunner through
> the /dev/ttySAC1 serial port. I have done this:
>
> opkg install librxtx-java
> opkg install librxtx-jni
>
> In the classpath of my little java app I have added RXTXcomm.jar and tried
> to execute this code without success. No ports are discovered (with the GPS
> on and off), and if I try to access a port called /dev/ttySAC1, it says it
> does not exist. What am I doing wrong?
>
> =================================
>           static void listPorts()
>             {
>                 java.util.Enumeration portEnum =
> CommPortIdentifier.getPortIdentifiers();
>                 while ( portEnum.hasMoreElements() )
>                 {
>                     CommPortIdentifier portIdentifier = (CommPortIdentifier)
> 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";
>                 }
>             }
> =================================
>
> Regards,
> Juan Lucas
>
> _______________________________________________
> Openmoko community mailing list
> community at lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community
>
>


More information about the community mailing list