Bluetooh on ICS

4,437 views
Skip to first unread message

Milo

unread,
Dec 19, 2011, 12:41:33 AM12/19/11
to panda...@googlegroups.com
hi all

Does anyone make bluetooth work on ICS?
I really don't know how to do that,and I need some info about that.
Thank you.


Pavan Savoy

unread,
Dec 19, 2011, 7:32:12 PM12/19/11
to panda...@googlegroups.com

on ICS yes.
But i guess your question in on panda ICS?

I suppose this link can help ?
http://omappedia.org/wiki/Device_Driver_Interface_of_WiLink_Solution

You can also choose to go by the hciattach way ...

>
>

--
--Pavan Savoy

Jiuxian Chu

unread,
Dec 19, 2011, 9:39:02 PM12/19/11
to panda...@googlegroups.com
Thanks Pavan,

you are right,I mean panda ICS.
I'm sorry, but I cannot find any clue from that link.I want bluetooth official support from TI or google.
How about you?


Pavan Savoy

unread,
Dec 19, 2011, 9:46:15 PM12/19/11
to panda...@googlegroups.com
2011/12/20 Jiuxian Chu <jiuxi...@gmail.com>:

I haven't checked whether the google build for panda (ics branch) -
actually has BT working..
This would be something you can try.

As far as info goes, WiLink is the BT chip on Panda - connected to
UART2, so if you have enabled HCI_UART in your kernel.
You should be able to get BT working with right entries in init.rc for
hciattach.

> How about you?
>
>

--
--Pavan Savoy

suci

unread,
Dec 23, 2011, 2:03:42 AM12/23/11
to pandaboard
Hi,
I'm building the ICS (master version). I've included the imagetec
driver as specified in the drivers page of the www.source.android.com.
I've enabled BOARD_HAVE_BLUETOOTH in the BoardConfig.mk. but still
bluetooth files are not getting compiled.
What changed should i do to get the bluetooth code compiled?

Thanks

On Dec 19, 9:39 pm, Jiuxian Chu <jiuxian....@gmail.com> wrote:
> On 2011年12月20日 08:32, Pavan Savoy wrote:
>
> On Mon, Dec 19, 2011 at 11:11 AM, Milo <jiuxian....@gmail.com>
>
> <jiuxian....@gmail.com> wrote:
>
> hi all
>
> Does anyone make bluetooth work on ICS?
> I really don't know how to do that,and I need some info about that.
> Thank you.
>
> on ICS yes.
> But i guess your question in on panda ICS?
>
> I suppose this link can help
> ?http://omappedia.org/wiki/Device_Driver_Interface_of_WiLink_Solution

suci

unread,
Dec 23, 2011, 2:05:43 AM12/23/11
to pandaboard
Hi,
How to get the Bluetooth files get compiled. I've enabled
BOARD_HAVE_BLUETOOTH in Boardconfig.mk but still BT files are not
getting compiled.

your help is much appreciated.
Thanks

On Dec 19, 9:46 pm, Pavan Savoy <pavan.sa...@gmail.com> wrote:
> 2011/12/20 Jiuxian Chu <jiuxian....@gmail.com>:
>
>
>
>
>
> > On 2011年12月20日 08:32, Pavan Savoy wrote:
>
> > On Mon, Dec 19, 2011 at 11:11 AM, Milo <jiuxian....@gmail.com> wrote:
>
> > hi all
>
> > Does anyone make bluetooth work on ICS?
> > I really don't know how to do that,and I need some info about that.
> > Thank you.
>
> > on ICS yes.
> > But i guess your question in on panda ICS?
>
> > I suppose this link can help ?
> >http://omappedia.org/wiki/Device_Driver_Interface_of_WiLink_Solution
>
> > You can also choose to go by the hciattach way ...
>
> > Thanks Pavan,
>
> > you are right,I mean panda ICS.
> > I'm sorry, but I cannot find any clue from that link.I want bluetooth
> > official support from TI or google.
>
> I haven't checked whether the google build for panda (ics branch) -
> actually has BT working..
> This would be something you can try.
>
> As far as info goes, WiLink is the BT chip on Panda - connected to
> UART2, so if you have enabled HCI_UART in your kernel.
> You should be able to get BT working with right entries in init.rc for
> hciattach.
>
> > How about you?
>
> --
> --Pavan Savoy- Hide quoted text -
>
> - Show quoted text -

wol fu

unread,
Dec 28, 2011, 5:32:17 AM12/28/11
to panda...@googlegroups.com
I had make bluetooth work on pandaboard with ICS

2011/12/23 suci <cnsuc...@gmail.com>

Jiuxian Chu

unread,
Dec 28, 2011, 9:24:54 PM12/28/11
to panda...@googlegroups.com
Hi fu,

Could you please share the steps you did which had bluetooth working?
I would very appreciate it.

richi chen

unread,
Dec 29, 2011, 10:50:09 PM12/29/11
to panda...@googlegroups.com
Hi Pavan,

i haven't see the /sys/devices/platform/btwilink, dose it means the kernel btwilink driver cannot work on PandaBoard? Even i enable HCI_UART and BT_WILINK in kernel, and add hciattach service behind uim.

Pavan Savoy

unread,
Dec 29, 2011, 10:57:31 PM12/29/11
to panda...@googlegroups.com

As omappedia.org would suggest there are 2 ways the BT on the wilink
devices can be made use of,

1. hciattach + HCI_UART way
2. UIM and BTWILINK way (which requires ti-st to be enabled).

For just BT, you can use the hciattach and HCI_UART.

regards,
Pavan

--
--Pavan Savoy

richi chen

unread,
Dec 30, 2011, 11:22:21 AM12/30/11
to panda...@googlegroups.com
Hi,
I modify arch/arm/mach-omap2/board-omap4panda.c in google released kernel to add btwilink platform device structure and add the structure pointer to platform devices list.
Now i can see hci0 by hciconfig -a, but fail to hciconfig hci0 up.

The btwilink init messages:

[ 13.076904] Bluetooth: Bluetooth Driver for TI WiLink - Version 1.0

[ 13.094940] (stc): st_register(2)

[ 13.104095] (stc): chnl_id list empty :2

