<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>Freerunner, Jalimo, rxtx, GPS</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Dear list,<BR>
<BR>
I am trying to use librxtx to access the GPS device in my FreeRunner through the /dev/ttySAC1 serial port. I have done this:<BR>
<BR>
opkg install librxtx-java<BR>
opkg install librxtx-jni<BR>
<BR>
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?<BR>
<BR>
=================================<BR>
static void listPorts()<BR>
{<BR>
java.util.Enumeration portEnum = CommPortIdentifier.getPortIdentifiers();<BR>
while ( portEnum.hasMoreElements() )<BR>
{<BR>
CommPortIdentifier portIdentifier = (CommPortIdentifier) portEnum.nextElement();<BR>
System.out.println(portIdentifier.getName() + " - " + getPortTypeName(portIdentifier.getPortType()) );<BR>
} <BR>
}<BR>
<BR>
static String getPortTypeName ( int portType )<BR>
{<BR>
switch ( portType )<BR>
{<BR>
case CommPortIdentifier.PORT_I2C:<BR>
return "I2C";<BR>
case CommPortIdentifier.PORT_PARALLEL:<BR>
return "Parallel";<BR>
case CommPortIdentifier.PORT_RAW:<BR>
return "Raw";<BR>
case CommPortIdentifier.PORT_RS485:<BR>
return "RS485";<BR>
case CommPortIdentifier.PORT_SERIAL:<BR>
return "Serial";<BR>
default:<BR>
return "unknown type";<BR>
}<BR>
}<BR>
=================================<BR>
<BR>
Regards,<BR>
Juan Lucas</FONT>
</P>
</BODY>
</HTML>