views:

355

answers:

1

I have a system with the following setup: Bluetooth connected to GSM module using the PCM lines and GSM module connected to the AC97 codec using analog lines
I use:

  • Windows CE 6 R3
  • Microsoft's Bluetooth stack including all profiles
  • Motorola H500
  • The Audio Gateway service is up and running (checked through services list in cmd)
  • GSM Module is functional - I am able to set outgoing calls and to answer calls.
  • Bluetooth is functional - the A2DP profile plays music to Motorola headphones (can't remember the model right now)

I want to hold a conversation using a headset device. I have included all Bluetooth components in the catalog.

I pair with the device using an application I wrote. Once the connection is made I store the device address and the GUID of the headset profile in [HKEY_LOCAL_MACHINE\Software\Microsoft\Bluetooth\AudioGateway\Device\1] so the AG will be able to know that it has a device connected.

I also set [HKEY_LOCAL_MACHINE\Software\Microsoft\Bluetooth\AudioGateway\MapAudioToPcmMode] to 0 so the BTD.dll will know not to take ownership of SCO connections.

In my BT chip (Wi2Wi) it says that the PCM works with an SCO connection, but not thourgh the regular HCI stack. So I am now trying to see how to tell the BT chip to route audio for a certain SCO connection throuhg the PCM interface.

So my questions are as follows:

  1. I am leaning to believe I don't need the BTScoSnd and AudioGateway drivers, but am not sure. Can someone confirm this?
  2. How do I send the firmware of a BT controller specific commands under Windows CE?
+1  A: 

Finally solved...

Among other things I did wrong, I set the cellular module to work with the wrong PCM interface (it has 2 of those). So now I have a headset connection that works (noisy, but works).

In the end, I have the AG up and running and the BTScoSnd driver running as well. I pair with the headset and the BTScoSnd driver creates the SCO link with the device. I then give the cellular module the command to divert all audio to the correct PCM interface and then I have both audio in and audio out in the headset. All the link handling is done by the BT controller (BluetoothCore4 CSR based chip) that is configured by default to route SCO connections to the PCM interface without going through the HCI layer.

The AG is needed according to the Headset and Hands-free profile specifications.

I also needed to set the firmware to the correct configuration. To do this, I used Linux's BCCMD tool. Doing this through the HCI using the Windows CE driver took too long to implement.

Shaihi