[ 13.108825] (stk) : st_kim_start

[ 13.228393] (stk) :ldisc_install = 1shell@android:/ $

[ 14.236755] (stk) :line disc installation timed out

[ 14.249176] (stk) :ldisc_install = 0

[ 14.447174] (stk) :ldisc_install = 1

[ 15.456298] (stk) :line disc installation timed out

[ 15.461853] (stk) :ldisc_install = 0

[ 15.644622] (stk) :ldisc_install = 1

[ 16.655181] (stk) :line disc installation timed out

[ 16.665985] (stk) :ldisc_install = 0

[ 16.841644] (stk) :ldisc_install = 1

[ 17.847808] (stk) :line disc installation timed out

[ 17.853302] (stk) :ldisc_install = 0

[ 17.959594] (stk) :ldisc_install = 1

[ 18.964233] (stk) :line disc installation timed out

[ 18.969635] (stk) :ldisc_install = 0

[ 19.077209] (stk) :ldisc_install = 1

[ 20.081451] (stk) :line disc installation timed out

[ 20.086517] (stk) :ldisc_install = 0

[ 20.098052] Bluetooth: st_register failed -22


What's wrong with it? 

BTW, cannot see uim service by ps command.



Pavan Savoy

unread,
Dec 30, 2011, 12:18:56 PM12/30/11
to panda...@googlegroups.com


Yep, there's the problem.
You will have to run UIM to get the hci0 up.

The latest is available at git.omapzoom.org project hardware/ti/wpan.git
The one's over there is for Android, shouldn't be too difficult to get
it working for ubuntu ...


>
>
>

--
--Pavan Savoy

richi chen

unread,
Jan 1, 2012, 2:28:16 AM1/1/12
to panda...@googlegroups.com
Hi Pavan,

I got source from 
the master branch with BT firmware.
But there are the same errors. I found out the errors are from btwilink kernel driver. Are there any problem in ti-st/btwilink drivers of Google released 3.0.8 kernel for pandaboard?

Pavan Savoy

unread,
Jan 1, 2012, 2:53:17 AM1/1/12
to panda...@googlegroups.com

Can you share logs of the error ?

##droid sent - ignore typos

richi chen

unread,
Jan 1, 2012, 11:10:04 AM1/1/12
to panda...@googlegroups.com
Hi Pavan,

The log errors message of btwilink:

[ 149.664184] (stc): st_register(2)

[ 149.668090] (stc): chnl_id list empty :2

[ 149.672576] (stk) : st_kim_start

[ 149.786956] (stk) :ldisc_install = 1

[ 150.784484] (stk) :line disc installation timed out

[ 150.790039] (stk) :ldisc_install = 0

[ 150.903228] (stk) :ldisc_install = 1

[ 151.909423] (stk) :line disc installation timed out

[ 151.915527] (stk) :ldisc_install = 0

[ 152.033020] (stk) :ldisc_install = 1

[ 153.034484] (stk) :line disc installation timed out

[ 153.034515] (stk) :ldisc_install = 0

[ 153.162384] (stk) :ldisc_install = 1

[ 154.159484] (stk) :line disc installation timed out

[ 154.165069] (stk) :ldisc_install = 0

[ 154.276580] (stk) :ldisc_install = 1

[ 155.285064] (stk) :line disc installation timed out

[ 155.290588] (stk) :ldisc_install = 0

[ 155.409393] (stk) :ldisc_install = 1

[ 156.409454] (stk) :line disc installation timed out

[ 156.415008] (stk) :ldisc_install = 0

[ 156.419067] Bluetooth: st_register failed -22


And after i open UIM_DEBUG, i found out the UIM always reporting: 


E/uim-sysfs( 751): uim: Inside main

E/uim-sysfs( 751): uim: Inside insmod

E/uim-sysfs( 751): uim: Error inserting st_drv module


even i put st_drv.ko In the root "/" for Android.

Pavan Savoy

unread,
Jan 1, 2012, 11:41:57 AM1/1/12
to panda...@googlegroups.com
Well st_drv.ko need not be present in "/" - Since by the looks of it,
it is built into the kernel.
So remove any modules you have from "/" and try running UIM.

The UIM should be there running and saying "polling....".

regards,
Pavan Savoy.

--
--Pavan Savoy

richi chen

unread,
Jan 2, 2012, 2:49:43 AM1/2/12
to panda...@googlegroups.com
Hi Pavan,
Don't work, the same result.
I temperately give up to try TI-ST/BTWilink/UIM.
I then try HCIUART/hciattach, no good result as well.

The only way now to let ICS bluetooth work is to use USB BT dongle, enable BT_HCIBTUSB in kernel. And set 

    chmod 0660 /sys/class/rfkill/rfkill0/state
    chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state

in init.omap4pandaboard.rc

Pavan Savoy

unread,
Jan 2, 2012, 2:10:51 PM1/2/12
to panda...@googlegroups.com
On Mon, Jan 2, 2012 at 1:49 AM, richi chen <richi...@gmail.com> wrote:
> Hi Pavan,
> Don't work, the same result.
> I temperately give up to try TI-ST/BTWilink/UIM.
> I then try HCIUART/hciattach, no good result as well.

Well you can try and follow this procedure,
http://omappedia.org/wiki/Device_Driver_Interface_of_WiLink_Solution#On_Boot_Check


> The only way now to let ICS bluetooth work is to use USB BT dongle, enable
> BT_HCIBTUSB in kernel. And set
>
>     chmod 0660 /sys/class/rfkill/rfkill0/state
>     chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
>
> in init.omap4pandaboard.rc

Well this seems redundant, since a wilink chip is already provided on
the panda board....


--
--Pavan Savoy

milo chu

