[Windows Mobile Development and Hacking General] radhoo:
A2DPTOGGLE 1.1

This software will install as a today or home plugin and offer the user the possibility of instantly switching the audio between Device Speaker, A2DP Stereo Headsets and Speakerphone.

What’s new in 1.1?

-	1.1 can be used with Smartphones as well

-	Battery power consumption reduced

-	Improved interface

-	additional parameters for A2DP.exe

-	speakerphone support

Installation

Visit http://www.teksoftco.com section Freeware and download A2DPToggle CAB file. To learn how to install a CAB file on your device, see http://www.teksoftco.com/forum/viewtopic.php?p=3714#3714

Configuration

After A2DPToggle is installed, you will need to pair your A2DP Wireless Stereo Device (Headset, Loudspeaker) to your Windows Mobile device.

The A2DP Device must support the service called "wireless stereo" or "audio/video". Make sure you select one of these services when pairing.

The Interface

This software comes with a sophisticated “alphablended” interface that will integrate perfectly in your today screen.

For the Pocket PC version, there are two layouts that can be used, a big fingerfriendly one, and a small layout, to save today space.

With the A2DP device paired, you can use the Play and the Stop buttons in the plugin interface. Only one of these two buttons will be visible at a time, stop, if A2DP is enabled and start if A2DP is disabled. This change comes to save some interface space.

Next to the Start/Stop button there is a Speakerphone button that you can use to enable/disable the speakerphone while in a phone call.

The third button opens the Settings Panel. signal indicator that will show your bluetooth link status.

There are two indicators as well, one for the status of the A2DP device: OK (when the pairing is correctly completed and the headset is connected to the device), Err (when the headset is not yet paired) and Off (when the headset is out of the device's Bluetooth coverage radius, or when the headset is turned off/disconnected). To be able to use "Start/Stop", this status indicator must show OK.

The second indicator shows the Bluetooth status.

The Settings Panel:

"Handle Bluetooth automatically" would turn bluetooth on when you press start (play), and off when you press stop.

"Execute file after start" would run the specified application when you press "Start/Play", by default this is set to Media Player.

"Fingerfriendly GUI" allows you to switch between the two layouts presented above.

Tested on Imate Ultimate 8150/wm6.0, HTC Universal WM5.0, eten m600+/wm5.0.

Smartphone support

From this version, A2DP Toggle can be installed on Smartphones as well (no touchscreen).

To toggle the A2DP mode on and off use the Icon in Programs. Tap on it to enable A2DP then tap again to disable it.

A2DP.exe Parameters

You can execute this module directly. The supported parameters are:

A2dp.exe –bluetooth: on|off [-a2dp: on|off] [-spk] [-switch]

Parameters:

Bluetooth enables/disables the Bluetooth radio

A2dp enables/disables voice routing to headset

Spk enables/disables speakerphone

Switch enables/disables A2DP

Using A2dp.exe without parameters is the same as using the –switch parameter.

Details regarding internal functionality

The devices that support A2DP (most wm6.0 bluetooth devices), come with 2 audio drivers installed:

1) The "Audio Output" Driver (supported since ppc 2002)

2) The "Bluetooth Advanced Audio Output" Driver, that is responsible of sending audio data over a L2CAP Bluetooth connection, as per A2DP protocol

When the user connects a Stereo A2DP headset, and selects the "Wireless Stereo" profile, the Bluetooth Adv. Audio Output becomes the nr. 1 audio output route, and is indexed as the First audio driver. Any application will output sound by using that driver.

The problem is that sometimes we are already listening to audio in the device's speakers, and then suddenly we want to switch the output to our a2dp headsets - this is sometimes problematic, as the First audio driver changes from "Audio Output" to "Bluetooth Adv. Audio Output" and the applications currently playing audio need to be restarted.

For such issues, we've provided a tool, as freeware, that will install as a today plugin and offer the user the possibility of instantly switching the audio between Device Speaker and A2DP Stereo Headset.

It is designed for WM5.0/WM6.0 and above, Microsoft Bluetooth stack, please download it and let us know how it works for you.

____________________________________________________________________________

For simplicity, I will not include the CAB file in this message. Find all you need in the [direct] links below:

Download: http://www.teksoftco.com/index.php?section=freeware

Support: http://teksoftco.com/forum/viewtopic.php?t=1626

Manual: http://www.teksoftco.com/products/freeware/manual/a2dptoggle/1.1/a2dptoggle1.1.pdf