Panda LEB Bluetooth Enablement

Registered by Zach Pfeffer on 2011-06-21

Enable Bluetooth in the Panda LEB kernel.

This BP will enable BT in the Panda LEB by adjusting the Android build to compile Linux kernel modules, copy firmware into the Android rootfs and insmodding the .kos in the init scripts.

After BT is enabled in the kernel it will be hooked up to user space.

Blueprint information

Zach Pfeffer
Series goal:
Accepted for 2011q2
Milestone target:
milestone icon 11.09
Started by
Zach Pfeffer on 2011-07-18
Completed by
Fathi Boudra on 2011-09-09

Related branches



[vishalbhoj, Sep 12,2011]:Bluetooth can be tested with .Boot the device with the buid #232 and Go to Settings->Wireless Networks ->Bluetooth settings.You can turn on Bluetooth ,scan devices and pair with them.File transfer /A2DP profiles wont work as sdcard is not present and audio is not enabled for now.
[fboudra, Sep 9, 2011] Set implementation to implemented (scope of this blueprint is done). Vishal reported
[vishalbhoj,Sep 9,2011]:All the changes have been committed,but bluetooth does not seem to work on build directly.It works when you replace MLO and u-boot.bin with binaries from . Its something to do with UART1 initialization at MLO/u-boot level.
[asac, Sep 5, 2011]: please update work items regularly; at least comment a change of status, e.g. when moving to "good progress", drop a simple comment like this whats going on. Also if a blueprint does not move, post at least every other day a status update whats the last discussion etc.l this blueprint is in drafting state -> please try to keep states etc. reflect reality :).
[asac, Jul 24, 2011]: lets keep comments at the top of whiteboard.
[asac, Jul 24, 2011]: should not have been one lumped together blueprint for wifi AND blueprint; keep things small. Please update whiteboard more frequently with comments about progress/blockage. at least when changing status to "slow progress", the action should be coming alongside a comment whats "slow" and whats the way forward.
[zpfeffer, Jul 24, 2011] I'm using the same BP because the steps to integrate both BT and WiFi are the same from an Android perspective, but I see you're point. I'll split this.
[asac, Jul 11, 2011]: summary love ;)

Panda supports Bluetooth

Bluetooth work from Android Userspace

Test Bluetooth: DONE

TILT Panda Android Bluetooth Cheatsheet

Hi -

Assuming you follow this protocol of dumping all modules in system /lib/modules as I am doing, to bring up Bluetooth:

insmod /system/lib/modules/st_drv.ko
insmod /system/lib/modules/bluetooth.ko
insmod /system/lib/modules/bnep.ko
insmod /system/lib/modules/hci_uart.ko
insmod /system/lib/modules/rfcomm.ko
insmod /system/lib/modules/btwilink.ko

When you insert the last one, btwilink.ko, you will observe a bunch of these coming every second or so for a while until it gives up:

[ 140.626586] (stk) : st_kim_start# <6>(stk) :ldisc_install = 1
[ 140.736907] (stk) :ldisc_install = 1<3>(stk) :line disc installation timed out
[ 141.775726] (stk) :line disc installation timed out <6>(stk) :ldisc_install = 0
[ 141.787170] (stk) :ldisc_install = 0<6>(stk) :ldisc_install = 1
[ 141.853057] (stk) :ldisc_install = 1<3>(stk) :line disc installation timed out
[ 142.946899] (stk) :line disc installation timed out <6>(stk) :ldisc_install = 0
[ 142.958435] (stk) :ldisc_install = 0<6>(stk) :ldisc_install = 1
[ 143.063903] (stk) :ldisc_install = 1

It means it is trying to communicate with a userland daemon that is also required, called uim. You would start uim (no arguments are needed) immediately after insterting btwilink.ko.

uim lives here

git:// master branch

it's trivial to make and presumably will build OK against bionic, I say that on the basis of my vast, towering ignorance about bionic, so you can take it to the bank.

After that's done, hci0 should exist and you should be able to go on workably.


Andy Green | TI Landing Team Leader │ Open source software for ARM SoCs | Follow Linaro -!/linaroorg -


Work Items

Work items:
Install modules and firmware into a build by hand to test: DONE
Create to install binaries: DONE
Extend android build to build kernel modules: DONE
Install Bluetooth modules in /system/lib/modules: DONE
Change BT module location from /system/lib/modules to /system/etc/modules/: DONE
Install Bluetooth firmware: DONE
Modify scripts to insmod Bluetooth modules: DONE
Compile userspace Bluetooth daemon uim for Android: DONE
Install Bluetooth user-space daemon uim into Android: DONE
Enable Bluetooth in build systemVerify working of Bluetooth on command prompt: DONE
Debug Bluetooth not working from UI and fix it : DONE
Add a clone of uim project to at device/ti/uim : DONE
Commit above changes: DONE

This blueprint contains Public information 
Everyone can see this information.