Android now uses the rfkill interface to turn on/off bluetooth as you have
discovered. It looks for a type of "bluetooth" in each of the rfkill
interfaces (/sys/class/rfkill/rfkill*/type). You need to have kernel support
for this to work as devices should be powering on/off with it. It is the
exact same thing that the bttest is doing, but you say you've hacked that
check out. Yes, the UI uses libbluedroid in the same manner.

rfkill has to do the right thing in the kernel. What are you using? zoom2?
If so, then you have to use the rfkill. The bluetooth isn't normally powered
up. One thing you can test is doing the hciattach by hand from the console.
Try:

start hcid
hciattach -n /dev/ttyS1 texas 115200

See what hciattach says. You can also try

hcitool dev

to make sure you have the bluetooth device created.

If you are using something else, then you need to figure out how to power up
the bluetooth device and get the hciattach to work.

Sean

On Thu, Mar 12, 2009 at 11:00 PM, Androidphan <niels.kee...@tass.nl> wrote:

>
> I would like to know this too. How does the Android UI turn on
> Bluetooth.
>
> My bttest enable gives 0 and bttest is_enabled gives 1. The UI from
> Android doesn't use libbluedroid for checking this?
>
> On 11 mrt, 09:57, NickS <lzh20044...@163.com> wrote:
> > Hi:
> >   On my Netbook
> > $bttestenable
> > enable
> > =0
> >
> > command hciconfig -a and hcitool scan can get information of device.
> > But turn on from UI, there's no any response. it's why? have no any
> > idea. i don't want to analyze from app of UI.  I skiped rfkill in
> > bluetooth.c,because my platform have no use it. I think I have started
> > services about bluetooth. follow my init.rc
> >     chmod 0660 /dev/ttyS1
> >     chown bluetooth bluetooth /dev/ttyS1
> > service dbus /system/bin/dbus-daemon --system --nofork
> >     socket dbus stream 660 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
> >     group bluetooth net_bt_admin misc
> >     disabled
> >     oneshot
> > service hciattach /system/bin/hciattach -n /dev/ttyS1 texas 115200
> >     user bluetooth
> >     group bluetooth net_bt_admin misc
> >     disabled
> >     oneshot
> > service hfag /system/bin/sdptool add --channel=10 HFAG
> >     user bluetooth
> >     group bluetooth net_bt_admin
> >     disabled
> >     oneshot
> > Please help me?
> >
> > Thanks
> > Best Regards!
> >
>

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

Reply via email to