iCommand Error [RESOLVED]

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: 99jonathan, roger, imaqine

iCommand Error [RESOLVED]

Postby Gary » Mon Jul 23, 2007 1:55 pm

I compile the same code in PC and NoteBook , but I got different error message. I have test for one week , but I can't find the sloution , could anyone can help me . I'm in a hurry, thanks for your answer .

the following is my code

Code: Select all
import icommand.platform.nxt.*;
import icommand.nxtcomm.*;
import gnu.io.CommPort;
import gnu.io.CommPortIdentifier;


public class iCommand0715_1 {

   static void checkPort (String portName) throws Exception
   {
      try
      {
         CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName);
         if(portIdentifier.isCurrentlyOwned())
         {
            System.out.println("port is currently in use");
         }
         else
         {
            System.out.println("no use");
            Ultrasonic us = new Ultrasonic(Sensor.S1);
            System.out.println("Version: " + us.getVersion());
            NXTCommand.close();
            
                     
         }
      }
      catch(Exception e)
      {
         e.printStackTrace();
      }
      
   
   }
   public static void main(String[] args) {
      try
        {
            //(new TwoWaySerialComm()).connect("COM3");
         checkPort("COM8");
         
        }
        catch ( Exception e )
        {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }


the error message in pc is

Code: Select all
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
no use
Looking for 'icommand.properties' in working dir: D:\Eclipse\Workspace\iCommand-0715
Looking for 'icommand.properties' in home dir: C:\Documents and Settings\Gary
NXTCOMM = COM8
Error while connecting NXTCommand() constructor
gnu.io.PortInUseException: Unknown Application
   at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354)
   at icommand.nxtcomm.NXTComm.open(Unknown Source)
   at icommand.nxtcomm.NXTCommand.<clinit>(Unknown Source)
   at icommand.platform.nxt.Sensor.setTypeAndMode(Unknown Source)
   at icommand.platform.nxt.I2CSensor.<init>(Unknown Source)
   at icommand.platform.nxt.Ultrasonic.<init>(Unknown Source)
   at iCommand0715_1.checkPort(iCommand0715_1.java:31)
   at iCommand0715_1.main(iCommand0715_1.java:52)
java.lang.NullPointerException
   at icommand.nxtcomm.NXTComm.sendData(Unknown Source)
   at icommand.nxtcomm.NXTCommand.sendRequest(Unknown Source)
   at icommand.nxtcomm.NXTCommand.setInputMode(Unknown Source)
   at icommand.platform.nxt.Sensor.setTypeAndMode(Unknown Source)
   at icommand.platform.nxt.I2CSensor.<init>(Unknown Source)
   at icommand.platform.nxt.Ultrasonic.<init>(Unknown Source)
   at iCommand0715_1.checkPort(iCommand0715_1.java:31)
   at iCommand0715_1.main(iCommand0715_1.java:52)


the error message in NoteBook is

Code: Select all
Looking for 'icommand.properties' in working dir: C:\JavaTest
Looking for 'icommand.properties' in home dir: C:\Documents and Settings\Adminis
trator
NXTCOMM = COM6
Experimental:  JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7pre20
Java lib Version   = RXTX-2.1-7
WARNING:  RXTX Version mismatch
        Jar version = RXTX-2.1-7
        native lib Version = RXTX-2.1-7pre20
Error 0x0 at .\src\termios.c(1296): 操作順利完成。

Error encountered in NXTComm.sendData()
java.io.IOException: Input/output error in writeByte
        at gnu.io.RXTXPort.writeByte(Native Method)
        at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1093)
        at icommand.nxtcomm.NXTComm.sendData(Unknown Source)
        at icommand.nxtcomm.NXTCommand.sendRequest(Unknown Source)
        at icommand.nxtcomm.NXTCommand.setInputMode(Unknown Source)
        at icommand.platform.nxt.Sensor.setTypeAndMode(Unknown Source)
        at icommand.platform.nxt.I2CSensor.<init>(Unknown Source)
        at icommand.platform.nxt.Ultrasonic.<init>(Unknown Source)
        at DistanceTest.main(DistanceTest.java:13)
Error 0x0 at .\src\termios.c(1296): 操作順利完成。

Error encountered in NXTComm.sendData()
java.io.IOException: Input/output error in writeByte
        at gnu.io.RXTXPort.writeByte(Native Method)
        at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1093)
        at icommand.nxtcomm.NXTComm.sendData(Unknown Source)
        at icommand.nxtcomm.NXTCommand.LSGetStatus(Unknown Source)
        at icommand.platform.nxt.I2CSensor.<init>(Unknown Source)
        at icommand.platform.nxt.Ultrasonic.<init>(Unknown Source)
        at DistanceTest.main(DistanceTest.java:13)


my os of pc and notebook are both MS XP , why do i get the different errors , and how do i solve this problem , is my bluetooth wrong with nxt?
who can help me , i surf for many days in google , but i can't find the solution. thanks
Gary
New User
 
Posts: 4
Joined: Fri Jul 06, 2007 1:09 am

Postby bbagnall » Tue Jul 24, 2007 3:25 am

A new version of iCommand will be out in a number of days. That should solve all your problems. (The current version is not up to date.)
User avatar
bbagnall
Site Admin
 
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm

Postby Gary » Tue Jul 24, 2007 2:56 pm

thank you very much, bbagnall
but i have a question that is when will the new version be out ?
I am in a hurry , could you tell me , please ? I have a nxt project wrote by Java , and i have to finish it by 8/10 .
I think that my bluetooth doesn't fit with the nxt , do you have any idea , thank you very much
Gary
New User
 
Posts: 4
Joined: Fri Jul 06, 2007 1:09 am


Return to NXJ Software

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

more stuff