From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with LabView Bluetooth Communications

Hello Everyone,

 

I'm new to Bluetooth Communication in Labview, and I am having a few problems with establishing communication between to Window PC's with BlueTooth connectivity Labview.  I modelled my transfer after the Sample Client and Sample Sever VI examples found in LabView's Help page. Using those orignal examples, I was about to establish communication perfectly between my two pc's.  In my transfer VI models, I have added an excell spreadsheet reader to the Sever, and a writer to the Client.  Below posted are screenshots of my VI's, as well as the posted files.  I am using LabView 2016, which seems to have changed the excell read and write from LabView 2014.  Please check the file in block diagram before running.

 

 

Client VI

Client VI.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Server VI

Server VI.jpg

Set up:

(1) I run the Server VI first with a specified excell file to transmit.

(2) I enter the address and channel into the Client VI, and select the blank excell file to save to.

(3) I run the Client VI.

 

 

Problem:

Running the Server VI works fine. It sits at the "Wait on Listener" Block.  The problem begins with when I run the Client VI.  I get 

 

"Error 59 occurred at Bluetooth Open Connection in Bluetooth Client EEG.vi"

LabVIEW:  The network is down, unreachable, or has been reset.

 

Download All
0 Kudos
Message 1 of 4
(4,933 Views)

Hi Daniel,

 

I just want to get some clarity on things to make sure everyone is on the same page. You said you ran the LabVIEW example and it did work, is that correct? If so, have you tried adding your spread sheet to the example instead of rebulding the client VI?

 

Error 59 gets a little tricky to debug since it can be casued by a number of things between the server and the client. 

 

Thanks,

Ben H.
Systems Engineer
National Instruments
0 Kudos
Message 2 of 4
(4,866 Views)

Hello Benthere,

 

I did try a simple VI in which I used the "Bluetooth Discover" function to find local bluetooth devices.  This was a check to make sure that my copy of LabVIEW 2016 worked with my Targus bluetooth antenna and driver.  I've heard that there are some problems with USB bluetooth antennas.  

The VI worked fine, and I found all the local bluetooth devices I'm trying to connect to.

 

I did run the LabView example, and it did not work.  It returned a Error 59 on the Client side, and and Error in the "wait on Listener" on the Server side.

0 Kudos
Message 3 of 4
(4,860 Views)

Hello Daniel_Schossow,

 

As you were able to use the Bluetooth Discover and it found the device I think there is something wrong with the configuration or with your device behavior. Maybe, in the Server VI, you can try wiring the address found by the Bluetooth Discover to the address input of the Bluetooth Create Listener. 

If you follow the Server code you'd find the Bluetooth Read that is waiting for 4 bytes to read, I am not sure if that's part of the Bluetooth standard configuration but because you are changing the data that is being sent maybe that can cause you problems.

 

In the Client VI, are you getting just 4 bytes? Maybe you are losing some data there and the Server VI is still in the "sending thread". I've read a little bit about this problem and sometimes it has to do with the driver of the device, although this is probably not your issue you should keep it in mind. 

 

In NI Community you might be able to find more examples. This one, for example, https://decibel.ni.com/content/docs/DOC-31353.

0 Kudos
Message 4 of 4
(4,826 Views)