RE: How can I handle Bluetooth handsfree button?





"Vladimir Kostanda" wrote:

I need to handle the headset button in my application.
What I have found was that I may write a dll with required exported
functions and set the reg value
HKEY_LOCAL_MACHINE\Software\Microsoft\Bluetooth\AudioGateway\BTAGExtModule
to its full path.
Looks rather simple but it seems that my dll is ignored and isn't even
loaded after soft reset.

I have exported BthAGATSetCallback and BthAGATHandler as described in a
sample from Platform Builder. I tried to specify exact names for exported
functions in the def file to exclude C++ decoration problems. I have also
tried different settings from
HKEY_LOCAL_MACHINE\Software\Microsoft\Bluetooth\AudioGateway

but all in vain. My dll isn't used or even loaded.

I'm testing on ASUS P750 running WM 6.1
The default BTAGExtModule was \windows\bthusb.dll

Thanks in advance for any help


Some additional info:



This technique works fine on another device HTC 6700, a WM 5.0 CDMA device.

So it seems like not all manufactures implement their Bluetooth Audio
Gateway service correctly and ignore the setting for the extension module.



ASUS has ignored :)



I suppose the only way to support custom headset AT commands handling in
this case is developing own Bluetooth Audio Gateway module and specify it
instead of the default BTAGSVC.Dll in the services reg key.

If services.exe won't ignore this setting it will be possible to handle
commands or pass them to the default handler.

But developing custom BTAGSVC.Dll should be a non trivial thing…



I'd like to hear opinions of anybody experienced in this domain.
.


Loading