I was checking out Lejos again because I have an RCX project to  
program and discovered the iCommand project.  This is awesome.  It's  
exactly what I've been look for, for controlling the NXT.   
Unfortunately I had a lot of difficulty getting it going.

I'm using a first generation G5 iMac, 10.4.8 and was getting the  
following error when I try the Melody and the DirectNXT Applications.

NXTCOMM = /dev/tty.NXT-DevB-1
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
Error while connecting NXTCommand() constructor
gnu.io.PortInUseException: Unknown Application
        at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354)
        at icommand.nxtcomm.NXTComm.open(NXTComm.java:52)
        at icommand.nxtcomm.NXTCommand.<clinit>(NXTCommand.java:16)
        at icommand.platform.nxt.FileSystem.upload(FileSystem.java:28)
        at Melody.main(Melody.java:17)

As I've discovered the PortInUseException rarely has anything to do  
the port being in use.

At first I thought this was a problem with how I setup my Bluetooth  
serial port.  But eventual I tested the serial port with a terminal  
program and it worked.

That led me to believe it was a problem with my RXTX setup. After  
much fiddling around, debugging, and googling I discovered the problem.

For reasons I don't understand RXTX is not using /var/spool/uucp for  
lock files.  It's using /var/lock.  A directory that didn't exist on  
my system.  Once I created this directory I started getting different  
errors for the RXTX code.  This directory requires read/write  
permissions for the user.  I just used the blanket chmod 777.

The connection started working.

I've managed to get both Melody and DirectNXT to work.

The problem with the lock files is if something goes wrong in your  
application the lock file doesn't get cleared and you have to  
manually delete it before it will work again.

I've discovered you can rebuild RXTX to not use lock files, but  
figuring out how to build it is a project for another day.

Thanks for getting this project going.  As I said it's exactly the  
kind of thing I've been looking for for controlling the NXT.  I'll  
let you know how thing go as I play with iCommand more.

Derek




-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Lejos-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lejos-discussion

Reply via email to