Bluetooth Connection Fails After First Time

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

Moderators: 99jonathan, roger, imaqine

Bluetooth Connection Fails After First Time

Postby MattAds » Fri Nov 22, 2013 3:41 pm

Hi, I'm working on a project using NXT and leJOS at the moment.

A weird inconvenience I've come across is that, after setting up a Bluetooth connection from my laptop to the brick and transferring data, if I run the same program again during the same session it will always fail to establish the BT connection despite being successful on the first program run. If I log out of my laptop or put it to sleep and then return the program will execute fine again the first time, but once again fail any subsequent run I do without resetting my session. This is as you can imagine highly inconvenient when I am wanting to test my programs very frequently.

I'm running Windows 7 Professional 64-bit, with 32-bit Java and Eclipse installed alongside leJOS, as instructed in many tutorials on the set-up process. I paired my brick with my laptop by setting the BT pin on the brick and then entering that pin in the standard Windows 7 Bluetooth add device wizard. Once I paired it like this and ran the necessary receiver code on the brick and initiator code on the computer (As instructed by the Communications tutorial in the documentation.) everything went off without a hitch. That is other than the fact that it only works once per session as described.

If I had to guess I would imagine this is something to do with the NXT requiring some kind of confirmation feedback from my PC every time it connects, but since Windows 7 recognises the connection as one it made moments ago it thinks it doesn't need to do this process again? That's my best educated guess, but I'm pretty new to the API so I don't have the foggiest how I would resolve this.

Anyway, any help you could provide in this matter would be appreciated.
Thanks in advance, Matt.
MattAds
New User
 
Posts: 1
Joined: Fri Nov 22, 2013 3:24 pm

Re: Bluetooth Connection Fails After First Time

Postby gloomyandy » Fri Nov 22, 2013 3:59 pm

What are you doing on the NXT? Are you terminating your program and re-running it each time?
What happens if you re-boot the NXT?
Do you see the same issues with the standard leJOS programs like nxjbrowse?
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3892
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 1 guest

more stuff