Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RegisterBluetoothComPort function question in bluetooth test

136 views
Skip to first unread message

vincent.tsai

unread,
Jun 25, 2010, 1:07:41 AM6/25/10
to
Hi:

we have a MIPSII BSP and board with UART 0,1,2,3
BSP uart driver define(nxc26uart.reg) and suport physical com port 1,2,3,4

i take reference from :
http://vinoth-vinothblog.blogspot.com/2008/10/enabling-bluetooth-serial-port-profile.html
and AP sample
c:\Wince600\PUBLIC\COMMON\SDK\SAMPLES\BLUETOOTH\COMTEST\comtest.cxx

then write an AP to simulate blooth manager.

at the call h=RegisterBluetoothComPort(L"COM",index,&pp));or
h=RegisterDevice(L"COM",index,L"btd.dll",(DWORD)&pp);

h return NULL ,index=1,2,3,4
h return handle, if index=0 or index>4

but uart driver support physical com1,2,3,4 and com4 connect to bluetooth
module.

so i confused how i can use com4 in the AP
h=RegisterDevice(L"COM",index,L"btd.dll",(DWORD)&pp); ?
why index in 1..4 return NULL?

hope to get your comment

Thanks
Regards.

vincent tsai


Luca Calligaris [eMVP]

unread,
Jun 25, 2010, 3:08:01 AM6/25/10
to
one thing is the (physical) UART which is connected to the BT controller
(COM4: in your case), another thing is the (virtual) serial port that you
create with RegisterBluetoothComPort + RegisterDevice to communicate with a
BT device which exposes the SPP: the virtual port musrt have an index which
is not already in use: since your HW has already COM1:...COM4: you have to
use an index which is >4 or 0


--
Luca Calligaris (MVP-Windows Embedded)
lucaDOTcalligarisATeurotechDOTcom
www.eurotech.com


"vincent.tsai" <vincen...@icnexus.com.tw> ha scritto nel messaggio
news:eNBkaPCF...@TK2MSFTNGP05.phx.gbl...

vincent.tsai

unread,
Jun 25, 2010, 5:19:29 AM6/25/10
to
Thanks Luca Calligaris input.
by the way, i cannot understand the map relation of COM4 and com"index"?
should i call a function to make the mapping of COM4 to this virtual
com"index"?
"Luca Calligaris [eMVP]" <luca.callig...@eurotech.com.nospam> 撰寫於郵件新聞:eDKyfVDF...@TK2MSFTNGP05.phx.gbl...

Misbah

unread,
Jun 28, 2010, 2:20:47 AM6/28/10
to
Hi ,

If you are using com 1-4 for physical port, you cannot use it for virtual
comm port.

Only free ports from 0-9 can be used for the same.

"vincent.tsai" wrote:

> Thanks Luca Calligaris input.
> by the way, i cannot understand the map relation of COM4 and com"index"?
> should i call a function to make the mapping of COM4 to this virtual
> com"index"?

> "Luca Calligaris [eMVP]" <luca.callig...@eurotech.com.nospam> ¼¶¼g©ó¶l¥ó·s»D:eDKyfVDF...@TK2MSFTNGP05.phx.gbl...

> .
>

vincent.tsai

unread,
Jun 28, 2010, 3:46:24 AM6/28/10
to
Thanks Misbah input.
i can understand this.
i meet another relation question so i describe into nother new quetion with
new subject
"physical UART interface with bluetooth driver stack question"

anyway thanks again.

"Misbah" <Mis...@discussions.microsoft.com> 撰寫於郵件新聞:CA536DF6-39D8-4EC2...@microsoft.com...


> Hi ,
>
> If you are using com 1-4 for physical port, you cannot use it for virtual
> comm port.
>
> Only free ports from 0-9 can be used for the same.
>
>
>
> "vincent.tsai" wrote:
>
>> Thanks Luca Calligaris input.
>> by the way, i cannot understand the map relation of COM4 and com"index"?
>> should i call a function to make the mapping of COM4 to this virtual
>> com"index"?
>> "Luca Calligaris [eMVP]" <luca.callig...@eurotech.com.nospam>

>> ???gco?l¥o·s?D:eDKyfVDF...@TK2MSFTNGP05.phx.gbl...

0 new messages