Bluetooth Connection Address

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

Moderators: 99jonathan, roger, imaqine

Postby Jochi » Mon Jan 28, 2008 9:31 am

The error you are getting means that you do not have bluecove.jar on the CLASSPATH. I think there was a problem with version 0.7 of iCommand that bluecove.jar was omitted from the distribution. You may need to copy it from iCommand 0.6 (or from leJOS).


Yes I had already realised that and thus had already copied it acrossed and specified it in my CLASSPATH.

I am having some troubles as well


Hi Patrick

Going by what you have output there, your icommand.properties file is not specifiying the BT address of your NXT. Figure out what it's address is and include it in your properties file. Mine for example is: -

Code: Select all
nxt.btaddress=00:16:53:00:0d:59


I still have no solutions to my problems however :evil:
User avatar
Jochi
Novice
 
Posts: 26
Joined: Tue Nov 06, 2007 8:17 pm
Location: Guildford, UK

Postby lawrie » Mon Jan 28, 2008 1:08 pm

Hi Patrick,

"BluetoothStack not detected" usually means that you do not a Bluetooth dongle connected, or it not working.

Hi Jochi,

If you have solved the bluecove.jar problem, what error message are you getting now?
lawrie
leJOS Team Member
 
Posts: 922
Joined: Mon Feb 05, 2007 1:27 pm

Postby Jochi » Mon Jan 28, 2008 1:14 pm

Hi Lawrie

Hi Jochi,

If you have solved the bluecove.jar problem, what error message are you getting now?


I had already solved that problem before my previous posting. So the errors I am getting are the same, i.e.

Code: Select all
C:\ProgramFiles\icommand-0.7\samples>javac NXJTest.java

C:\ProgramFiles\icommand-0.7\samples>java NXJTest
Properties location: C:\ProgramFiles\icommand-0.7\samples\icommand.properties
Exception in thread "main" java.lang.NoClassDefFoundError: javax/bluetooth/DiscoveryListener
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$000(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
        at icommand.nxt.comm.NXTCommFactory.createInstance(Unknown Source)
        at icommand.nxt.comm.NXTCommand.open(Unknown Source)
        at NXJTest.main(NXJTest.java:6)


Thanks,
Jochi
User avatar
Jochi
Novice
 
Posts: 26
Joined: Tue Nov 06, 2007 8:17 pm
Location: Guildford, UK

Postby Jochi » Mon Jan 28, 2008 1:18 pm

Just to clarify, my CLASSPATH at the moment which results in the above error is: -

Code: Select all
.;C:\ProgramFiles\icommand-0.7\dist\icommand.jar;C:\ProgramFiles\icommand-0.7\dist\bluecove.jar


Thanks,
Jochi
User avatar
Jochi
Novice
 
Posts: 26
Joined: Tue Nov 06, 2007 8:17 pm
Location: Guildford, UK

Postby PatrickLismore » Mon Jan 28, 2008 3:18 pm

Thanks for getting back to me, my bluetooth dongle has already connected to the NXT brick, i used my bluetooth software to pull up the details on the connection and i have added the address of the NXT Brick to the icommand.properties

as for the class path i followed the instructions to add it to my classpath here is my classpath,

Code: Select all
.;C:\icommand\icommand\dist\icommand.jar;C:\icommand\icommand\dist\bluecove.jar


Those paths to the jars are correct.

I read in one of the other posts where yous asked the other guy to type

java -jar icommand.jar

when i do this it tells me
unable to acccess jarfile icommand.jar

added that just incase its helpful.

im using Java 1.6


So my NXT connects to the BRICK with the software installed by the bluetooth dongle , then i was attempting to run one of the examples

I definitly believe that the icommand.properties file is correct

i am suspecting that its to do with bluecove.jar

thanks for the feedback
User avatar
PatrickLismore
Active User
 
Posts: 81
Joined: Tue Oct 16, 2007 7:28 pm
Location: Prague

Postby Jochi » Mon Jan 28, 2008 4:32 pm

I have just returned from a meeting with my tutuor. After some faffing we believe my problem lies within the bluecove.jar file. The snipet of the error below shows that it is unable to find the 'DiscoveryListener' class with the bluecove.jar file. Upon opening the bluecove.jar file, DiscoveryListener is indeed there so there must be an underlying problem somewhere. Unfortunatly due to time constraints I cannot mess around with this anymore. I am going to revert to icommand 0.5 and see if I can get that to work with RXTX instead. Hopefully that will work even if I don't hold any hope!

I'll let you know how I get on....

Code: Select all
Exception in thread "main" java.lang.NoClassDefFoundError: javax/bluetooth/DiscoveryListener


Jochi
User avatar
Jochi
Novice
 
Posts: 26
Joined: Tue Nov 06, 2007 8:17 pm
Location: Guildford, UK

Postby Jochi » Mon Jan 28, 2008 6:59 pm

Ok I have made some progress. Though I am not quite sure how. I deleted all my icommand files and started afresh. Firstly I set up icommand 0.5 with RXTX to see if that would work. I got to the stage where the sample codes would compile and execute, but then just hang without any explanation. Then just disconnect the bluetooth connection. Also trying to compile the code from the Maximum NXT book would not work as the packages could not be found. I assume this is because the Maximum NXT files are for use with icommand 0.6 which has new packages not included in icommand 0.5. icommand.nxt.comm.NXTCommand for example.

So I deleted all the icommand files again and started afresh with icommand 0.6. For some reason this time around it worked. Everything compiles and it finds the bluecove.jar files no problem (a huge relief on my part!). However I am still having problems. Bluecove finds the NXT but cannot open it. I am not sure about this error and can find very little on this forum about it. I am going to create a new thread about this error with more detail as it seems completely different to the problems found in this thread.

Thanks,
Jochi
User avatar
Jochi
Novice
 
Posts: 26
Joined: Tue Nov 06, 2007 8:17 pm
Location: Guildford, UK

Previous

Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 3 guests

more stuff