Am Mittwoch 07 Dezember 2005 21:26 schrieb Markus Heiden:
> Hi all,
Hi.
> > java.lang.UnsatisfiedLinkError
>
> the native libraries are missing. Set the java.library.path to the correct
> location or put the libraries to a location where the jre finds them.
The libs where ok, I just used the wronng CLASSPATH. :-)
But here is another problem.
[EMAIL PROTECTED]:~/eclipse/BaseStation> cat t.java
import java.io.*;
import josx.rcxcomm.*;
public class t
{
public static void main(String[] args)
{
try
{
RCXPort port = new RCXPort("usb");
}
catch (IOException ioe)
{
ioe.printStackTrace();
}
}
}
[EMAIL PROTECTED]:~/eclipse/BaseStation> javac t.java
[EMAIL PROTECTED]:~/eclipse/BaseStation> java t
/dev/legousbtower0: not a tty
java.io.IOException: Tower open failed
at josx.rcxcomm.RCXPort.<init>(RCXPort.java:26)
at t.main(t.java:11)
[EMAIL PROTECTED]:~/eclipse/BaseStation> echo $RCXTTY
/dev/legousbtower0
[EMAIL PROTECTED]:~/eclipse/BaseStation>
It makes no difference if I set the port explicitly or not.
The isatty() check happens in ./rcxcomm/src/rcx_comm.cpp:373
But this code should not be called for USB towers because it will
just get execute if usb_flag != 1
The variable is set and defined in ./rcxcomm/src/irtower.cpp:64
with Java_josx_rcxcomm_Tower_open(JNIEnv *env, jobject obj, jstring jport).
#define TOWER_NAME "/dev/lego0"
[...]
#if defined(LINUX) || defined(linux) || defined(__APPLE__)
if ((strcmp( tty , "usb" ) == 0) ) {
usb_flag = 1;
tty = TOWER_NAME;
}
#endif
This is not like descibed in the tutorial.
http://lejos.sourceforge.net/tutorial/getstarted/firstbrick/linux.html
6. Set the RCXTTY environment variable to your 'tower' device:
export RCXTTY=com1 or export RCXTTY=/dev/usb/legousbtower0.
Correction:
root# ln -s /dev/usb/legousbtower0/dev/lego0
user> export RCXTTY=usb
And then it works. :)
Bye,
Tom
--
Tom <[EMAIL PROTECTED]>
fingerprint = F055 43E5 1F3C 4F4F 9182 CD59 DBC6 111A 8516 8DBF
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Lejos-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lejos-discussion