Bluetooth compat

From OMAPpedia

Jump to: navigation, search


[edit] Compat Drivers Location

Bluetooth Compat drivers are hosted at (bluetooth-compat) under the folder bluetooth-compat.

[edit] Building Bluetooth Compat Drivers

Set the following environment variables,

export ARCH=arm
export CROSS_COMPILE=/path/to/arm-none-linux-gnueabi-
export KLIB=/path/to/kernel/
export KLIB_BUILD=/path/to/kernel/

Build the drivers by providing this simple make command,


[edit] Drivers built

Bluetooth Compat drivers have been configured to build the following drivers only,

hardware/ti/wpan/bluetooth-compat$ find ./ -iname *.ko

[edit] Drivers Installation

The below mentioned drivers need to be installed into the /system/lib/modules/ of the target AFS,

cp -v    ./compat/compat.ko                                    $TARGET_FS/system/lib/modules/
cp -v    ./net/bluetooth/bnep/bnep.ko                $TARGET_FS/system/lib/modules/
cp -v    ./net/bluetooth/rfcomm/rfcomm.ko     $TARGET_FS/system/lib/modules/
cp -v    ./net/bluetooth/bluetooth.ko                    $TARGET_FS/system/lib/modules/
cp -v    ./net/bluetooth/hidp/hidp.ko                   $TARGET_FS/system/lib/modules/
cp -v    ./drivers/bluetooth/btwilink.ko                $TARGET_FS/system/lib/modules/

NOTE: The compat.ko modules need to work for both WLAN and BT. So make sure the compat.ko is taken out of the latest version. For more details: Please contact wcg-leads mailing list.

[edit] Boot up time insertion into the kernel

These drivers needs to be insmod-ed during the boot-up of the Android FS. The following entries are in the init.rc that shall insert the modules into kernel with the relevant options.

#insert bluetooth modules
insmod /system/lib/modules/compat.ko
insmod /system/lib/modules/bluetooth.ko force_acl_master=1 enable_mgmt=1 enable_le=1
insmod /system/lib/modules/rfcomm.ko
insmod /system/lib/modules/hidp.ko
insmod /system/lib/modules/bnep.ko
insmod /system/lib/modules/btwilink.ko

[edit] bluetooth-compat generation/configuration

You would need the following trees to generate the bluetooth-compat folder that is currently hosted on hardware/ti/wpan.git

export GIT_TREE=/path/to/bluetooth-next/tree
export GIT_COMPAT_TREE=/path/to/compat/tree

& the compat-wireless tree itself, where the drivers are generated. Run the following commands to generate the compat-wireless folder that can be copied into the bluetooth-compat location,

cd compat-wireless
 . ./scripts/
. ./scripts/drivers-select bt
vim --> edit the to maintain only the required modules

[edit] Necessity of bluetooth-compat & Switch to BlueTI

bluetooth-compat is required to enable the BlueTI stack which is a TI developed stack on top of BlueZ. To switch a product from BlueZ to use BlueTI, You can follow these steps:

Personal tools