LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

About Bluetooth communicaton on iPAQ h5550

Hi, dear all:
  I just made a test about the communication between PDA and Barcode scanner over Bluetooth. And it works out very well.
  I could get the datas from virtual com port on PDA. But there is one thing I don't understand and feel wried a bit.
  'Cause while I opened and got datas from Virtual COM Port 5(the index is 4 in Labview program), I couldn't get anything.
  But when I changed to open Virtual COM Port 8(the index is 7 in Labview program), I could get datas from it successfully.
  And when I went into the configuration of Bluetooth on PDA, it displays "Inbound COM Port: 5, Outbound COM Port: 8". I think my English
  is not a problem for understanding this word. Inbound COM is for the place where the datas write into PDA from my Barcode scanner(or 
  other Bluetooth devices) and "Outbound COM" is for the datas write out through it. Right?
  Hope there is someone who can answer me for this question. Thanks a lot.
 
Andy
0 Kudos
Message 1 of 8
(3,250 Views)
Hi Andy,
Bluetooth virtual COM ports are bidirectional, but their behaviour is not exactly the same as standard ports.
You should consider them in a client-server perspective: Inbound means that the PDA program opens the port and then waits that some client tries to connect to that port (the PDA acts as a server), while Outbound means that some other device (server) has an open port and you need to connect to this channel (the PDA is the client in this case). Of course, to communicate to an external device via the Outbound port, you need to connect to the device using the Bluetooth PDA menus and functions.
In the bar code example, the PDA is the client and the bar code is the server, so you need to use the Outbound port.
I hope that this explanation is not too confusing.

Paolo
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 2 of 8
(3,248 Views)
Hi, Paolo:
  Thanks for your helping and wonderful explaination. But unfortunately, I still don't understand you. Because I saw a technical document
  about Bluetooth communication before(If my memory is not bad, the document is from NI). The way of Bluetooth communication is just
  like "TCP" communication. They also have a server and a client in the same time. So that, the Bluetooth server is like a TCP server and
  the Bluetooth server is just like a TCP client as well. According to your explaination, my PDA should be a "Bluetooth server", not like the
 
0 Kudos
Message 3 of 8
(3,235 Views)
Hi, Paolo:
  Thanks for your helping and wonderful explaination. But unfortunately, I still don't understand you. Because I saw a technical document
  about Bluetooth communication before(If my memory is not bad, the document is from NI). The way of Bluetooth communication is just
  like "TCP" communication. They also have a server and a client in the same time. So that, the Bluetooth server is like a TCP server and
  the Bluetooth server is just like a TCP client as well. According to your explaination, my PDA should be a "Bluetooth server", not like the
 
0 Kudos
Message 4 of 8
(3,235 Views)
Hi, Paolo:
  Thanks for your helping and wonderful explaination. But unfortunately, I still don't understand you. Because I saw a technical document
  about Bluetooth communication before(If my memory is not bad, the document is from NI). The way of Bluetooth communication is just
  like "TCP" communication. They also have a server and a client in the same time. So that, the Bluetooth server is like a TCP server and
  the Bluetooth server is just like a TCP client as well. According to your explaination, my PDA should be a "Bluetooth server", not like the
  client
0 Kudos
Message 5 of 8
(3,235 Views)
Hi, Paolo:
  Thanks for your helping and wonderful explaination. But unfortunately, I still don't understand you. Because I saw a technical document
  about Bluetooth communication before(If my memory is not bad, the document is from NI). The way of Bluetooth communication is just
  like "TCP" communication. They also have a server and a client in the same time. So that, the Bluetooth server is like a TCP server and
  the Bluetooth server is just like a TCP client as well. So that for my example and according to your explaination, my PDA should be a 
  "Bluetooth server", not like the client as you said. And the Bluetooth barcode scanner is a "Bluetooth client". So, "Outbound COM Port"
  provides a open port and let Barcode Scanner can connect to, right? If it's like my said, I figure out totally.
  Thanks a lot. And if you have any web-sites or technical documents talk about "Bluetooth communication", please share to us.
 
  Sincerely,
                  Andy
 
0 Kudos
Message 6 of 8
(3,234 Views)
Andy,
I believe you are referring to this link:     http://zone.ni.com/devzone/conceptd.nsf/webmain/5EB9312A6470F16A86256E7500726F15
The main subject of this document is about using the LV specific Bluetooth functions (Open Connection, Write, Read, etc.). These functions are indeed similar to TCP functions, but they act at a lower level. When using virtual serial ports, you don't use specific Bluetooth functions, you simply open a COM via the usual VISA function (on a PC) or Serial Communication functions (on a PDA). In this case, you are exploiting a service provided by the OS that is at a higher level than a pure BT connection.

What is relevant in your case is in the last paragraph of this document, Bluetooth Virtual Serial Port, where you can read:
"You can open the serial channel as an outbound (client) port or as an inbound (server) port. When you open the port as an outbound (client) port, the driver prompts you to select a Bluetooth device (server) to connect to. When you open the port as an inbound (server) port, the driver waits to receive a connection request from the client. Bluetooth serial port is based on RFCOMM, which is different from a physical serial port. RFCOMM requires roles of a server and a client when establishing Bluetooth serial connection"

Paolo
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 7 of 8
(3,231 Views)
Paolo,
  Thanks for your helping. Now, I fully understand that.
  Thanks a lot.
 
Andy
0 Kudos
Message 8 of 8
(3,218 Views)