LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

Bluetooth connection: Error -142024 occurred at createNXT.vi

I've searched the forum for the error code -142024, but did not find anything useful. In case I've overlooked important related threads I'd appreciate any hints.

 

In a demonstration and test project for our control system software architecture I want to use a Lego Mindstorms NXT as a hardware device. Everything works so far, when the NXT is connected via USB, but I can not get the NXT connected via Bluetooth. Or to be more precise: I can not create a NXT object, after the Bluetooth connection has been established. The error message I get from the Fantom createNXT.vi is:

 

Error -142024 occurred at createNXT.vi:1 Possible reason(s): Fantom: Could not connect to NXT. Turn the NXT off and then back on before continuing.

 

IMHO this is not a reason, but it describes the symptoms im observing quite accurate ;-). Turning the NXT off and back on does not help. I can not look into the createNXT.vi in order to find out more about the error as the VI is password protected.

 

Does anybody know what the reason might be why the Fantom VI can not connect to the NXT or what the error code means in detail?

What else can I look at?

  

The VI I'm trying to run is attached. It runs without errors until the createNXT.vi.

 

I have Win7 (64bit), LabVIEW 2011 SP1 (32bit), NI LabVIEW 2011 LEGO MINDSTORMS NXT Module (that also installed the NXT driver) and a Broadcom BCM20702 Bluetooth USB Device.

0 Kudos
Message 1 of 5
(8,088 Views)

Searching the error code without the '-' sign reveals:

http://forums.ni.com/t5/LabVIEW-for-LEGO-MINDSTORMS-and/Error-142024/m-p/907401

 

Same problem, without answer.

0 Kudos
Message 2 of 5
(8,087 Views)

There is a part of the code that could be failing.

Create the NXT object should not be causing problems.  If the problem continues check bluetooh devices ( Unfortunately this problem occurs constantly )



Ing. Jonathan E. Cruz Ortiz

ENERGÍA PROACTIVA S.A.S

Cel : (+57) 3173669343 - (+57) 3124451894

Download All
0 Kudos
Message 3 of 5
(8,038 Views)

I did some further investigations.

 

  • According to http://mindstorms.lego.com/en-us/bluetooth/default.aspx the NXT can only communicate with Widcomm or Microsoft stack controllers (drivers).  I've checked this, driver provider is Microsoft, for the bluetooth enumerator. For the bluetooth radio it is Broadcom Corporation and Broadcom is the device manufacturer. Seems to be OK, or?
  • I've updated my brick's firmare to 1.31. using the LabVIEW NXT Terminal with USB connection.
  • I've also tried to connect using Bluetooth via the LabVIEW NXT Terminal without success.
  • I've updated my VI (attached) and did some further test.
    • Initiating the connecting to the PC from the NXT ends up with the PC showing the NXT and two serial ports (every take for connection increases this number).
      Starting the VI with "pair myself" set to false also gives error.
    • Letting LabVIEW do the pairing gives result as attached in png file. It claims to be paired but does not create the NXT object.
    • The resource strings I'm getting seem to be: BTH::<NXT Name>::<BT Address>::<COM Port>, looks OK as <COM Port> is identical to what windows 7 is telling me after I accepted the passkey on the NXT.
    • I've never seen the NXT display showing the <> on the upper left corner. There's always only the <.
    • During my tests I've also observed errors:
Error -142017 occurred at createNXT.vi:4

Possible reason(s):

Fantom: No more items found.

 

Error -142016 occurred at createNXTIterator.vi:7

Possible reason(s):

Fantom: Could not locate virtual serial port.

 

I feel lost not beeing able to connect a toy to my PC Smiley Sad.

 

 

Download All
0 Kudos
Message 4 of 5
(8,030 Views)

I have gotten into a state before where my computer wont connect to a specific NXT over bluetooth. (But I can connect my computer to other NXTs and I can connect my NXT to another computer). Are you able to connect to other NXTs?

 

You can try these steps which have worked for me sometimes.

 

1. Delete all the saved contacts from the NXT.

2. Also delete all nxt devices from the windows BluetoothDevices list.

3. Restart everything and retry from within labview.

 

If that doesn't work, also try uninstalling / reinstalling the bluetooth drivers under the BluetoothSettings::Hardware::Properties.

0 Kudos
Message 5 of 5
(7,957 Views)