LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bluetooth pairing

Solved!
Go to solution

Problem:

I want to connect with Labview to a bluetooth device on which I have to give / readback some commands through an serial port.

 

Probably the (virtual) serial port I can do with VISA, but how about the pairing of the device?

To connect I have to enter an password, it works in windows but how can I implement everything in Labview?

 

Already found some "sollution'' with and .NET dll but can't figure out how it works.

 

I can connect with the device through windows and then open an serial port with an terminal program..........but now in Labview.

 

 

 

0 Kudos
Message 1 of 24
(6,676 Views)

Are you trying to pair to the target programmatically?

 

Pairing is one of those "set-up" things, akin to plugging in the cable with a wired device.  Usually taken care of at a lower level than the application you're using it in. 

 

Once the devices are paired and connected to each other, the bluetooth stack/drivers will create that virtual COM port which can be addressed the same way as a wired one using VISA calls within LabVIEW.

0 Kudos
Message 2 of 24
(6,662 Views)

My goal is to pair automaticly.....but if that is possible with Labview???

 

I want to test devices in combination with Teststand, so an operator will follow the sequence and don't have to do anything else.

 

0 Kudos
Message 3 of 24
(6,642 Views)

Hello thls,

 

Are you by any chance talking about this (https://decibel.ni.com/content/docs/DOC-9799) example?

 

In this case you're still using LabVIEW to pair the devices, but you are just calling an external library.

 

If the library already exists, then there's no need to reinvent it.

 

 

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
Message 4 of 24
(6,628 Views)

@ThiCop wrote:

Hello thls,

 

Are you by any chance talking about this (https://decibel.ni.com/content/docs/DOC-9799) example?

 

In this case you're still using LabVIEW to pair the devices, but you are just calling an external library.

 

If the library already exists, then there's no need to reinvent it.

 

 


I successfully managed to edit the linked VI above to pair my own Bluetooth devices.

 

However, I did find the process to be somewhat unreliable where sometimes all of my devices weren't discovered (I played around with the discovery time but didn't seem to make a huge difference).

 

Strokes

0 Kudos
Message 5 of 24
(6,619 Views)

Hello Strokes,

 

Where it always the same devices that weren't discovered?

If yes, does the Bluetooth Descovery of Windows itself show the same/similar/slower behavior for the same devices?

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 6 of 24
(6,612 Views)

@ThiCop wrote:

Hello Strokes,

 

Where it always the same devices that weren't discovered?

If yes, does the Bluetooth Descovery of Windows itself show the same/similar/slower behavior for the same devices?


From what I remember the Bluetooth discovery in Windows was more reliable and not as slow which probably doesn't make sense as assumingly LabVIEW uses the same call to query available Bluetooth devices.

 

To be honest it was quiet a long time since I was working on it so I don't remember the full details.

 

It didn't really affect my development as I decided to take a different route (not pairing in LabVIEW) 

0 Kudos
Message 7 of 24
(6,608 Views)

Ok,

 

Thanks for the feedback!

 

I'll just wait for thls to reply to the forum post.. 🙂

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
Message 8 of 24
(6,605 Views)

 

Thicop : Yes I am talking about the link.

When this library can work fine of course, I don't want to reinvent the wheel!

 

The problem is that I editted the VI but without an stable sollution (I will post the VI tommorow.)

I then will also try to describe the behaviour of the editted VI.

 

 



0 Kudos
Message 9 of 24
(6,597 Views)

ok, thanks!

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 10 of 24
(6,593 Views)