NI Labs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Bluetooth Low Energy Support Discussion

hi,

Its not difficult as its a normal read operation. ( I assume notification is not enabled)

Make sure you are using the correct handle for the characteritisic  in your labview code.

You can find the handle using your browser.

 

 

0 Kudos
Message 21 of 38
(6,644 Views)

hi,

Its not difficult as its a normal read operation. ( I assume notification is not enabled)

Make sure you are using the correct handle for the characteritisic  in your labview code.

You can find the handle using your browser.

 

0 Kudos
Message 22 of 38
(6,643 Views)

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

-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:08:00:3b/characteristics/2a00/value and received 

{"self":"http://localhost:5000/gatt/nodes/00:23:40:08:00:3b/characteristics/2a00","handle":"2a00","value":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?

Thanks
uday
0 Kudos
Message 23 of 38
(6,395 Views)
I was able to read the data as referenced in this post: https://forums.ni.com/t5/LabVIEW/Reading-Data-From-Wearable-BLE-Device/m-p/3624577/highlight/true#M1...
Thanks
uday
Message 24 of 38
(6,373 Views)

Hi everyone!

I'm trying to read the heart rate of a Polar H7. After doing some research, I think I have to enable notifications, but I don't know how to do this. I have to write something inside the Heart Rate Characteristic but i can't find the correct handler.

 

Anyone has experience with this Polar or something like?

0 Kudos
Message 25 of 38
(6,295 Views)

Hi everyone,
Could someone kindly help me?
I've had troubles in getting data from BLE devices.

The following steps were completed successfully,
1.Paired & connected to PC.
2.BLE server stared.(NI Bluetooth LE Driver.exe)
3.BLE bdaddress was found (Discover BLE.vi)
4.BLE initialize with no error (Initialize BLE.vi)
5.BLE streaming with no error (Handle:25)
6.Write 0100 to BLE (Write BLE channel.vi)
6.Read 0100 from BLE(Read BLE channel.vi)

I can't active "Notification" correctly after writing 0100 to Handle 25.
I'm wondering if my device does'nt include the notification parameter, because it showed without descriptors 2902 .
By the way, I downloaded commercial BLE program from market in windows 10 and it read data by setting Notification.

It also worked fine in android system.

Enviroment:
LabVIEW 2017 with in Windows 10
Firewall disable

Toolkit:
national_instruments_lib_ble_instrument_drivers-1.0.0.4.vip

 

SERVICES.pngCharacteristics_11.pngCharacteristics_d.pngCharacteristics_24.pngCharacteristics_2.pngValue_25.pngValue_5.pngValue_7.pngBLE Server.pngBLE.png

Android.png

0 Kudos
Message 26 of 38
(5,963 Views)

Hi, I am trying to connect a sensorTag CC2650STK with LabView 2017 using BLE. But i have problems to write a value to any characteristics.

 

I can connect my sensorTag with pc without problem. I launch BLE server and Labview finds and init the device but i have an error when i try to write 01 in characteristic Handle 0034. I must write 01 in characteristic 0034 to init humidity sensor and read the charasteristic 0031(Humidity sensor value).

 

My error is: Fail to write value: 01 to characteristic: 51 (2nd try).

 

If i try to run the sensorTag LED example or sensorTag motion example, i have the same error.

 

Does anyone have any idea that I may be doing wrong? Or what is not working?

I would be very grateful if someone could help me.

I attach some captures.

Hi, I am trying to connect a sensorTag CC2650STK with LabView 2017 using BLE. But i have problems to write a value to any characteristics.

 

I can connect my sensorTag with pc without problem. I launch BLE server and Labview finds and init the device but i have an error when i try to write 01 in characteristic Handle 0034. I must write 01 in characteristic 0034 to init humidity sensor and read the charasteristic 0031(Humidity sensor value).

 

My error is: Fail to write value: 01 to characteristic: 51 (2nd try).

 

If i try to run the sensorTag LED example or sensorTag motion example, i have the same error.

 

Does anyone have any idea that I may be doing wrong? Or what is not working?

I would be very grateful if someone could help me.

I attach some captures.

Download All
0 Kudos
Message 27 of 38
(5,879 Views)

I am having trouble reading from a bluetooth device that is just sending data:

 I have attached my VI.   I am running the server in the background, and i can get to the device value using the browser at localhost:5000, but cannot read from it with the VI's.   

Thoughts?

 

Possible reason(s):

Web service returned 1 400 Bad Request
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
Date: Tue, 01 May 2018 22:44:44 GMT

from http://localhost:5000/gatt/nodes/30:ae:a4:27:fa:96/characteristics/beb5483e-36e1-4688-b7f5-ea07361b26a8/value


Complete call chain:
Headers to Error Cluster.vi
Read BLE Channel string.vi
Read BLE Channel u8 array.vi
Untitled LabVIEW BLE simple check.PNG

0 Kudos
Message 28 of 38
(5,531 Views)

Hi,

 

I'm trying to connect to a custom BLE device. It is paired in Windows 10. I'm using LabVIEW 2016 and national_instruments_lib_ble_instrument_drivers-1.0.0.4.vip.

 

Discover BLE sees the device, but I get error 5126 when attempting to initialize with BLE Initialize: 

Error 5126 occurred at Headers to Error Cluster.vi

Possible reason(s):

Web service returned 1 404 Not Found
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
Date: Tue, 27 Nov 2018 13:37:55 GMT

from http://localhost:5000//gap/nodes/90:fd:9f:07:62:4e?connect=1

 

I tried using the commands in the browser detailed here. I can see the services, I can see the characteristics, but whenever I try to get the data using e.g. 

http://localhost:5000/gatt/nodes/90:fd:9f:07:62:4e/characteristics/18/value

the result is always null: 

{"self":"http://localhost:5000/gatt/nodes/90:fd:9f:07:62:4e/characteristics/18","handle":"18","value":null}

This is for all the characteristics of the service.

http://localhost:5000/gatt/nodes/90:fd:9f:07:62:4e/services/E/characteristics:

[{"self":"http://localhost:5000/gatt/nodes/90:fd:9f:07:62:4e/characteristics/F","handle":"F","uuid":"f7bf3564-fb6d-4e53-88a4-5e37e0326050","properties":2},{"self":"http://localhost:5000/gatt/nodes/90:fd:9f:07:62:4e/characteristics/11","handle":"11","uuid":"f7bf3564-fb6d-4e53-88a4-5e37e0326051","properties":2},{"self":"http://localhost:5000/gatt/nodes/90:fd:9f:07:62:4e/characteristics/13","handle":"13","uuid":"f7bf3564-fb6d-4e53-88a4-5e37e0326052","properties":32},{"self":"http://localhost:5000/gatt/nodes/90:fd:9f:07:62:4e/characteristics/16","handle":"16","uuid":"1dc2687f-9970-49cc-8fca-ca5414341334","properties":10},{"self":"http://localhost:5000/gatt/nodes/90:fd:9f:07:62:4e/characteristics/18","handle":"18","uuid":"207dfbe4-0aa6-4b5e-98a2-2220186c4cdb","properties":2},{"self":"http://localhost:5000/gatt/nodes/90:fd:9f:07:62:4e/characteristics/1A","handle":"1A","uuid":"a385f6e6-4a4e-48e7-9a6f-af6f87c793cf","properties":10},{"self":"http://localhost:5000/gatt/nodes/90:fd:9f:07:62:4e/characteristics/1C","handle":"1C","uuid":"133706f8-7fe5-4f38-9f2d-aa06ba38df19","properties":10},{"self":"http://localhost:5000/gatt/nodes/90:fd:9f:07:62:4e/characteristics/1E","handle":"1E","uuid":"20357dae-48d9-489d-85b1-9741305324c4","properties":10},{"self":"http://localhost:5000/gatt/nodes/90:fd:9f:07:62:4e/characteristics/20","handle":"20","uuid":"491d3f35-f8df-4321-a8ab-05565a152e0b","properties":2},{"self":"http://localhost:5000/gatt/nodes/90:fd:9f:07:62:4e/characteristics/22","handle":"22","uuid":"0fdab68b-115c-4142-ac71-6631365fc5fb","properties":10},{"self":"http://localhost:5000/gatt/nodes/90:fd:9f:07:62:4e/characteristics/24","handle":"24","uuid":"ee67c8e8-7fb5-4925-acde-c5aaacc67524","properties":10},{"self":"http://localhost:5000/gatt/nodes/90:fd:9f:07:62:4e/characteristics/26","handle":"26","uuid":"edbe0a35-e3d7-4be3-8336-a9f69d44c063","properties":2}]

I also tried using Read Channel.vi without initializing, result is null there as well (though there is no error).

How do I initialize? Do I need to initialize? How do I get the actual value from the characteristic?

Any help would be greatly appreciated.

 

Thanks,

Danielle

 

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 29 of 38
(5,029 Views)

Apparently the previous problem was with my bluetooth connection. In windows I could see that it was constantly connecting and disconnecting. I changed to a different computer and read and write work great. 

 

However, the streaming doesn't work, it gives a 56 timeout error. I do Streaming BLE start, then streaming BLE read (I tried between 1 -4 blocks), then streaming BLE stop.

 

Bluetooth LE Explorer of microsoft sees the data changing very well.

 

Using BLE scanner on Android It seems as though LabVIEW connects to the device, enables the indicator and then disconnects (which on my device it disables the indicator. I can see this by a 'status' state, which shows clearly that the state after Streaming BLE start is "state after connecting, enabling indicator and disconnecting" [post action]). Is this possible? If so, how can I prevent the disconnection? If not, does anyone have another idea why it times out?

 

Thanks!

Danielle

"Wisdom comes from experience. Experience is often a result of lack of wisdom.”
― Terry Pratchett
0 Kudos
Message 30 of 38
(5,015 Views)