unread,
Jan 4, 2012, 5:30:25 AM1/4/12
to pandaboard
On Jan 3, 3:10 am, Pavan Savoy <pavan.sa...@gmail.com> wrote:
> On Mon, Jan 2, 2012 at 1:49 AM, richi chen <richi.c...@gmail.com> wrote:
> > Hi Pavan,
> > Don't work, the same result.
> > I temperately give up to try TI-ST/BTWilink/UIM.
> > I then try HCIUART/hciattach, no good result as well.
>
> Well you can try and follow this procedure,http://omappedia.org/wiki/Device_Driver_Interface_of_WiLink_Solution#...
>
> > The only way now to letICSbluetooth work is to use USB BT dongle, enable
> > BT_HCIBTUSB in kernel. And set
>
> >     chmod 0660 /sys/class/rfkill/rfkill0/state
> >     chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
>
> > in init.omap4pandaboard.rc
>
> Well this seems redundant, since a wilink chip is already provided on
> the panda board....

hello Pavan

I failed to turn on bluetooth from cmd, the log is below.
Why so many permission deny?
Thank you.

root@android:/ # /system/bin/bluetoothd -n
bluetoothd[580]: Bluetooth deamon 4.93
bluetoothd[580]: Starting SDP server
bluetoothd[580]: opening L2CAP socket: Operation not permitted
bluetoothd[580]: Server initialization failed
bluetoothd[580]: Failed to open control socket: Operation not
permitted (1)
bluetoothd[580]: Can't init bnep module
bluetoothd[580]: Failed to init network plugin
bluetoothd[580]: Can't open HCI socket: Operation not permitted (1)
bluetoothd[580]: adapter_ops_setup failed

Jiuxian Chu

unread,
Jan 5, 2012, 10:13:56 PM1/5/12
to panda...@googlegroups.com
2012/1/2 richi chen <richi...@gmail.com>:

hello richi

I'm trying to enable USB BT dongle as you mentioned.
but I still cannot see Bluetooth in the Settings.How do you check
bluetooth is working

richi chen

unread,
Jan 5, 2012, 11:39:56 PM1/5/12
to panda...@googlegroups.com
1. enable CONFIG_BT_HCIBTUSB in kernel.

2. in BoardConfig.mk
BOARD_HAVE_BLUETOOTH := true

3. in device.mk add 
PRODUCT_COPY_FILES += \
device/ti/panda/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml \

u can copy android.hardware.bluetooth.xml from omappedia's source tree of device/ti/blaze_tablet

4. in init.omap4pandaboard.rc add 
# change permissions for Bluetooth/FM/GPS
    chmod 0660 /sys/class/rfkill/rfkill0/state
    chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state

if bluetooth is on rfkill0.


And then make a clean build.

Good Luck!

richi chen

unread,
Jan 8, 2012, 4:11:06 AM1/8/12
to panda...@googlegroups.com
Hi All,

I've made BTWilink  working on PandaBoard ICS.
I get the kernel source from git://git.omapzoom.org/kernel/omap.git -b p-android-omap-3.0 and add some modifications in arch/arm/mach-omap2/board-omap4panda.c, see the attatched patch.

