Or what libraries and binaries must be extracted from htc stock ROM to
make bluetooth work? In my opinion, the list is here:

bts <-- htc specified
hciattach/hcid/sdptool <-- hciattach compiled from aosp is different
from htc stock one, others are same
libbluedroid.so/libbluetooth.so <-- libbluetooth.so differs from htc
stock one
libhardware.so/libhardware_legacy.so <-- not sure whether they are
needed
dbus-daemon/libdbus.so <-- both are same as htc stock ones
libA2DP.so/liba2dp.so <-- libA2DP.so is htc specified

Can anybody give me some hints?
Thanks a lot.

On May 28, 11:33 am, aBiNg <cn.fyo...@gmail.com> wrote:
> Hi, all
> I'm using Tattoo, whose official system is donut. I want to compile
> android from AOSP and port it into my Tattoo and then the bluetooth
> issue comes up. After the source was compiled and the image was
> flashed, I could not enable bluetooth both through UI and command
> line. The logcat complained 'E/bluedroid(  132): bt_enable: Timeout
> waiting for HCI device to come up' through android UI while hciattach
> outputed 'chip : unknown (5)' and 'segmentation fault' error when I
> executed 'hciattach -n -s ...'(same as in init.bahamas.rc file) as
> root through the adb shell.
>
> I've searched a lot and found some thread said that a few Htc devices
> used /system/bin/bts to active FM radio and Bluetooth hardware
> interface through the two .bts(FMInit_*.bts and TIInit_*.bts)
> firmwares. I'm not sure about that. I've copied the bts from stock ROM
> to current AOSP, but no joy. And there is no brf6300.bin in /etc/
> firmware directory, only TIInit_5.3.53.bts. So I linked the
> TIInit_*.bts file to brf6300.bin, but still no luck. Bluetooth-related
> items in init.bahamas.rc and init.rc are pasted here:
>
> the init.bahamas.rc:
>     # bluetooth power up/down interface
>     chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
>     chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
>     chmod 0660 /sys/class/rfkill/rfkill0/state
>     chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/
> serial_lock_cpu
>     chmod 0660 /sys/devices/platform/msm_serial_hs.0/serial_lock_cpu
> service hciattach /system/bin/hciattach \
>     -n -s 115200 /dev/ttyHS0 texas 4000000 flow
>     user bluetooth
>     group bluetooth net_bt_admin
>     disabled
> the init.rc:
> service dbus /system/bin/dbus-daemon --system --nofork
>     socket dbus stream 666 bluetooth bluetooth
>     user bluetooth
>     group bluetooth net_bt_admin
>
> service hcid /system/bin/hcid -s -n -f /etc/bluez/hcid.conf
>     socket bluetooth stream 660 bluetooth bluetooth
>     socket dbus_bluetooth stream 660 bluetooth bluetooth
>     # init.rc does not yet support applying capabilities, so run as
> root and
>     # let hcid drop uid to bluetooth with the right linux capabilities
>     group bluetooth net_bt_admin misc
>     disabled
>
> service hfag /system/bin/sdptool add --channel=10 HFAG
>     user bluetooth
>     group bluetooth net_bt_admin
>     disabled
>     oneshot
>
> service hsag /system/bin/sdptool add --channel=11 HSAG
>     user bluetooth
>     group bluetooth net_bt_admin
>     disabled
>     oneshot
>
> #btips
> service btips /system/bin/bts
>     socket bluetooth stream 660 bluetooth bluetooth
>     socket dbus_bluetooth stream 660 bluetooth bluetooth
>     group bluetooth net_bt_admin misc
>     disabled
>     oneshot
>
> These two files seem ok. Is there anything wrong? However, after I
> booted my Tattoo(not enabled bt yet), /sys/class/rfkill/rfkill0/state
> had been set to 1 and socket for dbus_bluetooth/bluetooth had not been
> created. /dev/ttyHS0 was there with the proper permissions. Now my
> system seems unable to recognise the the bluetooth and can't
> communicate with it. But dbus-daemon is running. The command of
> 'hcitool dev' returns nothing and I'm sure the kernel is fine.
>
> Any ideas? Thank you.

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to