android蓝牙移植,全志平台ap6476模组 bluetooth功能调试(1)驱动移植&配置修改

本文介绍了在全志AP6476平台上进行Android蓝牙功能的移植和调试过程,涉及内核配置、sys_config修改、驱动及安卓端配置的详细步骤,包括蓝牙低功耗模式、唤醒休眠主控支持、UART配置、32K时钟开启以及Android系统蓝牙配置文件的更新。
摘要由CSDN通过智能技术生成

1. 前言

蓝牙移植内核修改的较少,

android层由于使用broadcom提供bplus,framework和package改动较多,

android部份的移植只提及重要的修改。

2. 内核配置

修改.config文件以支持蓝牙的low power mode和唤醒休眠主控功能和支持android4.2 hid设备。

蓝牙low power mode和唤醒休眠主控的支持。

linux-3.3目录下,输入make ARCH=arm menuconfig

选择 -> Networking support (NET [=y])

-> Bluetooth subsystem support (BT [=y])

-> Bluetooth device drivers

-> Bluetooth Low Power Manager Support

An inverter between bt hostwake pin and cpu

ap6476模组是支持蓝牙唤醒休眠主控,需要在wakeup_src_para主键下把蓝牙的唤醒源添加上,唤醒源要跟wifi配置下的ap6xxx_bt_host_wake一致。

linux-3.3目录下,输入make ARCH=arm menuconfig

选择 -> Device Drivers --->

-> HID Devices --->

-> User-space I/O driver support for HID subsystem

3. sys_config修改

sys_config.fex是系统的配置文件,蓝牙功能是否有、蓝牙功能脚、接口定义等均是在sys_config.fex中设定。

;--------------------------------------------------------------------------------

;blue tooth

;bt_used ---- blue tooth used (0- no used, 1- used)

;bt_uard_id ---- uart index

;--------------------------------------------------------------------------------

[bt_para]

bt_used = 1

bt_uart_id = 2

bt_wakeup =

bt_gpio =

bt_rst =

bt_para是蓝牙配置的主键名,在sys_config.fex中是唯一的,会在脚本解释中被用到。

bt_used子键值为1代指平台使用蓝牙功能,值为0代指平台无蓝牙功能,bt_used会被rf电源管理驱动通过脚本解释读取其值,若值为0则不注册rfkill,直接返回空。

bt_uart_id子键值代指使用哪一路串口作为数据交互的通道,会在uart注册时被读取。

[uart_para2]

uart_used = 1

uart_port = 2

uart_type

########################BT FM ########################## Download the image using command: 1 # Flash Image Put the board in Flashing mode. Refer below Appendix - 1 cd <your path>/Nvidia_Demo/android_gb_cardhu_os_image sudo ./nvflash --bct flash.bct --setbct --odmdata 0x40080105 --configfile flash.cfg --create --bl bootloader.bin --go #################################################################################################################################################################################################### Appendix - 1 Nvidia Board in Flashing Mode #################################################################################################################################################################################################### 1. Connect the Debug board to Cardhu board. 2. Connect the power supply and Micro USB to Cardhu 3. On the Debug Board Press S12 (FRC RCV), Keeping this pressed Press and release S7 (RESET), Now Release S12. 4. Now Device is in Flashing mode, We can start nvflash command now. #################################################################################################################################################################################################### Appendix - 2 Nvidia Board Keys (On Debug Board) #################################################################################################################################################################################################### 1. S7 (RESET) --> is the RESET button. 2. S5 (ROW1) --> is the BACK button. 2. S10 (ROW2) --> is the Home button. 4. S6 (ON KEY) --> is Wake up button. #################################################################################################################################################################################################### Appendix - 3 Nvidia Board unavailable Keys workaround #################################################################################################################################################################################################### 1.To execute teh specific keys, provide the key inputs from adb shell. Provide the keyevent for the desired key.Refer teh key list below. Eg: for MENU key run adb shell #input keyevent 82 { "STAR", 17 }, { "POUND", 18 }, { "DPAD_UP", 19 }, { "DPAD_DOWN", 20 }, { "DPAD_LEFT", 21 }, { "DPAD_RIGHT", 22 }, { "DPAD_CENTER", 23 }, { "VOLUME_UP", 24 }, { "VOLUME_DOWN", 25 }, { "POWER", 26 }, { "CAMERA", 27 }, { "CLEAR", 28 }, { "HEADSETHOOK", 79 }, { "FOCUS", 80 }, { "PLUS", 81 }, { "MENU", 82 }, { "NOTIFICATION", 83 }, { "SEARCH", 84 }, { "MEDIA_PLAY_PAUSE", 85 }, { "MEDIA_STOP", 86 }, { "MEDIA_NEXT", 87 },
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值