( for this kernel, u must use the correct SGX lib in git://git.omapzoom.org/device/ti/proprietary-open.git -b ics-mr1)

copy them to target's /system/etc/firmware.

Don't need USB BT dongle anymore! Good Luck!



panda-add-btwilink-support-for-ics.patch

richi chen

unread,
Jan 9, 2012, 3:54:24 AM1/9/12
to panda...@googlegroups.com
Hi All,

The FM radio also work if have its firmware.
By google search, here can to download ...

milo chu

unread,
Jan 9, 2012, 5:23:57 AM1/9/12
to pandaboard
Hello,

I follow the steps you mentioned,
But nothing displayed.

I copied the SGX libs to the target_out dir.
And,I cannot find process bluetoothd when I use command "ps" in adb
shell.
Are there anything I missed?

Thank you.

On Jan 8, 5:11 pm, richi chen <richi.c...@gmail.com> wrote:
> Hi All,
>
> I've made BTWilink  working on PandaBoard ICS.
> I get the kernel source from git://git.omapzoom.org/kernel/omap.git -b
> p-android-omap-3.0<http://git.omapzoom.org/?p=kernel/omap.git;a=shortlog;h=refs/heads/p-...> and
> add some modifications in arch/arm/mach-omap2/board-omap4panda.c, see the
> attatched patch.
>
> ( for this kernel, u must use the correct SGX lib in git://git.omapzoom.org/device/ti/proprietary-open.git
> -b ics-mr1<http://git.omapzoom.org/?p=device/ti/proprietary-open.git;a=shortlog;...>
> )
>
> for BT firmware, u can download fromhttps://gforge.ti.com/gf/project/wilink_drivers/frs/?action=FrsReleas...
> ,
> copy them to target's /system/etc/firmware.
>
> Don't need USB BT dongle anymore! Good Luck!
>
>  panda-add-btwilink-support-for-ics.patch
> 2KViewDownload

milo chu

unread,
Jan 9, 2012, 6:16:23 AM1/9/12
to pandaboard
the log from<4>[ 8.835906] ------------[ cut here ]------------
<4>[ 8.841033] WARNING: at drivers/gpu/pvr/omaplfb/
omaplfb_displayclass.c:888 ProcessFlip+0x468/0x4c0()
<4>[ 8.850921] invalid size of private data (616 vs 636)
<4>[ 8.856140] Modules linked in:
<4>[ 8.859741] Backtrace:
<4>[ 8.862518] [<c00511a0>] (dump_backtrace+0x0/0x110) from
[<c05a5cf0>] (dump_stack+0x18/0x1c)
<4>[ 8.871490] r6:00000378 r5:c02bb940 r4:dda73db8 r3:dda72000
<4>[ 8.877899] [<c05a5cd8>] (dump_stack+0x0/0x1c) from [<c0096d5c>]
(warn_slowpath_common+0x5c/0x6c)
<4>[ 8.887359] [<c0096d00>] (warn_slowpath_common+0x0/0x6c) from
[<c0096e10>] (warn_slowpath_fmt+0x38/0x40)
<4>[ 8.897399] r8:00000000 r7:00000268 r6:dd200200 r5:dda73e0c
r4:00000000
<4>[ 8.904693] r3:00000009
<4>[ 8.907684] [<c0096dd8>] (warn_slowpath_fmt+0x0/0x40) from
[<c02bb940>] (ProcessFlip+0x468/0x4c0)
<4>[ 8.917175] r3:00000268 r2:c0708ebc
<4>[ 8.921295] [<c02bb4d8>] (ProcessFlip+0x0/0x4c0) from
[<c02a5804>] (PVRSRVProcessQueues+0x580/0x73c)
<4>[ 8.931121] [<c02a5284>] (PVRSRVProcessQueues+0x0/0x73c) from
[<c02a375c>] (PVRSRVMISR+0x2c/0x8c)
<4>[ 8.940795] [<c02a3730>] (PVRSRVMISR+0x0/0x8c) from [<c0292184>]
(MISRWrapper+0x14/0x18)
<4>[ 8.949462] r4:dda197c0 r3:00000001
<4>[ 8.953491] [<c0292170>] (MISRWrapper+0x0/0x18) from
[<c00adf8c>] (process_one_work+0x114/0x410)
<4>[ 8.962860] [<c00ade78>] (process_one_work+0x0/0x410) from
[<c00ae630>] (worker_thread+0x1a8/0x490)
<4>[ 8.972534] [<c00ae488>] (worker_thread+0x0/0x490) from
[<c00b526c>] (kthread+0x94/0x98)
<4>[ 8.981201] [<c00b51d8>] (kthread+0x0/0x98) from [<c009b588>]
(do_exit+0x0/0x720)
<4>[ 8.989227] r7:00000013 r6:c009b588 r5:c00b51d8 r4:dd84fe94
<4>[ 8.995544] ---[ end trace 0807c4bff711ced2 ]---
dmesg:

wang marco

unread,
Jan 9, 2012, 7:43:30 AM1/9/12
to panda...@googlegroups.com
Hi richi,

Could you provide where did you get android source and version and kernel defconfig that i can compare with it,tks



richi chen

unread,
Jan 12, 2012, 9:36:54 AM1/12/12
to panda...@googlegroups.com
Hi, try my repo. based on AOSP master branch.

1. get & make
repo sync
 . build/envsetup.sh
lunch full_panda-eng
make

2. patch the kernel, build kernel & driver modules
cp device/ti/panda/panda-add-btwilink-support-for-ics.patch kernel/
cd kernel/
git apply panda-add-btwilink-support-for-ics.patch
cd ..
make kernel_build

3. rebuild boot/system image
make

Good Luck,

VH

unread,
Jan 17, 2012, 5:11:39 AM1/17/12
to pandaboard
Hi chen,

I am trying the same steps with the android source from "repo init -u
https://android.googlesource.com/platform/manifest" and bootloaders &
kernel from "git.omapzoom.org". Have enabled all the bluetooth related
stuffs and I can see all the blue tooth files are build and demons,so
files & apk's are generated. But I am not able to see the Bluetooth
settings on the Settings menu!!
What may be going wrong? Please suggest if you have any idea. I am
using Panda board RevA3 and 4.0.3 ICS on ubuntu 11.10 64-bti host.

I have not yet tried your repo, I may try this if none of my changes
works!!

-VH

Pavan Savoy

unread,
Jan 17, 2012, 8:24:18 AM1/17/12
to panda...@googlegroups.com


How about android.hardware.bluetooth.xml in system/etc/permissions ?


##droid sent - ignore typos

wang marco

unread,
Jan 17, 2012, 5:59:52 AM1/17/12
to panda...@googlegroups.com

Hi VH,
You could forgot copy "android.bluetooth.hardware.xml" into system.

best regards...

wang marco

unread,
Jan 17, 2012, 9:31:17 PM1/17/12
to panda...@googlegroups.com
Hi ,

Yes,you need to copy this file into /system/etc/permissions


best regards~~

VH

unread,
Jan 17, 2012, 11:42:33 PM1/17/12
to pandaboard
Thanks to Wang marco and Pavan Savoy for the inputs.
I am not able to locate android.bluetooth.hardware.xml file anywhere
in the package Where can I find this file? Is this generated file?

-Vinayaka

Pavan Savoy

unread,
Jan 17, 2012, 11:46:46 PM1/17/12
to panda...@googlegroups.com
On Wed, Jan 18, 2012 at 10:12 AM, VH <hegd...@gmail.com> wrote:
> Thanks to Wang marco and Pavan Savoy for the inputs.
> I am not able to locate android.bluetooth.hardware.xml file anywhere
> in the package Where can I find this file? Is this generated file?

yeah, I guess you will have to create like on in here...
http://git.omapzoom.org/?p=device/ti/blaze.git;a=blob;f=android.hardware.bluetooth.xml;h=e058dbda78c0b1a1c195ba2de95513b5d91560fb;hb=refs/heads/ics-mr1

> -Vinayaka
>
> On Jan 18, 7:31 am, wang marco <marco681...@gmail.com> wrote:
>> Hi ,
>>
>> Yes,you need to copy this file into /system/etc/permissions
>>
>> best regards~~

--
--Pavan Savoy

VH

unread,
Jan 18, 2012, 3:53:31 AM1/18/12
to pandaboard
Thanks for the input. I am going to try with this change now.
But what I found that, device.mk copies these XML files from
frameworks/base/data/etc/ folder to system/etc/permissions/ folder. If
it is not present as of frameworks folder, does that mean some problem
with the build? or these are not related to build!!

-VH

On Jan 18, 9:46 am, Pavan Savoy <pavan.sa...@gmail.com> wrote:
> On Wed, Jan 18, 2012 at 10:12 AM, VH <hegdev...@gmail.com> wrote:
> > Thanks to Wang marco and Pavan Savoy for the inputs.
> > I am not able to locate android.bluetooth.hardware.xml file anywhere
> > in the package Where can I find this file? Is this generated file?
>
> yeah, I guess you will have to create like on in here...http://git.omapzoom.org/?p=device/ti/blaze.git;a=blob;f=android.hardw...

Pavan Savoy

unread,
Jan 18, 2012, 4:16:32 AM1/18/12
to panda...@googlegroups.com
On Wed, Jan 18, 2012 at 2:53 AM, VH <hegd...@gmail.com> wrote:
> Thanks for the input. I am going to try with this change now.
> But what I found that, device.mk copies these XML files from
> frameworks/base/data/etc/ folder to system/etc/permissions/ folder. If
> it is not present as of frameworks folder, does that mean some problem
> with the build? or these are not related to build!!

Yes, I've observed that too.. like wifi - but for wifi the file exists.
But I have not found bluetooth in any of the google published
frameworks/base project ...

Better off to be in device/**/** project itself along with rest of
product definitions..

>
> -VH
>
> On Jan 18, 9:46 am, Pavan Savoy <pavan.sa...@gmail.com> wrote:
>> On Wed, Jan 18, 2012 at 10:12 AM, VH <hegdev...@gmail.com> wrote:
>> > Thanks to Wang marco and Pavan Savoy for the inputs.
>> > I am not able to locate android.bluetooth.hardware.xml file anywhere
>> > in the package Where can I find this file? Is this generated file?
>>
>> yeah, I guess you will have to create like on in here...http://git.omapzoom.org/?p=device/ti/blaze.git;a=blob;f=android.hardw...
>>
>> > -Vinayaka
>>
>> > On Jan 18, 7:31 am, wang marco <marco681...@gmail.com> wrote:
>> >> Hi ,
>>
>> >> Yes,you need to copy this file into /system/etc/permissions
>>
>> >> best regards~~
>>
>> --
>> --Pavan Savoy

--
--Pavan Savoy

VH

unread,
Jan 18, 2012, 5:53:45 AM1/18/12
to pandaboard
Hi,

Thanks a lot for the inputs. Now I am able to see the Bluetooth
settings option in settings menu. But Bluetooth is not turning on and
is not giving any error as well.
What may be the issue? Is something wrong with kernel build? I mean
bluetooth might be disabled in kernel? Even WiFi is not turning on!!

-Vinayaka
On Jan 18, 2:16 pm, Pavan Savoy <pavan.sa...@gmail.com> wrote:

VH

unread,
Jan 18, 2012, 10:21:47 AM1/18/12
to pandaboard
I got the problem, need to resolve the same (sorry for the post before
looking into all the error messages).
The problem is that, app is not able to get the rfkill and hence it is
not enabling the Bluetooth. I think this is part of the UIM and I have
not yet integrated the wpan. I hope this will resolve the issue.

If any one has some more inputs, please suggest the same

-VH

VH

unread,
Jan 19, 2012, 7:18:31 AM1/19/12
to pandaboard
I got the wpan source, but some how it is not building. I use ndk-r7
to build. Is there anything else required for this? or this need to be
part of the kernel build?

-VH

On Dec 30 2011, 10:18 pm, Pavan Savoy <pavan.sa...@gmail.com> wrote:
> On Fri, Dec 30, 2011 at 10:22 AM, richi chen <richi.c...@gmail.com> wrote:
> > Hi,
> > I modify arch/arm/mach-omap2/board-omap4panda.c in google released kernel to
> > add btwilink platform device structure and add the structure pointer to
> > platform devices list.
> > Now i can see hci0 by hciconfig -a, but fail to hciconfig hci0 up.
>
> > The btwilink init messages:
>
> > [ 13.076904] Bluetooth: Bluetooth Driver for TI WiLink - Version 1.0
>
> > [ 13.094940] (stc): st_register(2)
>
> > [ 13.104095] (stc): chnl_id list empty :2
>
> > [ 13.108825] (stk) : st_kim_start
>
> > [ 13.228393] (stk) :ldisc_install = 1shell@android:/ $
>
> > [ 14.236755] (stk) :line disc installation timed out
>
> > [ 14.249176] (stk) :ldisc_install = 0
>
> > [ 14.447174] (stk) :ldisc_install = 1
>
> > [ 15.456298] (stk) :line disc installation timed out
>
> > [ 15.461853] (stk) :ldisc_install = 0
>
> > [ 15.644622] (stk) :ldisc_install = 1
>
> > [ 16.655181] (stk) :line disc installation timed out
>
> > [ 16.665985] (stk) :ldisc_install = 0
>
> > [ 16.841644] (stk) :ldisc_install = 1
>
> > [ 17.847808] (stk) :line disc installation timed out
>
> > [ 17.853302] (stk) :ldisc_install = 0
>
> > [ 17.959594] (stk) :ldisc_install = 1
>
> > [ 18.964233] (stk) :line disc installation timed out
>
> > [ 18.969635] (stk) :ldisc_install = 0
>
> > [ 19.077209] (stk) :ldisc_install = 1
>
> > [ 20.081451] (stk) :line disc installation timed out
>
> > [ 20.086517] (stk) :ldisc_install = 0
>
> > [ 20.098052] Bluetooth: st_register failed -22
>
> > What's wrong with it?
>
> > BTW, cannot see uim service by ps command.
>
> Yep, there's the problem.
> You will have to run UIM to get the hci0 up.
>
> The latest is available at git.omapzoom.org project hardware/ti/wpan.git
> The one's over there is for Android, shouldn't be too difficult to get
> it working for ubuntu ...
>
>
>
> --
> --Pavan Savoy

richi chen

unread,
Jan 21, 2012, 6:18:44 AM1/21/12
to panda...@googlegroups.com
Hi, why not try my repo. based on omapzoom ics-mr1 branch.

1. get & make
repo init -u git://github.com/richi-chen/Pandaboard-ICS-repo.git -b omapzoom
repo sync
 . build/envsetup.sh
lunch full_richi_panda-eng
make

2. patch the kernel, build kernel & driver modules
cp device/ti/richi-panda/panda-add-btwilink-support-for-ics.patch kernel/
cd kernel/
git apply panda-add-btwilink-support-for-ics.patch
cd ..
make kernel_build

3. rebuild boot/system image
make
 
Don't forget to manually format the SD card media partition to ext4, it will mount the internal /sdcard to real physical media partition while booting.
It also support external USB storage.

Happy Chinese New Year!

VH

unread,
Jan 30, 2012, 1:38:20 AM1/30/12
to pandaboard
Thanks for the support. Finally I got some time to try your repo and
look into the blue tooth issue, but still I am not successful.

>> After downloading the mentioned repo (except prebuilt I have downloaded all), I am getting the following error while building.
"build/core/java.mk:20: *** Pandaboard_ICS/dalvik/dexgen: Invalid
LOCAL_SDK_VERSION '4' Choices are: current . Stop."
Richi chen Is the build uses anything from prebuilt? or is the
prebuilt is must for building the code?

>> When I am trying other options I found some new issues. The type in rfkill0 is wlan and hence it is unable to find the blue tooth. How to change this? or where can I find the settings for this?
If I force the type to bluetooth, then HCI ioctl() is failing and
giving "bt_enable: ret: -1, errno: 19"
Has any one know this error?

Regards
VH

richi chen

unread,
Jan 30, 2012, 6:56:09 AM1/30/12
to panda...@googlegroups.com
Hi VH,



>> After downloading the mentioned repo (except prebuilt I have downloaded all), I am getting the following error while building.
"build/core/java.mk:20: *** Pandaboard_ICS/dalvik/dexgen: Invalid
LOCAL_SDK_VERSION '4' Choices are: current .  Stop."
Richi chen Is the build uses anything from prebuilt? or is the
prebuilt is must for building the code?

---> I have no any prebuilt in my repo. source tree. You should follow my building process  for yourself.
BTW, the new SGX libs of omapzoom ics_mr1 branch  will cause some problems, i'm looking at.

>> When I am trying other options I found some new issues. The type in rfkill0 is wlan and hence it is unable to find the blue tooth. How to change this? or where can I find the settings for this?
If I force the type to bluetooth, then HCI ioctl() is failing and
giving "bt_enable: ret: -1, errno: 19"
Has any one know this error?

----> A good news for you, by the effort of  Pavan Savoy, the AOSP's kernel 3.0.8 is now workable for TI bluetooth. I believe  the AOSP will sooner or later have full support of bluetooth for Pandaboard ICS on its master branch.

Regards

richi chen

unread,
Jan 31, 2012, 4:20:53 AM1/31/12
to panda...@googlegroups.com



---> 
BTW, the new SGX libs of omapzoom ics_mr1 branch  will cause some problems, i'm looking at.

===> OK now, change to use  omapzoom kernel p-android-omap-3.0-4470 branch.

Regards

gad.kr...@gmail.com

unread,
Feb 2, 2012, 1:18:32 PM2/2/12
to panda...@googlegroups.com
Guys, I got it working in ICS master branch from AOSP with minimal changes and a re-compiled kernel:

1) check out master AOSP
2) add ti-wpan project from omapzoom (git://git.omapzoom.org/platform/hardware/ti/wpan.git) to hardware/ti/wpan
3) modify device/ti/panda/ as follows:
a) add TIInit_7.2.31.bts firmware from pandroid project in TI gforge (https://gforge.ti.com/gf/download/frsrelease/567/4721/Bluetooth_WLAN_KernelPatches_Firmware_Config_L27.12.1-P2-Pandroid-1.0-Linux-x86-Install) -- it's a linux installer, copy the firmware from the installed directory to ti/panda
b) add android.hardware.bluetooth.xml from omapzoom blaze_tablet (http://git.omapzoom.org/?p=device/ti/blaze_tablet.git;a=blob;f=android.hardware.bluetooth.xml;h=569f857e6b71418ffc8ab17b136f86a27cc6f003;hb=ics-mr1)
c) modify device.mk with:
PRODUCT_COPY_FILES := device/ti/panda/TIInit_7.2.31.bts:system/etc/firmware/TIInit_7.2.31.bts \
device/ti/panda/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml
PRODUCT_PACKAGES := $(call inherit-product-if-exists, hardware/ti/wpan/ti-wpan-products.mk)
d) modify BoardConfig.mk with:
BOARD_HAVE_BLUETOOTH := true
e) modify init.omap4pandaboard.rc with:


