There is something I don't understand about how the Bluetooth virtual com
port works.
I have a Bluetooth module that interfaces with my CPU via a standard uart RX
an TX.
I am using the BT stack w/integerated UART driver (SYSGEN_BTH_UART_ONLY)
I have the hardware interface working and I use COM4 as my assigned CPU to
BT module interface.
I can see the HCI commands/responses come out/in on COM4.
Next I would like now to establish a virtual COM port connection to my
desktop.
All the PB BT sample tests show specifing server or client, BT address and
com index as command line parameters.
When I use "4" as the com index it fails. I assume because the com port is
already open (from the btd initialization on powerup).
What am I missing?

Re: Bluetooth Virtual com port by Anthony

Anthony
Wed Feb 08 10:16:08 CST 2006

It is a "virtual" com port : if you send data on COM4 (supposing you can
open it twice), you'll send data to your chip, not to the bluetooth stack,
which won't work.
Follow the samples from Microsoft, you should then be able to open a virtual
COM port to a remote device and you'll then be able to send your data over
this serial port which will be COMx where x will be different from 4 (as it
is already used).
If you need an off the shelf solution, feel free to contact me privately as
we've developped a bluetooth manager for wince devices.

HTH

--
--
--
----------------------------------------------------------------
Anthony Pellerin
ADENEO (ADESET)
Windows Embedded Consultant
<apellerin AT adeneo DOT adetelgroup DOT com>
http://www.adeneo.adetelgroup.com
Tél : +33 (0)4.72.18.57.77
Fax : +33 (0)4.72.18.57.78
----------------------------------------------------------------
"A.User" <a_user@home.com> a écrit dans le message de news:
uqr20fMLGHA.3936@TK2MSFTNGP12.phx.gbl...
> There is something I don't understand about how the Bluetooth virtual com
> port works.
> I have a Bluetooth module that interfaces with my CPU via a standard uart
> RX an TX.
> I am using the BT stack w/integerated UART driver (SYSGEN_BTH_UART_ONLY)
> I have the hardware interface working and I use COM4 as my assigned CPU to
> BT module interface.
> I can see the HCI commands/responses come out/in on COM4.
> Next I would like now to establish a virtual COM port connection to my
> desktop.
> All the PB BT sample tests show specifing server or client, BT address and
> com index as command line parameters.
> When I use "4" as the com index it fails. I assume because the com port is
> already open (from the btd initialization on powerup).
> What am I missing?
>
>
>
>



Re: Bluetooth Virtual com port by Valter

Valter
Wed Feb 08 11:41:09 CST 2006

"A.User" <a_user@home.com> wrote in
news:uqr20fMLGHA.3936@TK2MSFTNGP12.phx.gbl:

> There is something I don't understand about how the Bluetooth
> virtual com port works.
> I have a Bluetooth module that interfaces with my CPU via a
> standard uart RX an TX.
> I am using the BT stack w/integerated UART driver
> (SYSGEN_BTH_UART_ONLY) I have the hardware interface working and I
> use COM4 as my assigned CPU to BT module interface.
> I can see the HCI commands/responses come out/in on COM4.
> Next I would like now to establish a virtual COM port connection
> to my desktop.
> All the PB BT sample tests show specifing server or client, BT
> address and com index as command line parameters.
> When I use "4" as the com index it fails. I assume because the com
> port is already open (from the btd initialization on powerup).
> What am I missing?

In the RegisterDevice call you've to use an index that is not already
used by a COM port (both real or virtual).

To activate the BT virtual com port you'll load BT.dll as serial
driver. It implements the COM_* calls and so the applications (and
device manager) use it like a regular com. Then BT.DLL "routes" the
virtual com send/receive calls to the real BT device (serial, USB or
other).

You may use Windows socket instead of COM ports. They're easy to use
(not more complex than the serial port) and they haven't this kind of
issues. Virtual COM ports are useful if you need to emulate a serial
device (ex: a hayes modem) over a BT connection.
--
Valter Minute
(the reply address of this message is invalid)
(l'indirizzo di reply di questo messaggio non è valido)