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

Bluetooth A2DP in Windows CE 5.0 and NavReady patch?

98 views
Skip to first unread message

Steven Wu

unread,
Jul 18, 2008, 12:27:02 AM7/18/08
to
Hi,

Who does successfully run bluetooth A2DP in ce5.0 added NavReady patch?

I try this funcion in our platform, but happen audio intermittently problem.
I describe how I do it below.

1. Added A2DP profile from catalog item.
2. Added below registry in platform.reg, it can save many time of bt device
searching.
[HKEY_LOCAL_MACHINE\Software\Microsoft\Bluetooth\A2DP\Devices\1]
"Address"=hex: 2a,e5,fa,55,0c,00 ;Address of my bluetooth ear phone
"Service"=hex: 0a,11,00,00,00,00,00,10,80,00,00,80,5f,9b,34,fb
3. Use default A2DP setting:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Bluetooth\A2DP\Settings]
4. Use below message to open A2DP connection, at this time you will see the
window of authentic number request. Fill the number and it will connect
successfully.
waveOutMessage(HWAVEOUT(1),WODM_OPEN_CLOSE_A2DP,WODM_PARAM_OPENASYNC_A2DP,0);
5. Modify WavPlay sample code to indicate wav driver index and play wav file
by that.

If you have experiance on that, Trouble you give me a reply, thanks.

CEAssist

unread,
Jul 18, 2008, 4:24:03 PM7/18/08
to
Hi Steven,
Did you pair to the A2DP device first? You can use the Bluetooth Pairing
Service to do this. Then, you must call ActivateBTDevice, passing in
AudioSinkServiceClassID_UUID16 as the nProfileId parameter, to activate the
A2DP profile.
http://msdn.microsoft.com/en-us/library/cc510897.aspx
http://msdn.microsoft.com/en-us/library/cc510523.aspx

Steven Wu

unread,
Jul 21, 2008, 3:05:00 AM7/21/08
to
Hi, CEAssist:

Thanks for your reply.

I direct written the bt address and service into registry as below:


[HKEY_LOCAL_MACHINE\Software\Microsoft\Bluetooth\A2DP\Devices\1]
"Address"=hex: 2a,e5,fa,55,0c,00

"Service"=hex: 0b,11,00,00,00,00,00,10,80,00,00,80,5f,9b,34,fb
Can I skip the search procedure? The result of searching is record address
and service into registry, isn't it?

I try your method to do that, but I also meet another problem. I always
can't link ActivateBTDevice successfully. What library should be added to our
source file? I can't include btpairapi.h.
Could you help me to resolve this problem?

Thank you
Best regards
Mingde

Steven Wu

unread,
Jul 21, 2008, 3:22:01 AM7/21/08
to
Hi, CEAssist,

Thanks for your reply.

I written the bt address and service into registry, it can skip search
stage, isn't it?


[HKEY_LOCAL_MACHINE\Software\Microsoft\Bluetooth\A2DP\Devices\1]
"Address"=hex: 2a,e5,fa,55,0c,00

"Service"=hex: 0b,11,00,00,00,00,00,10,80,00,00,80,5f,9b,34,fb

I also try your method, but I encounter a compiler problem, I can't include
that function successfully.
It always link error or can't find the btpairapi.h file.

Could you help me to resolve this problem? Thank you.

Best Regards
Mingde

Steven Wu

unread,
Jul 21, 2008, 4:23:07 AM7/21/08
to
Hi, CEAssist,

Thanks for your reply.

I written the bt address and service into registry, it can skip search
stage, isn't it?

[HKEY_LOCAL_MACHINE\Software\Microsoft\Bluetooth\A2DP\Devices\1]
"Address"=hex: 2a,e5,fa,55,0c,00

"Service"=hex: 0b,11,00,00,00,00,00,10,80,00,00,80,5f,9b,34,fb

I also try your method, but I encounter a compiler problem, I can't include
that function successfully.
It always link error or can't find the btpairapi.h file.

Could you help me to resolve this problem? Thank you.

Best Regards
Mingde

Steven Wu

unread,
Jul 21, 2008, 6:22:01 AM7/21/08
to
Hi, CEAssist,

Sorry for repeat post, my internet is not stable.

I can compile successfully, but return ERROR_INVALID_PARAMETER message.

Following is my procedure:
1. Use Build-in BT manage application to pair and trust handset profile.
2. call ActivateBTDevice.

What do I wrong?

CEAssist

unread,
Jul 21, 2008, 2:34:01 PM7/21/08
to
ERROR_INVALID_PARAMETER means that either the BT addr is invalid, or the
parameter that receives the port ID is invalid. I'm guessing that the problem
is with the BT addr.

You can obtain the correct BT addr of the paired device during the pairing
procedure, from the DISCOVERDEVICEINFO structure. This structure sent to the
message queue after StartBTDiscovery is called, and includes information
about a discovered device, including the BT_ADDR.
http://msdn.microsoft.com/en-us/library/cc510735.aspx
http://msdn.microsoft.com/en-us/library/cc510863.aspx

Glad that you have compiled successfully! Hope that this helps resolve your
issue.


DISCOVERDEVICEINFO:

Steven Wu

unread,
Jul 22, 2008, 3:42:00 AM7/22/08
to
Hi, CEAssist,

Thanks for your patience to reply.

I think I confuse the pairing procedure. As you said "I can use bluetooth
pairing service to do pairing", you mean I must write an application to
handle discovering and pairing like as BtApp? It will be a big job for me.
Can't does pairing use "control panel->bluetooth device properties" to did
that? I understand this pairing program can't find audio sink profile. How
should I do?

thank you very much.

0 new messages