# change permissions for Bluetooth/FM/GPS

chmod 0600 /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chmod 0600 /dev/ttyO1
chown bluetooth bluetooth /dev/ttyO1
#shared transport user space mgr service for Bluetooth, FM and GPS
service uim /system/bin/uim-sysfs
class core
user bluetooth
group bluetooth net_bt_admin
f - IMPORTANT) re-compile kernel from AOSP: https://android.googlesource.com/kernel/omap (branch remotes/origin/android-omap-panda-3.0) with the following:
1) make sure you copy the original defconfig from arch/arm/configs/panda_defconfig to .config in kernel root
2) make menuconfig with ARCH=arm
3) Networking Support->Bluetooth subsystem support->
a) turn on L2CAP, SCO, RFCOMM (with tty), BNEP, and HIDP
b) Bluetooth device drivers-> make sure you have HCI UART (H4 protocol) and Texas Instruments WiLink7 driver enabled
4) exit and save
5) re-compile, use the zImage (not the uImage) and replace the kernel in ti/panda/kernel with it.
4) Re-compile AOSP with new kernel, see if BT and wifi works :-D

Message has been deleted

VH

unread,
Feb 7, 2012, 7:48:11 AM2/7/12
to pandaboard
All,

When I searching for "hcid.conf" file in the bluez source of 4.93
(from ICS code base), I am not able to find the same. This is present
in the older versions (like 4.69). Where can I find this now? or this
is moved into some other file? Any one has the information on this?

