Skip to content

MuSAELab/BLE-Toolkit-LabVIEW

Repository files navigation

BLE (Bluetooth Low Energy) Toolkit for LabVIEW

Bluetooth Low Energy (BLE, Bluetooth LE, also known as Bluetooth Smart) is a wireless personal area network technology designed and marketed by the Bluetooth Special Interest Group aimed at novel applications in the healthcare, fitness, beacons, security, and home entertainment industries. Compared to Classic Bluetooth, BLE is intended to provide considerably reduced power consumption and cost while maintaining a similar communication range. Further details in the Bluetooth Low Energy Wikipedia entry.

While LabVIEW supports Classic Bluetooth (on Windows), it does not provide support for BLE. To solve this issue, a workaround is to use a BLE USB dongle to handle the communication. http://digital.ni.com/public.nsf/allkb/4BA51235CFC8519086257F5E005E81D5

The BLE Toolkit for LabVIEW is an implementation of the BGAPI protocol v1.10 (by Silicon Labs). BGAPI protocol is a based command and response protocol that allows the Bluetooth Smart stack (in Silicon Labs BLE devices) to be controlled form an external host and an application over USB/UART.

This Toolbox has been developed and tested with the BLE USB dongle BLED112

Installation

To install the BLE Toolkit for LabVIEW, the VIPM (VI Package Manager) by JKI is needed.

  1. Download and install VI Package Manager
  2. Download and install the latest VI package for the BLE Toolkit for LabVIEW from here

Usage

  1. Obtain a BLED112 USB dongle (e.g. in Digi-Key)
  2. Install the drivers provided by Silicon Labs
  3. Verify the COM number for the dongle in Windows Device Manager
  4. Open the ble_scan_devices.vi example located in: <Labview>\examples\BLE\Examples\ble_scan_devices.vi
  5. Select the COM port corresponding to the BLED112 USB dongle
  6. Run the VI

alt text ble_scan_devices.vi Front Panel

Examples

Three examples are provided with the BLE Toolkit for LabVIEW. These examples are located in: <LabVIEW>\examples\BLE\Examples\ble_scan_devices.vi

  1. ble_scan_devices.vi
    Discover and connect to BLE devices

  2. ble_read_write_characteristics.vi
    Read and Write a Characteristic value, providing the UUID for Service and Characteristic

  3. ble_read_hr_monitor.vi Acquire Heart Rate data stream, for devices with Heart Rate Profile

Creating VI Package file

Alternatively, the files in this repository can be used to build the VI Package for the BLE Toolkit for LabVIEW.