Routing audio from a GSM module to a Bluetooth Handsfree device

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 Bluetooth stack, including all profiles
  • Motorola H500
  • Audio Gateway service is up and running (checked in services list in cmd )
  • The GSM module works - I can set outgoing calls and answer calls.
  • Bluetooth works - A2DP profile plays music on Motorola headphones (I don’t remember the model now)

I want to have a conversation using the headset. I have included all the Bluetooth components in the directory.

I connect to the device using the application I wrote. Once the connection is established, I save the device address and GUID of the headset profile in [HKEY_LOCAL_MACHINE\Software\Microsoft\Bluetooth\AudioGateway\Device\1] so that the AG can know that the device is connected to it.

I also set [HKEY_LOCAL_MACHINE\Software\Microsoft\Bluetooth\AudioGateway\MapAudioToPcmMode] to 0 so that BTD.dll knows that it cannot become the owner of SCO connections.

My BT chip (Wi2Wi) says that PCM works with an SCO connection, but not through a regular HCI stack. So, I'm trying to figure out how to tell the BT chip about the audio routing for a specific SCO connection through the PCM interface.

So my questions are:

  1. I tend to believe that I don't need BTScoSnd and AudioGateway drivers, but I'm not sure. Can anyone confirm this?
  2. How to send firmware for a specific BT controller under Windows CE?
+4
source share
1 answer

Finally decided ...

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

In the end, I have AG running and the BTScoSnd driver working. I connect to the headset, and the BTScoSnd driver creates an SCO connection with the device. Then I instruct the cellular module to redirect all the audio to the correct PCM interface, and then I have the audio and audio output in the headset. All link processing is performed by the BT controller (a CSR-based chip based on BluetoothCore4), which is configured by default to route SCO connections to the PCM interface without going through the HCI level.

AG is required according to the headset and handsfree profile specifications .

I also needed to install the firmware in the correct configuration. For this, I used the Linux tool BCCMD . Doing this with HCI using the Windows CE driver took too much time.

+2
source

Source: https://habr.com/ru/post/1307274/


All Articles