Richi
Thanks for the update and yet to try out your changes. Today I was
trying to build your code (without latest SGX changes) using the
following steps

$ source build/envsetup.sh
$ lunch full_richi_panda-eng
$ make

but getting the following error.
"make: *** No rule to make target `out/host/linux-x86/framework/
jarjar.jar', needed by `out/target/common/obj/JAVA_LIBRARIES/
bouncycastle_intermediates/classes-jarjar.jar'. Stop."

-VH
On Jan 31, 2:20 pm, richi chen <richi.c...@gmail.com> wrote:
> > --->
> > BTW, the new SGX libs of omapzoom ics_mr1 branch  will cause some
> > problems, i'm looking at.
>
> >> ===> OK now, change to use  omapzoom kernel p-android-omap-3.0-4470<http://git.omapzoom.org/?p=kernel/omap.git;a=shortlog;h=refs/heads/p-...>
>
>  branch.
>
>
>
>
>
>
>
>
>
> >> Regards

richi chen

unread,
Feb 7, 2012, 10:25:31 AM2/7/12
to panda...@googlegroups.com
Hi VH,
Re-sync (repo sync), apply patches and make a clean build.

yuan chih hwang

unread,
Feb 14, 2012, 3:01:46 AM2/14/12
to pandaboard
Hello gad:
I have some questions about 3.(a).How to run the Linux
installer?

