Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Using a Bluetooth Virtual Serial Port (PDA Module)

LabVIEW 8.5 PDA Module Help
August 2007

NI Part Number:
370642E-01

»View Product Info

You can use a Bluetooth virtual serial port, which provides a Serial Port Profile with a virtual serial driver, with the PDA Module. A Serial Port Profile defines protocols and procedures to emulate an RS232/serial cable connection by mapping virtual serial COM ports to actual Bluetooth channels. If you use a Bluetooth virtual serial port, use the Serial Compatibility VIs instead of the Bluetooth VIs and functions to open a connection to and exchange data with other Bluetooth devices.

The virtual serial driver recognizes only one active serial channel at a time. This active serial channel can be an inbound port (server) or outbound port (client). The Bluetooth virtual serial port is based on RFCOMM (Radio Frequency COMMunications), which is different from a physical serial port. RFCOMM requires a server and a client when establishing a Bluetooth serial connection.

You can open the serial channel as an outbound port (client) or as an inbound port (server). When you open the port as an outbound port, the virtual serial driver prompts you to select a Bluetooth device (server) to connect to. When you open the port as an inbound port (server), the driver waits to receive a connection request from the client.

Opening a Connection to a Bluetooth Virtual Serial Port

Most Pocket PC and Windows Mobile Bluetooth drivers provide the mapping between Bluetooth serial ports and virtual serial ports. For example, the WIDCOMM Bluetooth driver assigns COM port 5 as the default inbound serial port and COM port 8 as the default outbound serial port. You configure the COM ports using the driver's Bluetooth manager.

Because of this automatic mapping, you can use the Serial Port Init VI to open the connection to the virtual serial port. Use the index of the virtual serial port, which is the COM port number minus one, for the port number input. For example, if you want to open the inbound COM port 5, use 4 as the value for the port number input. You can use the same port to read, write, or close the port.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit