The purpose of this document is to describe how to enable Bluetooth on i.MX 6Dual/Quad SabreSD board (RevC) for Android software.
i.MX 6Dual/Quad SabreSD board doesn't enable Bluetooth connection by default. To support bluetooth, the hardware rework is required.
The above diagram shows the reserved connections for Bluetooth in SabreSD RevC board (All connections are marked as "DNP"). This Bluetooth cable connector is designed specifically for the WiFi/BT combo card SX-SDCAN-2830BT which is developed and sold by Silex Technology. Note that pin 1 (BT_DISABLE) of the cable connector on i.MX 6Dual/Quad SabreSD RevC is opposite Pin 20 of the WiFi/BT module. Note: when connecting Silex module and J13, the connection is reverted (For example, PIN 1 in J13 connects to PIN 20 in Silex module). To use the J13 connector, the following reworks are required:
R209-R211, R214-R215 need to be populated.
Where is them, you can refer to the below chart.
SPI nor flash U14 need to be depopulated.
No other AUX boards should be connected..
Exchange UART5_RXD and UART5_TXD.
Orange PAD connects to Orange PAD.
Green PAD connects to Green PAD.
After hardware rework, the Bluetooth connection will like the following:
Pin on Silex Module
Pin-2 BT_UART_RTS (output)
Pin-3 BT_UART_TXD (output)
Pin-4 BT_UART_CTS (input)
Pin-5 BT_UART_RXD (input)
Pin-14 BT_PWD_L (input)
For earlier android version before Jelly Bean4.2
Take ICS as an example, for we didn't do this work when our last ICS version R13.4.1 released. So our formal release had no support on BT. Here will give out patches based on R13.4.1.
Enable Bluetooth with the following setting (e.g. device/fsl/imx6/sabresd/init.rc)
# No bluetooth hardware present
- setprop hw.bluetooth 0
+ setprop hw.bluetooth 1
Ensure BOARD_HAVE_BLUETOOTH := true in device/fsl/imx6/sabresd/SabreSDBoardConfigComm.mk.
Add BT feature support in device/fsl/imx6/sabresd/required_hardware.xml:
<feature name="android.hardware.camera" />
+ <feature name="android.hardware.bluetooth" />
Add UART5 support in kernel:
In this step you can refer to the attached (kernel patch for UART5 based on ICS.zip) to change PinMux PAD configuration for UART5.
Add AR3002 BT firmware support:
Update external/linux-firmware with the attached patch(0001-ENGR00270791-BT-add-AR3002-firmware-support.patch) to add AR3002 BT firmware support for Silex's BT is AR3002.
Then you can manually run the command “hciattach -n -s 115200 /dev/ttymxc4 ath3k 115200 flow nosleep” in console to see whether bluetooth can attach HCI successfully.
At last, you need add rfkill for BT reset in kernel, here also give a patch for reference:
From Jelly Bean4.2, Bluez is no longer used.Android provides a default Bluetooth stack, BlueDroid, that is divided into two layers: The Bluetooth Embedded System (BTE), which implements the core Bluetooth functionality and the Bluetooth Application Layer (BTA), which communicates with Android framework applications. A Bluetooth system service communicates with the Bluetooth stack through JNI and with applications through Binder IPC. The system service provides developers access to various Bluetooth profiles. The following diagram shows the general structure of the Bluetooth stack:
For bluedroid, we have supported it in our formal release including Android4.3. You can get it from our website. Or just get HAL code from attached(libbt-ath3k.zip).
For KEY_COL4 is both used by uart5 and pcie, if you enable BT, 3G mobile will not work. For its power disable pin is conflict with uart5's UART_RTS. This is
also why we didn't enable BT in formal release.
Supported and tested profile
not tested profile
Handset & Handfree(not support for hardware restrict)