We are having a problem getting ROBOTC to recognize our NXT via a Bluetooth connection. The USB connection works fine. When we attempt to download a program, ROBOTC goes through the 15- and 30-second search periods, but at the end we get an error that reads:

Failed to open Communication link to NXT brick. Check if brick is powered on and link (USB or BT) is setup.

Error Code: Fantom Err: 'Virtual BT Serial Port Not Found'

The computer will recognize that the NXT is available via Bluetooth, but ROBOTC will not. I have tried manipulating the link setup, but I'm a bit of a ROBOTC novice. If anyone could help out it would be much appreciated.

Thu Oct 16, 2008 8:31 pm

tfriez

Site Admin

Joined: Wed Jan 24, 2007 10:42 amPosts: 620

Re: BT link error v1.46

BT has been extensively tested, so this is odd.

Just a few points of reference, have you downloaded the ROBOTC firmware yet and confirmed your brick works over USB?

Try plugging your USB BT adapter into a different USB port, as that may help. Also, try going into the control panel and deleting all of the previous NXT connections in the history.

You can also try resetting the BT on the NXT by going to Bluetooth - Reset on the NXT brick itself.

We have 4 different NXT's. The BT links to these 4 devices seem to work OK on XP/SP3.

On Vista, the NXT works reliably with one out of three VISTA laptops.

On Vista, with the recommended Microsoft stack and supplied dongle in the kit, two of the laptops can never connect. Usually we can pair the devices but then get a failure saying something like "NXT cannot be opened". Discovering devices is a total mystery - sometimes see it - sometimes not.

It appears that the pairing works, and the BT link and virtual com port are established, but then the RobotC to NXT communication doesn't seem to work and link is then torn down. We see the plug and play recognition of the remote device, then the installation of the virtual COM port, and then the error message followed by the disappearance of the devices.

We note that all working systems have automatically allocated a virtual com port of 6 and below (usually port 4 or below on XP) but our Vista Laptops often allocate ports from COM7 - COM16 and no working setup has been observed with a com port above 6. The only VISTA laptop that works is automatically selecting COM6

Based on our observations, I have a very hard buying that the RobotC-NXT link has been extensively tested on VISTA. Have you ever had it working through COM16? Does your test environment have multiple NXT's, multiple BT PC's, multiple discoverable phones, and other miscellaneous discoverable BT devices in range?

VISTA is not exactly irrelevant. Most Laptops have shipped with Vista for two years now and many if not most can't be upgraded to XP due to driver or warrantee issues.

And yes we have reset everything although its not clear that everything actually gets fully reset. Sometimes, the NXT displays a different name than it reports during Bluetooth discovery. It seems that if you want to reset everything possible you have to:

Reset the BT on the NXT. (would be nice to know exactly what this does)Powerdown the NXT. Disable "Include BT in Brick Search" (see notes below) on link setup screen. Remove pairing from each device if any.Powerup the NXT and connect via USBSelect BT Factory Reset (would be nice to know exactly what this does)Power down NXTPower up NXTDownload FW to NXT Close RobotCPowerdown/Powerup PCPower down NXT

Then you can try it again. Whether all of these steps is necessary is unknown. Whether a pinch of salt over the shoulder or facing east is also required has not been confirmed.

Of course, there are probably a dozen registry entries still left around from previous operations.

And yes, we have disabled WiLAN and this seems to have no effect on the problem. (A built-in WiLAN with a non-built in BT dongle will often have interference problems, especially as compared to a built-in WiLAN plus BT 1.2 solution.)

We have wasted much mentoring time on this and have now given up on using our team's VISTA laptops with RobotC. Since we have several vista laptops and NXT's we would be happy to test further if the existence of the problems were to be acknowledged.

BTW, on the link setup it seems to me to be very bad form to immediately enter Bluetooth discovery without explicit user action. It might be proper to attempt to connect to previously paired devices, but to enter Discovery (with its 30 second delay) should be something done only as the result of an explicit request (e.g. a Find NXT Devices button). We have at least a few hours wasted here (100's of attempts times 30 seconds).

I can. Our robot (Tabuu) is able to be teleoperated on COM 7, and it's inbound is on COM 6. We are running VISTA with the Abe BT antenna using the generic drivers on a Gateway P-7811FX Ultimate Gaming Edition.

_________________Sorry, your program could not be downloaded. Please reboot your computer.FTC Team #2959 Team Smash Bros CLICK HERE.(or click www)

Quote:

What the world needs is more geniuses with humility, there are so few of us left.

Agreed

Tue Oct 21, 2008 2:49 pm

Dick Swan

Creator

Joined: Fri Feb 09, 2007 9:21 amPosts: 616

Re: BT link error v1.46

I have been using VISTA and ROBOTC for about a year now. I have multiple NXTs and three different Bluetooth dongles. I am not aware of any Bluetooth problems that are unique to ROBOTC. There are Bluetooth problems, but AFAIK, they are common to all the NXT programming environments.

On the PC side, ROBOTC uses the fantom.dll for communications with the NXT. This DLL was developed by LEGO/NI and is used by the NXT-G and LabVIEW environments. On the NXT firmware side, ROBOTC's implementation is an enhanced version of the code originally developed by NI; it has been tested extensively.

It sounds like you've encountered one of the problems where the timeout used in the Windows application is too short. This is within the NI developed Fantom.dll file and the timeout is too short. When you first pair a Bluetooth connection Windows installs a device driver for it and the time to install the device driver is longer than the timeout in Fantom. This causes all sorts of grief to the software -- Windows thinks the device is installed properly and Fantom does not. The workaround for this is to use the Windows Control Panel to manually pair a connection.

On the comment about wasted time waiting for Bluetooth searching with the ROBOTC Link Selection window.

There is a check box labelled "Ignore Bluetooth in Brick Search" which does exactly the function you're requesting. The setting in this check box is preserved across ROBOTC sessions. I think this existing feature does exactly what you've requested.

In the more recent versions of ROBOTC there is also a selection of whether Bluetooth search should take 5, 15 or 30 seconds.

You will also notice that the more recent versions of have a button for "Connect via Bluetooth". This can be used if for example you have connected a NXT via USB -- allowing ROBOTC to interrogate its address without a BT connection -- and then want to make a BT connection. No search is required.

All three of the above features were designed to mnimize the pain that you have described. I think you'll also find that this is more advanced capabilities than found in any of the other IDEs.

It is envisioned that you only need to use the "Brick Link Selection" window when the PC is connecting, via BT, to a different NXT than it was lask connected to. And when more than one BT accessible NXT is available. Otherwise ROBOTC's default connection strategy is intended to be used.

The end user can customize how ROBOTC connects to a NXT brick. E.g.

Same brick as last connection or a different brick

USB only, BT only, either USB or BT and in which ord]

You set this up from the "Prefererences" window. It's on the "Platform" tab. Again you'll find this is the most flexible solution of any IDE for the NXT.

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum