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: 

How to connect to a BLE device?

Hello all,

 

I'm trying to connect to a Bluetooth Low Energy device through Labview in order to read and write to/from it.

 

I'm using windows 8.1 (64-bit).  I've tried both the built-in bluetooth module (supports BT4.0) and a BT4.0 USB dongle.

 

On both of them, I can see my device in the windows bluetooth manager, but when I try to use the Bluetooth Discover VI, it only finds devices that are not BLE.

 

I've seen a lot of posts about BLE, but most seem to be towards a specific product or are old and outdated.

 

Has anyone been able to connect ot a BLE device through Labview (any OS)?

 

Thanks,

Joe

Message 1 of 16
(10,195 Views)

Hello;

 

LabVIEW Bluetooth VIs call into the Microsoft Bluetooth Driver. Apparently, Microsoft recently added support for Bluetooth Low-Energy Devices in Windows 8, as discussed here:

https://msdn.microsoft.com/en-us/library/windows/hardware/jj159880(v=vs.85).aspx (Bluetooth Low Energy Overview)

The LabVIEW VIs have not been modified for Windows 8 to make and calls to these special functions. However, you could use a Call Library Function Node to call into the Microsoft DLL that handles Bluetooth Low-Energy and access those functions directly.

Message 2 of 16
(10,154 Views)

Thanks for the reply!

 

I tried using the BluetoothAPIs.dll file (under system32), but I could not find the correct header file.  I think I found it in the WIndows 8.1 SDK, but it would import (the functions in the DLL weren't in the header)

 

It's weird...when I look for the BLE device in Windows 8.1, it finds it, but it won't show up in Labview.  Strange!

Message 3 of 16
(10,125 Views)

Is there a way to have Windows 8.1 make a BLE device act like a serial device?  Maybe, then, Labview will be able to, at least, talk to it.

 

One thing I have to make sure: I don't want to "pair" with it.  I want to see it, and read/write to/from it.  Right now, I'm using LightBlue on iOS.

Message 4 of 16
(10,118 Views)

Hi,

 

I am having the exact same issue. I have an external BLE device that I wish to receive real-time data from into LabView and o far I have been unsuccessful. I first tried this on Windows 7 but after reading several websites, it seems that Windows 7 does not provide support for non "HID" BLE devices. So I tried again on a Windows 8 machine as apparently there is support for BLE on Windows 8.1 I found this blog fairly useful:

 

http://channel9.msdn.com/coding4fun/blog/Powering-up-with-BLE-in-Windows-81

 

I have tried connecting to my external device using both the computer's internal BT radio and an external BLE 4.0 USB dongle (CSR 4.0 available from Adafruit). Using the dongle, I am able to connect to the device via windows UI (in both windows 7 and 8). However, it seems that LabView can only access and use the BT classic radio.   For example, before I pair with my device through Windows, am not even able to have LabVIEW recognize or even see the device using the discover.vi where as it can see any BT classic devices on the proximity of the PC. So, the challenge it seems, is getting LabView to recognize and use the BLE radio (ether the internal or external one). Any thoughts or advice on how to have Labview use the BLE radio over the BT classic would be helpful. 

 

Thanks,

 

Sam

Message 5 of 16
(9,965 Views)

Is there any chance that LabView could create an updated set of VIs that work for a Windows 8.1 PC and allow for GATT communication?

Message 6 of 16
(9,965 Views)
Joe I've had the same experience as you including with BluetoothApis.dll. Maybe it will work when windows 10 is out in a few days?

NI, this is a pretty big void with LabVIEW. How long until GATT vis are ready? This issue was literally the blocks in demonstrating to some serious comp sci people why they should try LabVIEW, FYI.
0 Kudos
Message 7 of 16
(9,890 Views)

I understand that many BLE devices are not discoverable thus far in LabVIEW.  At this point in time, we do not have the drivers to support most BLEs, but customers are always free to create their own functions and drivers.  Here is a link that contains the current Bluetooth VIs.  If you are able to write a function or driver that is compatible with these, it will help expedite the process of using BLEs with LabVIEW.

 

http://zone.ni.com/reference/en-XX/help/371361K-01/lvcomm/bluetooth_vis/

Kelli Kravetz
Product Marketing Manager
LabVIEW, LabVIEW NXG, LabWindows/CVI, Measurement Studio
National Instruments
0 Kudos
Message 8 of 16
(9,836 Views)

Hi there,

 

whats the status here? Will National Instruments develop some Vi´s so we can talk to BLE devices via the GATT protocoll?

 

It seems it is technically possible, since i have contacted some develeopment houses and asked the same question.

 

They all came up with a solution which was good but it was very expensive. At least for for me/us.

 

 

Should´nt we be able to talk with BLE devices from LabView in the year 2015?

 

 

I can talk with my BLE device using my phone and some freeware.

 

I can talk with my BLE device using a free C++ example from Microsoft and run it from Visual Studios.

 

 

Cheers

 

Erik

0 Kudos
Message 9 of 16
(9,677 Views)

I wouldn't hold my breath for this. It doesn't work under Windows 7 at all, under Windows 8 and 8.1 with lots of trouble and in Windows 10, I don't know but it seems there are issues too. There are certainly more imporrtant communication interfaces than this. And since you know Visual C well, it's really trivial to write your own small interface library for this and be done with it.

Rolf Kalbermatter
My Blog
0 Kudos
Message 10 of 16
(9,637 Views)