Android 4.2.2是否支持USB蓝牙适配器?

4

我可以使用blueZ hciconfig找到USB蓝牙设备'hci0'。但是我无法在Android 4.2.2上启用蓝牙。自版本4.2以来,Android似乎使用了新的蓝牙堆栈。因此,它现在不依赖于BlueZ堆栈。 这是我的BoardConfig:

BOARD_HAVE_BLUETOOTH := true  
BOARD_HAVE_BLUETOOTH_BCM := true

我在内核中启用了HCI USB驱动程序

有人知道如何在Android 4.2.2上支持USB蓝牙适配器吗?这个问题困扰了我两周。我在互联网上找不到更多的信息。

非常感谢!

2个回答

0

CyanogenMod和Android-X86包含支持USB HCI的补丁,例如:http://review.cyanogenmod.org/#/c/45537/

http://review.cyanogenmod.org/#/c/45538/

http://git.android-x86.org/?p=platform/external/bluetooth/bluedroid.git;a=commit;h=471bdeac2ffe054221b3eab72e3b87523c0aa97c

要在板子上启用此支持,请查看 Android-x86 示例,以获取 BoardConfig。

# Some framework code requires this to enable BT
BOARD_HAVE_BLUETOOTH := true
BLUETOOTH_HCI_USE_USB := true
BOARD_HAVE_BLUETOOTH_BCM := true
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/generic/x86/bluetooth

对于 buildcfg

#ifndef _BDROID_BUILDCFG_H
#define _BDROID_BUILDCFG_H 
#define BTM_DEF_LOCAL_NAME "Android-x86"
// At present either USB or UART is supported
#define BLUETOOTH_HCI_USE_USB          TRUE
// Bluetooth Low Power Mode is supported on BT4.0
#define HCILP_INCLUDED                 FALSE
#endif

同时,您的内核需要支持UHID。


0

据我了解,Android已经放弃了BlueZ,现在依赖于Broadcom的Bluedroid。我不知道具体情况,但我会在网上寻找那个蓝牙适配器的驱动程序,并使用以下命令构建系统:

PRODUCT_COPY_FILES += drivers

在你的 AndroidProducs.mk 文件中


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接