LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bluetooth Open Connection Error 54

Solved!
Go to solution

I try to open client connection to Bluetooth unit discovered with Bluetooth Discover. It does not work, complaining that the Address is incorrect. How can be correct address derived from one obtained with Bluetooth Discover?

 

I attch a simple test VI for manual tests: search Bluetooth devices, select one, attempt to connect. Unfortunately error 54 is launched at every attempt.

 

Could you kindly advice?

 

 

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
0 Kudos
Message 1 of 10
(8,375 Views)

So, no one answer. Should I provide more details?

 

I tried the LabVIEW example Simple Bluetooth.lvproj.

Simple Bluetooth - Server.vi starts but an attempt to start Simple Bluetooth - Client.vi after copying Address and Channel values result in an error at the client side:

 

Error 59 occurred at Bluetooth Open Connection in Simple Bluetooth - Client.vi

 

Of course, an external Bluetooth device must be accessed in the real application. I simplified previous test VI even more. This is the VI.

 

ILLUSTRATION.vi.png

 

Unfortunately, it launches an error:

 

Error 54 occurred at Bluetooth Open Connection in ILLUSTRATION.vi

 

I created executable for both tests and tried them with another computer. The same errors are launched.

 

What do I do wrong?

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
0 Kudos
Message 2 of 10
(8,321 Views)

Hi _Y_,

 

Thanks for getting in contact with us. I've taken a look at your code and I've identified the main reason why it is failing.

 

Your loops lack any timing functions, meaning that your code is running extremely quickly. This speed is causing LabVIEW to continually acquire and close a connection before it can register a signal.

 

I'd recommend taking a look through some of these white papers and other information which explain all of the functions in the Bluetooth Palette. Using this information you can re-develop your code to work correctly but if you have anymore issues then please do not hesitate to contact me.

 

Bluetooth VI's and Functions: http://zone.ni.com/reference/en-XX/help/371361N-01/lvcomm/bluetooth_vis/

Developing Bluetooth Applications with LabVIEW: http://www.ni.com/white-paper/3260/en/#toc1

Bluetooth: http://www.ni.com/white-paper/7104/en/#toc7

 

Thanks,

 

Chris

0 Kudos
Message 3 of 10
(8,305 Views)

Hi Cris,

 

Thank you for attending the problem.

 

There is some misunderstanding. Loops in these examples do not run on BlueTooth functions continuously. VI attached to the first message contains event handler with default timeout -1; i.e. each step is manually initiated. The second one is a simplified version. There is only one loop serving selection of the address from array of clusters. Of course both VI-s are only examples created in attempt to localize the problem.

 

With regards

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
0 Kudos
Message 4 of 10
(8,297 Views)

Hi _P_,

 

It may be that your Bluetooth device does not use the Windows Bluetooth Stack, which is causing an error to be generated. Try following this Knowledge Base article to configure your device drivers: http://digital.ni.com/public.nsf/allkb/8295C04C0A038E8686257500005CCA99

 

If this does not resolve the issue, check that the address is being received/sent in the correct format as this can generate an error 54.

 

Thanks,

 

Chris

0 Kudos
Message 5 of 10
(8,275 Views)

Hi Chris,

 

Thank you for the answer. I have read the article but found it quite confusing.

 

  1. First of all it does not say how can I know which driver is installed?
  2. Second, the solution is offered for USB Bluetooth devices but we are using Bluetooth built in notebook computers. Thus method including unplug and plug the device is not an option.
  3. Third, there is an advice to edit bth.inf file but it says "...find the entries that appear similarly to: USB Bluetooth Wireless Adapter= BthUsb, USB\Vid_1310&Pid_001". There are 63 similar entries in 22 sections. Too many to choose.

 

However, the first step seems most important at the moment. How can I find which driver is used in the computer? Neither Internet or out IT division could provide answer:((

 

By the way, LabVIEW function Bluetooth Discover works well with present driver. Isn't it an indication that the driver is ok?

 

Thank you

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
0 Kudos
Message 6 of 10
(8,268 Views)

Hi _P_,

 

A non-USB bluetooth device makes things a bit trickier! It may be worth visiting the tablet provider's website to check if there are any relevant drivers you might need. Some manufacturers may even create specific drivers for app developers so take a look for those. Typically you would be able to check what drivers the device is using under device manager but if you cannot plug the tablet into your PC this may not be possible.

 

In addition to the article I linked, I also suggest you take a look at these 2 related articles:

http://www.ni.com/white-paper/3260/en/

http://digital.ni.com/public.nsf/allkb/921795DD63E315B686256DD60082B252?OpenDocument

 

These explain everything in a bit more detail and link to some work-around's if bluetooth isn't possible.

 

Thanks,

 

Chris

 

0 Kudos
Message 7 of 10
(8,252 Views)
Solution
Accepted by topic author _Y_

Hi Chris,

 

We do not use any tablet. All computers are conventional Windows 7 notebooks with built in Bluetooth devices. Should I understand that most of such notebooks have LabVIEW compatible drivers?

 

By the way, I got an answer to my first question from another expert. This is a code example that discovers and connects to Bluetooth device.

ILLUSTRATION171014.png

Note: Bluetooth RFCOMM Service Discovery VI can return several services. In such a case, selection of particular service must be implemented.

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
0 Kudos
Message 8 of 10
(8,247 Views)

Hi _P_,

 

A Windows notebook should have no issues. Here are the associated drivers that LabVIEW requires for Bluetooth applications:

http://www.ni.com/download/ni-bluetooth-toolkit-15.0/5734/en/

 

Are you still having issues finding the IP addresses?

 

Thanks,

 

Chris

0 Kudos
Message 9 of 10
(8,236 Views)

Hi Chris,

 

I think this should close my last question.

 

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
0 Kudos
Message 10 of 10
(8,227 Views)