Connection error

This is where you talk about the NXJ hardware related topics such as the brick, sensors, LEGO pieces, etc.

Moderators: 99jonathan, roger, imaqine

Connection error

Postby nfcs2007 » Mon May 24, 2010 12:35 pm

Hi guys

I got a little problem herer to connect my NXT robot to my 64bit window 7 desktop, when i try to connect to the desktop via Bluetooth it connected but then disconnect right after it connect.

Its there any solution for this ?

Robot API :Lejos Latest version
Programming Program : Netbean Java SE Cant test the code since it wont connect to my desktop

Many thanks
[/i]
nfcs2007
New User
 
Posts: 3
Joined: Mon May 24, 2010 12:31 pm

Postby xpansive » Mon May 24, 2010 5:08 pm

You might want to try using USB.

Also, which version of Java are you using? The 64-bit one gave me problems.

It would also be helpful if you could post whatever error message its giving you.
xpansive
New User
 
Posts: 7
Joined: Wed May 19, 2010 11:23 pm

Postby nfcs2007 » Thu May 27, 2010 2:09 pm

Screenshot when conencted
Image



And disconenct right after
Image
nfcs2007
New User
 
Posts: 3
Joined: Mon May 24, 2010 12:31 pm

Postby gloomyandy » Thu May 27, 2010 2:31 pm

What exactly are you trying to do? are you trying to connect from the NXT to the PC? Or are you trying to connect from the PC to the NXT?
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4174
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Postby nfcs2007 » Thu May 27, 2010 2:33 pm

its from NXT to PC .

I got window 7 with 64bit with all updated driver and whenever i try to conenct my NXT via Bluetooth it connect for a few second than disconnect =/
nfcs2007
New User
 
Posts: 3
Joined: Mon May 24, 2010 12:31 pm

Postby gloomyandy » Thu May 27, 2010 2:43 pm

So what are you trying to connect to? Have you written a Bluetooth server program?

It is much easier to connect from the PC to the NXT (that is what all of the leJOS tools do, and there is a good reason for this). Is there a reason why you are not doing it this way? There are lots of samples that will show you how to connect from the PC, and virtually none the other way around....

The reason for this is that the NXT has limited Bluetooth capability, it always connects to the first SPP endpoint on the target device. Under windows this is nearly always associated with a virtual com port. So in your case what you are seeing is the NXT connect to virtual com port 3, probably find there is no program attached to it and then closing the device.... Unless you understand Bluetooth pretty well and really have a strong reason to connect from the NXT to the PC, then it is probably not worth the hassle involved.... Doing things this way around means that you will not be able to use the leJOS PC side APIs...

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4174
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK


Return to NXJ Hardware

Who is online

Users browsing this forum: No registered users and 1 guest

more stuff