On 2月3日, 上午2時18分, gad.krumh...@gmail.com wrote:
> Guys, I got it working in ICS master branch fromAOSPwith minimal changes and a re-compiled kernel:
>
> 1) check out masterAOSP
> 2) add ti-wpan project from omapzoom (git://git.omapzoom.org/platform/hardware/ti/wpan.git) to hardware/ti/wpan
> 3) modify device/ti/panda/ as follows:
> a) add TIInit_7.2.31.bts firmware from pandroid project in TI gforge (https://gforge.ti.com/gf/download/frsrelease/567/4721/Bluetooth_WLAN_...) -- it's a linux installer, copy the firmware from the installed directory to ti/panda
> b) add android.hardware.bluetooth.xml from omapzoom blaze_tablet (http://git.omapzoom.org/?p=device/ti/blaze_tablet.git;a=blob;f=androi...)
> c) modify device.mk with:
> PRODUCT_COPY_FILES := device/ti/panda/TIInit_7.2.31.bts:system/etc/firmware/TIInit_7.2.31.bts \
>                       device/ti/panda/android.hardware.bluetooth.xml:system/etc/permissions/andro id.hardware.bluetooth.xml
> PRODUCT_PACKAGES := $(call inherit-product-if-exists, hardware/ti/wpan/ti-wpan-products.mk)
> d) modify BoardConfig.mk with:
> BOARD_HAVE_BLUETOOTH := true
> e) modify init.omap4pandaboard.rc with:
> # change permissions forBluetooth/FM/GPS
>        chmod 0600 /sys/class/rfkill/rfkill0/state
>        chownbluetoothbluetooth/sys/class/rfkill/rfkill0/state
>        chmod 0600 /dev/ttyO1
>        chownbluetoothbluetooth/dev/ttyO1
> #shared transport user space mgr service forBluetooth, FM and GPS
> service uim /system/bin/uim-sysfs
>        class core
>        userbluetooth
>        groupbluetoothnet_bt_admin
> f - IMPORTANT) re-compile kernel fromAOSP:https://android.googlesource.com/kernel/omap (branch remotes/origin/android-omap-panda-3.0) with the following:
>        1) make sure you copy the original defconfig from arch/arm/configs/panda_defconfig to .config in kernel root
>        2) make menuconfig with ARCH=arm
>        3) Networking Support->Bluetoothsubsystem support->
>           a) turn on L2CAP, SCO, RFCOMM (with tty), BNEP, and HIDP
>           b)Bluetoothdevice drivers-> make sure you have HCI UART (H4 protocol) and Texas Instruments WiLink7 driver enabled
>        4) exit and save
>        5) re-compile, use the zImage (not the uImage) and replace the kernel in ti/panda/kernel with it.
> 4) Re-compileAOSPwith new kernel, see if BT and wifi works :-D

Shantanu

unread,
Feb 20, 2012, 4:50:04 AM2/20/12
to pandaboard
I have incorporated your changes and Wifi is working fine now. The
problem of bluetooth still remains. It is giving IO error. The logcat
displays:
uim: Un-installed N_TI_WL Line displine.

also

uim: Install set to 1
uim: Cant open /dev/tty01

VH

