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.
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
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
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
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?
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:
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.