LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to enter BLe PIN number with LabView

   My company has a BLe product that will be going to production soon, I have a LabView program that can pair and communicate with our board. A PIN number is required for pairing, currently Windows pops up a window then I have to manually enter the PIN. For production I would like to have LabView enter the PIN instead of having production workers having to do it manually. I have never done anything like this so wondering if it is even possible? If possible can someone point me in the right direction? Sample code?

 

Here is screen shot of window that pops up that i am needing to enter the PIN number into.

 

ksutt_1-1722518031473.png

 

 

 

0 Kudos
Message 1 of 4
(265 Views)

You can do programmatic pairing using the Windows Bluetooth API with a C# program:

https://learn.microsoft.com/en-us/windows/uwp/devices-sensors/pair-devices

https://github.com/PolarGoose/BluetoothDevicePairing/blob/master/src/Bluetooth/Devices/DevicePairer....

Create a library that does this for you or maybe use the program from the second link. I have not tested it, but it looks promising.

 

Note that in order to pair, you first need to do a scan and discover the device.

 

What library do you use for BLE communication?

0 Kudos
Message 2 of 4
(256 Views)

I am using BLELib.dll that I found here on NI Community.

I have the scan/discover working, just trying to automate entering the pin.

I am a hardware tech so not familiar with C# but have couple software engineers in the office that can probably help. They are on GITHUB daily so I will have them get the program you linked.

0 Kudos
Message 3 of 4
(240 Views)

You mean this one, right?

https://forums.ni.com/t5/Example-Code/LabVIEW-Bluetooth-Low-Energy-Driver-development-using-Universa...

https://github.com/prabubharathi85/LabVIEW-BLE-Driver

 

Definitely see if they can help. While you are at it, see if you can convince them to write a more complete wrapper for the Windows Bluetooth API. Then you can use callback VIs to receive data from your devices without polling and do not need to convert from strings so much. It should not be too much work for C# developers.

0 Kudos
Message 4 of 4
(212 Views)