unread,
Feb 21, 2012, 6:36:09 AM2/21/12
to pandaboard
Thanks to richi-chen and gad.krumh...@gmail.com.
I followed the steps given by gad.krumh...@gmail.com and following are
some of the important changes which may require (for me without these
changes Bluetooth didn't come up)

In the init.omap4pandaboard.rc I have modified the following

on boot
mount debugfs /sys/kernel/debug /sys/kernel/debug
chmod 0666 /dev/pvrsrvkm
chmod 0777 /dev/ttyO1 /* Added by me */
chmod 0777 /dev/tty*
chmod 0777 /dev/tty

and
service uim /system/bin/uim-sysfs
class core
user bluetooth
group bluetooth net_bt_admin
group bluetooth root /* Added by me. But not sure is this really
required or not. Yet to try without having this line */

After this Bluetooth is started working. I mean able to see the
devices, not yet tried file transfer options

-VH

Kushal

unread,
Mar 12, 2012, 4:41:51 AM3/12/12
to panda...@googlegroups.com
Hi VH,
Before I follow the whole thing and test it out, did u incorporate any other changes expect the few given in your post and the changes drafted by gad.krumh..@gmail.com??
Thanks in advance,
Kushal

VH

unread,
Mar 13, 2012, 8:24:49 AM3/13/12
to pandaboard
Kushal,

No I have not done any other changes. You need to download some of the
packages mentioned in the gad.krum...@gmail.com like wpan, proprietary-
open, zd1211

Regards
VH
On Mar 12, 1:41 pm, Kushal <kushalvora...@gmail.com> wrote:
> Hi VH,
> Before I follow the whole thing and test it out, did u incorporate any
> other changes expect the few given in your post and the changes drafted by
> gad.krum...@gmail.com??
> > > uim: Cant open /dev/tty01- Hide quoted text -
>
> - Show quoted text -

AlexV

unread,
Apr 18, 2012, 10:56:03 AM4/18/12
to panda...@googlegroups.com
Hi richi, 
Could you please describe what've you done to make physical media partition mount to /sdcard?

суббота, 21 января 2012 г., 14:18:44 UTC+3 пользователь richi chen написал:

richi chen

unread,
Apr 21, 2012, 5:15:36 AM4/21/12
to panda...@googlegroups.com
Hi AlexV,

if you use aosp's old u-boot loader(ex. device/ti/richi-panda/bootloader.bin) to format partitions (by 'fastboot oem format'), there will be a media partion created. You must manually format it to ext4. And add 

mount ext4 /dev/block/platform/omap/omap_hsmmc.0/by-name/media /data/media wait rw

in init.omap4pandaboard.rc to mount it. The /sdcard will be mounted to the media partion.


If you use new u-boot loader (ex. device/ti/richi-panda/u-boot.bin), there will be no media partion created. The /sdcard will be mounted to /data/media on userdata partion. Remember to adjust 
BOARD_USERDATAIMAGE_PARTITION_SIZE in BoardConfig.mk according to the size of userdata partion that the u-boot loader reported.


Good Luck,
richi

Pavan Savoy

unread,
Sep 11, 2012, 9:33:01 AM9/11/12
to panda...@googlegroups.com
On Mon, Sep 10, 2012 at 9:25 PM, <liuta...@gmail.com> wrote:
> Hi CJ,
>
> I have the same question with you now, I am obsessed bythis problem. Have
> you solved this question,could you tell me how?Thanks a lot!!!!!

the problem exists on almost all platforms.
Bluetooth enabler - the one that starts bluetoothd, hciattach does
rfkill doesn't necessarily wait for bluetoothd to setup dbus before
starting event-loop.

dbus also lacks a function which could sort of check existance of an
object on system bus... ideally we should have one..

try increasing the sleep time in get_adapter_path (usleep) to about
100ms... chances are that the dbus object is ready by the 2nd
iteration itself...

> 在 2012年7月4日星期三UTC+8下午3时02分23秒,CJ写道:
>>
>> Hi VH,
>>
>> I'm beginner on android porting.
>> I encounter the same problem about bluetooth proting too.
>> But my bt status different with you, i use ttyUSB0 to control non-ti
>> bluetooth module and linaro 12.01 release bsp source
>> As below informations are my encounter
>>
>> #dmesg
>> root@android:/ # bluetoothd -n
>> bluetoothd[974]: Bluetooth deamon 4.93
>> bluetoothd[974]: Unable to get on D-Bus
>>
>> #logcat
>> I/bluedroid( 182): Starting bluetoothd deamon
>> E/BluetoothEventLoop.cpp( 182): get_adapter_path: D-Bus error:
>> org.freedesktop.DBus.Error.ServiceUnknown (The name org.bluez was not
>> provided by any .service files)
>> E/BluetoothEventLoop.cpp( 182): get_adapter_path: D-Bus error:
>> org.freedesktop.DBus.Error.ServiceUnknown (The name org.bluez was not
>> provided by any .service files)
>> E/BluetoothEventLoop.cpp( 182): get_adapter_path: D-Bus error:
>> org.freedesktop.DBus.Error.ServiceUnknown (The name org.bluez was not
>> provided by any .service files)
>> E/BluetoothEventLoop.cpp( 182): get_adapter_path: D-Bus error:
>> org.bluez.Error.NoSuchAdapter (No such adapter)
>> E/BluetoothEventLoop.cpp( 182): failure setting up Event Loop!
>> E/BluetoothService.cpp( 182): setBluetoothTetheringNative true
>> D/BluetoothEventLoop( 182): Property Changed: Pairable : false
>> D/BluetoothEventLoop( 182): Property Changed: Powered : false
>> D/BluetoothEventLoop( 182): Property Changed: UUIDs : 6
>> D/BluetoothEventLoop( 182): Property Changed: UUIDs : 7
>> D/BluetoothEventLoop( 182): Property Changed: UUIDs : 8
>> D/BluetoothAdapterStateMachine( 182): WarmUp process message: 101
>> D/BluetoothAdapterStateMachine( 182): WarmUp process message: 54
>> D/BluetoothAdapterStateMachine( 182): WarmUp process message: 51
>> D/BluetoothAdapterStateMachine( 182): HotOff process message: 101
>>
>> Could you provide more information for me?
>> Thanks
>>
>> VH於 2012年2月21日星期二UTC+8下午7時36分09秒寫道:
--
--Pavan Savoy

Pavan Savoy

unread,
Jan 4, 2013, 11:54:05 AM1/4/13
to panda...@googlegroups.com

Can you make sure you have uim-sysfs running when you see that error? May be on certain boot android AFS isn't starting services? Or restarting due to some error?

Droid sent - Ignore typos

On Jan 4, 2013 10:36 AM, <prasannak...@gmail.com> wrote:
Pavan

Am booting ICS chipsee linaro release on pandaboard

Bluetooth was working well . Now its  not getting registered. which left me with


[    9.839538] (stk) :ldisc_install = 1
[   10.834381] (stk) :line disc installation timed out
[   10.834381] (stk) :ldisc_install = 0
[   11.987152] (stk) :ldisc_install = 1
[   12.991363] (stk) :line disc installation timed out
[   12.991363] (stk) :ldisc_install = 0
[   14.122558] (stk) :ldisc_install = 1
[   15.127258] (stk) :line disc installation timed out
[   15.132537] (stk) :ldisc_install = 0
[   16.280090] (stk) :ldisc_install = 1
[   17.289733] (stk) :line disc installation timed out
[   17.295104] (stk) :ldisc_install = 0
[   18.400573] (stk) :ldisc_install = 1
[   19.398590] (stk) :line disc installation timed out
[   19.403991] (stk) :ldisc_install = 0
[   20.481597] Bluetooth: st_register failed -22

When I reboot some time later it sometimes turns on .

Now its not turning on .
What possibly could be the bug?


Regards
prasanna

Pavan Savoy

unread,
Jan 7, 2013, 2:58:48 PM1/7/13
to panda...@googlegroups.com

0x04 is the Bluetooth response event's first byte. The response should include baud rate change ack or firmware version.

Droid sent - Ignore typos

On Jan 7, 2013 8:13 AM, <prasannak...@gmail.com> wrote:
Also ti_st_uim-sysfs_uim.c says
UIM_VER(" read_hci_event");
    if (size <= 0)
        return -1;
    /* The first byte identifies the packet type. For HCI event packets, it
     * should be 0x04, so we read until we get to the 0x04. */

    while (reading) {
        rd = read(fd, buf, 1);
        if (rd <= 0 && rd_retry_count++ < 4) {
            nanosleep(&tm, NULL);
            continue;
        } else if (rd_retry_count >= 4) {
            return -1;
        }

        if (buf[0] == RESP_PREFIX) {
            break;
        }
    }
so what actually Does it read until 0x04 ? from where does this buffer written  from ?
Reply all
Reply to author
Forward
0 new messages