LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview + BlendMicro: Bluetooth

Dear all,

i'm trying to make Labview 2012 able to comunicate with a Blend Micro (4.0 BT device) trough a bluetooth dongle (4.0 BT) that i bought. Actually i'm stuck with the Bluetooth discovery.vi. What happens is that BlendMicro is not discovered by the VI.

Please notice that:

1) BT dongle on the notebook is working fine. I can see/pair/connect/send/receive files from my Android smartphone.

2) Blend Micro is working fine. Using its own app on Android i can see/connect/send/receive commands

3) Windows 8.1 BT manager discovers Blend Micro and can pair with it (no code required)! So far only Bluetooth discovery.vi is not able to discover Blend Micro.

 

I'm using Windows 8.1 and Labview 2012. I know that BT is not natively supported by Labview and it uses the Windows BT stack, but if Windows 8.1 BT manager discovers the device, why Labview doesn't?

 

Does Labview 2014 support BT natively?

 

Thank you for any suggestion you can provide me!

 

Frax

0 Kudos
Message 1 of 6
(4,144 Views)

Hi Frax,

LabVIEW supports Bluetooth, as explained here.

You can also follow this tutorial.

It can be expected behavior that Bluetooth Discovery doesn't immediately discover devices, because the Bluetooth stack needs more time in order to query device names. After that, it will cache the names.
The recommended solution is to increase the timeout of the Bluetooth Discover VI to give it time to populate the device stack.

Bye,

 

Licia

0 Kudos
Message 2 of 6
(4,090 Views)

Hi Licia,

thank you for your feedback. Unfortunately i already read both the links you provided me. I'm stuck at the beginning of the creation process with the bluetooth discovery.vi.

 

I tried to set different times as you suggested but i'm still not able to discover my BlendMicro. Please notice that the vi is working properly. Infact, if i turn on the bluetooth on my smartphone, the discover.vi is able to cache the phone's name and address.

 

Any other advice?

thank you

0 Kudos
Message 3 of 6
(4,079 Views)

Hi Frax,

if you know the address from the other application, can you use Bluetooth Open Connection directly?

Bye,

 

Licia

0 Kudos
Message 4 of 6
(4,076 Views)

Hi Licia,

Yes, i know the address of my device. I tried to directly connect to the device but actually i get Error 54. Please notice that i obtained the same error even using my smartphone, so probably i'm doing something wrong. This is the code that i used to test BT VIs with my smartphone:

BT_connect.png

Maybe i need to use RFCOMM to look for service before the connection?

0 Kudos
Message 5 of 6
(4,064 Views)

Dear Licia,

actually i have been able to make a connection with my smartphone thanks to your suggestions. I got rid of Error 54 using RFCOMM Discovery Service. I suppose the problem is tricky to detect because of the Open Connection.vi working method. In fact, due to the fact that you can wire channel or UUID to this vi, no one of these input is mandatory and VI can be run (giving the error as result). This is the code actually working to establish a connection with my phone, i'm posting it because it can be of any help for others:

 

BT_smartphone.png

 

Now i'm going to try some experiment with my BlendMicro, hoping that the workaround with the address can work in a similar way. I'll keep you updated

 

 

0 Kudos
Message 6 of 6
(4,040 Views)