Freerunner, Jalimo, rxtx, GPS
Juan Lucas Dominguez Rubio
jldominguez at prodevelop.es
Thu Mar 5 20:48:32 CET 2009
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openmoko.org/pipermail/community/attachments/20090305/0bea8caa/attachment.htm
More information about the community
mailing list