More on Extending the Windows CE Bluetooth Hands Free Profile


In a previous blog article I discussed the basics of extending the Windows CE Bluetooth Hands Free Profile.  This included how to plug into the Audio Gateway (AG) in order to send and receive AT commands from a Hands Free (HF) device.  In this article I will discuss exactly what commands you might want to add support for and how you can shoot yourself in the foot using the AT command extension interface.


What you cannot do in your AT Command Extension


Some people have asked me questions like:
- Can I override the headset button press to do <X> instead of answering the call?
- Can I make a “double tap” of the headset button do <Y>?


These are interesting ideas but the answer is no.  The AG does not receive a generic “button press event”.  The HF device will usually have some context and could send a variety of commands based on a button press.  For example, outside a call it might send AT+BVRA to do voice dialing.  In a call it will send AT+CHUP to end the call.  For an incoming call it will likely send ATA and in 3-way call scenarios it might send various other commands.  You get the idea.  It is probably not possible to accomplish this with the Hands Free Profile.


Bluetooth also defines a Headset Profile which is more basic than Hands Free.  In this case, it might be possible to accomplish this.  However, this profile is fading away and will likely be deprecated moving forward in favor of Hands Free.  If you must there is an AG registry value called “NoHandsFree” to force the AG to use Headset Profile which is documented here.


Why do I want this capability?


So why would anyone ever need to write an AT command extension module?  I can think of a few reasons:


1)  To support voice dialing (AT+BVRA) which we do not support by default.
2)  To support downloading of the phone book which is supported by many car kits and defined in one of the GSM specs.
3)  To support extended commands like signal strength, battery notifications and operator name which are supported by many car kits.


None of these things are supported as of today on Windows CE or Windows Mobile.


Don’t shoot yourself in the foot!


Some AT commands can have dependencies on other commands.  You can imagine how adding support for one command and letting the AG handle a dependent command could result in problems.  Also, there are some commands the AG handles that you don’t want to override.  For example, if your extension handled the AT+BRSF command, which reports the HF’s capabilities, the AG would never know what the capabilities are and could cause bad side effects.


The Hands Free AT command extension is a powerful interface.  So be careful not to cause bad side effects when using it.


[Author: Greg Scott]

Comments (2)
  1. Gautam Kumar says:

    Hi Greg ,

    I would like to know how can i make my pocket pc to work as a bluetooth device whereas any mobile will act as a AG.

    I did following to implement this for HF profile.

    Made an application runing on pocketpc , which searches for any BT mobiles and the i do paring

    with that mobile.

    then i create a service level connection where i am passing the uuid of HF profile to establish a service level connection .

    Now i want to recv and send AT commnds as per HF profile but i am not able to recv  any commands from AG , the mobile that i am using is Nokia one .

    I used the same thing for HSP and i am recv succesfully commds from AG and i am sendin the commnds to AG back as well .

    Please help me out .

Comments are closed.

Skip to main content