Bluetooth compat

From OMAPpedia

(Difference between revisions)
Jump to: navigation, search
m (Drivers Installation)
m (Drivers Installation)
 
Line 49: Line 49:
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.
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.
For more details: Please contact wcg-leads mailing list.
-
</i></b>
+
</b></i>
== Boot up time insertion into the kernel ==
== Boot up time insertion into the kernel ==

Latest revision as of 16:08, 18 October 2012

Contents

[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,

make

[edit] Drivers built

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

hardware/ti/wpan/bluetooth-compat$ find ./ -iname *.ko
./compat/compat.ko
./net/bluetooth/bnep/bnep.ko
./net/bluetooth/rfcomm/rfcomm.ko
./net/bluetooth/bluetooth.ko
./net/bluetooth/hidp/hidp.ko
./drivers/bluetooth/hci_vhci.ko
./drivers/bluetooth/btmrvl.ko
./drivers/bluetooth/btwilink.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/admin-refresh.sh
. ./scripts/drivers-select bt
vim config.mk --> edit the config.mk 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
Namespaces
Variants
Actions
Navigation
Toolbox