10-03-2017 06:52 AM
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?
Solved! Go to Solution.
10-05-2017 02:24 AM
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.
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?
10-05-2017 10:01 AM
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
10-05-2017 11:42 AM
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
10-10-2017 11:20 AM
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
10-11-2017 05:58 AM
Hi Chris,
Thank you for the answer. I have read the article but found it quite confusing.
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
10-13-2017 10:39 AM
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
10-14-2017 04:50 AM
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.
Note: Bluetooth RFCOMM Service Discovery VI can return several services. In such a case, selection of particular service must be implemented.
10-16-2017 11:09 AM
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
10-17-2017 02:35 AM
Hi Chris,
I think this should close my last question.