HELP! Can't make programs to connect with NXT via bluetooth

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

Moderators: 99jonathan, roger, imaqine

HELP! Can't make programs to connect with NXT via bluetooth

Postby quack » Mon Dec 03, 2007 6:17 pm

Can anyone teach me step-by-step how to make a simple program that connects to the NXT via bluetooth and gets data from it?

I know that leJOS and iCommand comes with lots of examples, but I just can't get them to work....

Help would be very much appreciated since I can't find any nice tutorial in the internet that covers this (maybe very simple) matter..
quack
Novice
 
Posts: 26
Joined: Sun Jul 08, 2007 9:03 pm

Postby roger » Tue Dec 04, 2007 6:55 am

Take a look at BTSend and BTReceive in the Samples folder for some clues.

Roger
roger
Moderator
 
Posts: 357
Joined: Fri Jun 01, 2007 4:31 am
Location: Berkeley, CA

Postby quack » Wed Dec 05, 2007 5:30 pm

Take a look at BTSend and BTReceive in the Samples folder for some clues.


When I send the BTRespond to the NXT it shows this message:


Data abort
PC 00204EFE
AASR 0021E59B
ASR 00020502


And when I compile and run the BTSend in my pc it shows this error:


Exception in thread "main" java.lang.NoClassDefFoundError: javax/bluetooth/DiscoveryListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at lejos.pc.comm.NXTCommFactory.createNXTComm(NXTCommFactory.java:17)
at BTSend.main(BTSend.java:16)



what should I do? :S
quack
Novice
 
Posts: 26
Joined: Sun Jul 08, 2007 9:03 pm

Postby lawrie » Fri Dec 07, 2007 11:11 am

The first error is probably caused by the flash memory on you NXT being full. Delete some programs and run Defrag from the system menu. The next relesae should imrove the handling of flash memory full conditions.

You problem with BTSend is that you need to put %NXJ_HOME%/3rdparty/lib/bluecove.jar on the CLASSPATH.
lawrie
leJOS Team Member
 
Posts: 909
Joined: Mon Feb 05, 2007 1:27 pm


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 1 guest

more stuff