06-04-2013 04:39 PM
Hello,
What I am trying to do is to use LabVIEW on a PC with an attached Bluetooth dongle to talk to a proprietary Bluetooth device designed to communicate with cell-phones via Bluetooth. I need the program to send a few commands to the proprietary device, disconnect, and then connect and talk to a different device. The proprietary device I want to connect to is essentially just a server waiting for a cell-phone to come connect with it. Once connected, some garbage is exchanged between the phone and the device, and once authenticated, the device completes its designed function.
I have already tested my Bluetooth dongle by using the Simple Bluetooth Client.VI and the Simple Bluetooth Server.VI running on two separate PC's. They were able to connect and transfer the data correctly.
My question arises, however, when LabVIEW makes you specify a channel to connect via Bluetooth. Since the proprietary device is essentially a dumb device, it wants to follow the typical Bluetooth Stack protocol and begin frequency hopping once paired. It will not be able to dedicate itself to one single channel and hog that frequency with the computer.
So what I would like to find out is how LabVIEW deals with the protocol. Does the channel that you specify in the Bluetooth VI's actually affect the protocol or is it just the way it communicates with the Bluetooth dongle? I just need to know if LabVIEW already takes care of the Bluetooth protocol or if there is some way to get around a dedicated channel. I want the computer to look and act like a cell-phone from the devices point of view.
I have read through several of the NI tutorials, examples, and discussion forums but I have been unable to find any answers to my specific question. I could be missing something simple or easy here, but I want to make sure that this is even possible to accomplish before I begin developing the code.
What I am using:
LabView Full 2012
IOGear Bluetooth 2.1 USB Micro Adapter
I will admit that I am not the most technically savvy person when it comes to Bluetooth stacks and protocols, so please excuse any mistakes with technical information I might have had. I do, however, have co-workers that are extremely experienced in Bluetooth (just not in LabVIEW) so do not worry about the level of technical language you use.
Thank you very much for your considerations in my problem. Feel free to ask for any additional (within proprietary reason) or clarification.
Regards,
Bronson
Solved! Go to Solution.
06-05-2013 06:22 PM - last edited on 11-06-2024 12:54 PM by Content Cleaner
bronsonmock,
The LabVIEW Bluetooth VIs and functions use RFCOMM, which is a connection protocol the Winsock interface exposes. RFCOMM is simple transfer protocol that emulates serial communication. The RFCOMM interface defines Bluetooth servers and clients.
Creating Bluetooth server and client applications in LabVIEW is similar to creating server and client applications for TCP communication. A Bluetooth server uses the Service Discovery Protocol (SDP) to broadcast the availability of the services the server contains and listens for inbound connections. A client creates an outbound RFCOMM connection to a server. Once the client and server connect to each other, they exchange data until the client or server terminates the connection or until the connection is lost.
LabVIEW Bluetooth functions are really just a wrapper for the Windows bluetooth library functions. You may take a look and see how those protocols are handled for a lower level understanding. I've also included this document where I pulled the first two bits of information from.
Using LabVIEW with Wireless Devices:
https://www.ni.com/docs/en-US/bundle/labview/page/using-labview-with-wireless-devices.html