05-05-2017 07:10 AM
Hoping someone could help here with reading data from wearable device which uses BLE.
-Device-Hexiwear: https://learn.mikroe.com/hexiwear/
-Operating System: Windows 10
-Installed LabVIEW Bluetooth Low Energy (BLE) Instrument Drivers for Windows (https://forums.ni.com/t5/NI-Labs-Toolkits/LabVIEW-Bluetooth-Low-Energy-BLE-Instrument-Drivers-for-Wi... )
-Pairing is done and NI BLE Server is up and running.
-Discover BLE.vi shows the device and it's address.
-Used Initialize BLE.vi with Base URL as http://localhost:5000 and my device address Node ID(No error)
Now the problem is to read data:
-Tried Read BLE Channel.vi with for e.g., 2a00 which should give the device name but returns nothing.
-Tried getting the url which and typed in browser: http://localhost:5000/gatt/nodes/00:23:40
{"self":"http://localhost:5000/gatt/nodes/00:23:40:08:00:3b/characteristics/2a00","handle":"2a00","v alue":null}
-Tried with Windows App:Newbit BLE Tool and it shows all the services running and data.
-Android App like BLE Scanner and nRF Connect also works.
-What have i done wrong?
-Is there a way to discover/enumerate all the services running along Characteristics with UUID?
Cross Posted: http://forums.ni.com/t5/NI-Labs-Discussions/LabVIEW-Bluetooth-Low-Energy-Support-Discussion/m-p/3623...
Solved! Go to Solution.
05-09-2017 04:11 AM
Finally was able to get the data by the following method:
-Disable Firewall and/or Antivirus.
-Enable the NI BLE Server
Getting Device Address:
-Query or enter the follwing in Browser: http://localhost:5000/gatt/nodes/?connect=1 and get the device address(which will be used further).
-Internally all queries are through HTTP Get.vi hence whatever urls working in browser will work.
Getting all Services:
-Then query http://localhost:5000/gatt/nodes/00:23:40:08:00:3b/services/ to get all the services running in that device(address: 00:23:40:08:00:3b)
-After above query, we should be able to see all the uuid and services along with their handles.
Getting all Characteristics under particular service:
-The above url followed by the handle/characteristics will return the characteristics running under that service.
-For E.g. the Service handle is A then the query should be : http://localhost:5000/gatt/nodes/00:23:40:08:00:3b/services/A/characteristics/
-Note down the Characteristics handle for which need to read the data and corresponding UUID.
Reading the Data from the Characteristic:
-From the Bluetooth spec or from the manual get the uuid which need to be read.
-Corresponding handle should be given to Read Channel Read BLE Channel.vi along with the type of data it returns.
-Which should be something like(Where B is the handle ) http://localhost:5000/gatt/nodes/00:23:40:08:00:3b/characteristics/B/value/
05-19-2017 05:28 AM
Hi! I'm trying to get Heart Rate data from a polar H7 with Labview.
I've done what you were saying, i get the device service list, and inside the Heart Rate service (UUID: 180D) there is the Heart Rate Measurement characteristic (UUID: 2A37).
but im stuck here. I don't know how to read the data. If i call the HRMeasurement handler / VALUE i get NULL.
can you or anybody help me??
Thanks!!!
05-19-2017 05:43 AM
-Did you disable Firewall?
-When you type the url in browser does it show services and handles?(provide Screenshot)
-Provide the screenshot of characteristics under that service handle.
-You will have different handles for services and characteristics. You need to use characteristics handle to get the value not the service handle.
05-19-2017 06:11 AM
Here are the screenshots. I get the characteristic of Heart Rate Measurement, but the value I read is NULL.
thanks for the quick answer!!
05-19-2017 06:36 AM
Under service handle 11 there are two characteristics 12 and 15.
-As i mentioned earlier you need to use characterisctics handle 12(Corresponding to UUID 2A37) not 11(this is service handle).
05-19-2017 06:54 AM
Sorry, bad screenshot. This is the good one. I'm already doing it with the correct characteristic handler.
I've seen in the HRMeasurement service (https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.service.heart_ra...) that the measurement characteristic has a descriptor as client characteristic configuration (UUID: 2902) that i have to write to start sending the HR, but in the browser it doesn't show, so i don't know the handler to write.
any ideas?
thank you!!
05-19-2017 07:08 AM
Other Characteristics are giving values or they are also returning null?
05-19-2017 07:14 AM
characteristic 15 (Body Sensor Location) is returning 1 that is chest position, so this is okey 😞