将音频从 GSM 模块路由到蓝牙免提设备
- Windows CE 6 R3
- Microsoft 的蓝牙堆栈,包括所有配置文件
- Motorola H500
- 音频网关服务已启动并正在运行(通过
cmd
中的服务列表
检查) - GSM 模块功能正常 -我能够设置拨出电话和接听电话。
- 蓝牙功能正常 - A2DP 配置文件可以向摩托罗拉耳机播放音乐(现在不记得型号)
我想使用耳机设备进行对话。我已将所有蓝牙组件包含在目录中。
我使用我编写的应用程序与设备配对。建立连接后,我将设备地址和耳机配置文件的 GUID 存储在 [HKEY_LOCAL_MACHINE\Software\Microsoft\Bluetooth\AudioGateway\Device\1]
中,因此 AG
将能够知道它已连接设备。
我还将 [HKEY_LOCAL_MACHINE\Software\Microsoft\Bluetooth\AudioGateway\MapAudioToPcmMode]
设置为 0
,以便 BTD.dll
知道不获取所有权SCO 连接。
在我的 BT 芯片 (Wi2Wi) 中,它表示 PCM 可与 SCO 连接配合使用,但不能通过常规 HCI 堆栈配合使用。所以我现在试图了解如何告诉 BT 芯片通过 PCM 接口为某个 SCO 连接路由音频。
所以我的问题如下:
- 我倾向于相信我不需要 BTScoSnd 和 AudioGateway 驱动程序,但我不确定。有人可以证实这一点吗?
- 如何在 Windows CE 下向 BT 控制器的固件发送特定命令?
I have a system with the following setup:
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
incmd
) - 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:
- I am leaning to believe I don't need the BTScoSnd and AudioGateway drivers, but am not sure. Can someone confirm this?
- How do I send the firmware of a BT controller specific commands under Windows CE?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
终于解决了...
除了其他我做错的事情之外,我将蜂窝模块设置为使用错误的 PCM 接口(其中有 2 个)。现在我有了一个可以工作的耳机连接(有噪音,但可以工作)。
最后,我让 AG 启动并运行,并且 BTScoSnd 驱动程序也运行。我与耳机配对,BTScoSnd 驱动程序创建与设备的 SCO 链接。然后,我向蜂窝模块发出命令,将所有音频转移到正确 PCM 接口,然后耳机中的音频输入和音频输出均已完成。所有链路处理均由 BT 控制器(基于 BluetoothCore4 CSR 的芯片)完成,该控制器默认配置为将 SCO 连接路由到 PCM 接口,而无需通过 HCI 层。
根据耳机和免提配置文件规范需要 AG。
我还需要将固件设置为正确的配置。为此,我使用了 Linux 的
BCCMD
工具。使用 Windows CE 驱动程序通过 HCI 执行此操作需要很长时间才能实现。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.