Dear Nick:
   Thanks for your help, very joyfully. i think the real reason puzzled me is  
the state's path of bluetooth device. skip rfkill, where is the path. i look 
somebody use follow method:
...
#define USE_UGLY_POWER_INTERFACE 1
#if USE_UGLY_POWER_INTERFACE
#define BLUETOOTH_POWER_PATH 
"/sys/module/board_trout/parameters/bluetooth_power_on"
... 
but it's what? the board_trout, under my /sys/module/ , no have it
I'm a novice to bluetooth. Now bluez is ok, I can get device info by execute 
`hcitool scan` with console. but bluetooth's UI have any response, it can't 
control bluetooth. I think I have started associative services. 
chmod 0660 /dev/ttyS1
     chown bluetooth bluetooth /dev/ttyS1
     chmod 0660 sys/class/rfkill/rfkill0/state
     chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
     write sys/class/rfkill/rfkill0/state 0
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
Thanks
Best Reards!
--NickS (from NaJin of China)



在2009-03-10,"Nick Pelly" <[email protected]> 写道:
>
>On Mon, Mar 9, 2009 at 11:08 PM, NickS <[email protected]> wrote:
>>
>> Thanks your help, Nick, I had built libbluedroid.so. Now I want to run
>> bluetooth from UI and in system/bluetooth/bluedroid/bluetooth.c,
>> asprintf(&rfkill_state_path, "/sys/class/rfkill/rfkill%d/state",
>> rfkill_id); can get the path of state, but when I running Android on
>> NetBook, my /sys/class/rfkill/ is null, ?I have no idea about the path
>> of state. What can I do for run bluetooth from UI?
>
>
>Ok so your platform does not use rfkill for Bluetooth power on/off? If
>it uses something else you should probably switch to rfkill - it is
>very easy. See board-trout-rfkill.c for an example.
>
>If you do not need any userspace Bluetooth power switch then we can
>skip all the rfkill stuff in bluetooth.c. I would take a patch that
>skips rfkill if a bluetooth rfkill node does not exist.
>
>Nick
>
>>

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to