Hi, When I run hciattach via logwrapper, with user bluetooth, it has some problem, I cannot see log messages either, It juts shows... I//system/bin/hciattach: hciattach[817]: C
what does this mean ? What does 817 mean ? How can I debug this ? I doubt it could be problem with permissions to directory /lib which is a sym link to /system/lib which has the firmware for my manufacturer & also /dev/ttyS1, PS: I can run hciattach with or without logwrapper as user root, i.e not bluetooth, by commenting out the line #user bluetooth in init.rc please help me resolve this. Thanks & Regards, Pavan Savoy. On Wed, Nov 19, 2008 at 7:30 AM, pavan savoy <[EMAIL PROTECTED]> wrote: > Hi, > > Yes, Its already running, actually I am having problems running it as user > bluetooth, root user seems to run fine, > I have given an 777 permission to /dev/ttyS1 and also the firmware files > that my hciattach uses, still I face this issue. > > > Thanks & Regards, > Pavan Savoy > > > On Wed, Nov 19, 2008 at 6:21 AM, Colin Lee <[EMAIL PROTECTED]> wrote: > >> Did you run dbus-daemon in your system? >> hcid uses dbus interface to communicate with UI. >> >> 2008/11/19 pavan savoy <[EMAIL PROTECTED]> >> >>> Ok, Thanks, It worked, now I am running hciattach as root and without >>> logwrapper, but the problem.. >>> >>> # I/bluedroid( 665): Starting hciattach daemon >>> I/bluetooth_ScoSocket.cpp( 705): Listening SCO socket... >>> E/bluetooth_common.cpp( 665): dbus_func_args_timeout_valist: D-Bus error >>> in GetName: org.freedesktop.DBus.Error.NoMemory >>> (Not enough memory) >>> I//system/bin/hcid( 658): hcid[659]: Default passkey agent (:1.1, >>> /android/bluetooth/PasskeyAgent) registered >>> E/bluetooth_common.cpp( 665): dbus_func_args_timeout_valist: D-Bus error >>> in ListBondings: org.freedesktop.DBus.Error.Unkn >>> ownMethod (Method "ListBondings" with signature "" on interface >>> "org.bluez.Adapter" doesn't exist >>> E/bluetooth_common.cpp( 665): ) >>> E/BluetoothDeviceService.cpp( 665): startDiscoveryNative: D-Bus error: >>> org.freedesktop.DBus.Error.UnknownMethod (Method " >>> DiscoverDevices" with signature "" on interface "org.bluez.Adapter" >>> doesn't exist >>> >>> Still exists which causes the discover_devices not to be called. Although >>> my #hciconfig does suggest the scan mode reflect what I set in the UI. >>> >>> ** Almost there .....so near yet so far.. >>> >>> Thanks & Regards, >>> Pavan Savoy. >>> >>> On Tue, Nov 18, 2008 at 2:08 PM, Nick Pelly <[EMAIL PROTECTED]>wrote: >>> >>>> >>>> >>>> On Tue, Nov 18, 2008 at 2:04 PM, pavan savoy <[EMAIL PROTECTED]>wrote: >>>> >>>>> Ok, Looking into it.. Still not solved, >>>>> a #start hciattach on command line returns me just a character "C", >>>>> whereas the same command with or without >>>>> logwrapper runs smoothly even registers with the hcid. >>>>> >>>> >>>> Just for kicks try removing logwrapper from init.rc for hciattach and >>>> see if it works. I remember once logwrapper causing troubles for hciattach >>>> when run via init.rc but I was never able to pinpoint the problem. >>>> >>>> >>>>> >>>>> Also was the build error valid, or something wrong with my local >>>>> version? >>>>> >>>> >>>> It is probably valid, I'm hoping to verify and submit a fix soon. >>>> >>>> >>>>> >>>>> Thanks & Regards, >>>>> Pavan Savoy. >>>>> >>>>> On Tue, Nov 18, 2008 at 1:52 PM, Nick Pelly <[EMAIL PROTECTED]>wrote: >>>>> >>>>>> >>>>>> >>>>>> On Tue, Nov 18, 2008 at 1:48 PM, pavan savoy <[EMAIL PROTECTED]>wrote: >>>>>> >>>>>>> Yeah, couple of silly mistakes, the hcid, said >>>>>>> /system/etc/bluez/hcid.conf where it should have said >>>>>>> /system/etc/hcid.conf, >>>>>>> Ok now the hcid is running, >>>>>>> >>>>>>> However I still get the error, because I dont think the hciattach is >>>>>>> able to start, although If I run the same command through command line >>>>>>> /console it starts off ok. >>>>>>> >>>>>>> Wonder whether these lines in "init.rc" are correct... >>>>>>> >>>>>>> #pavan -- changed >>>>>>> service hciattach /system/bin/logwrapper /system/bin/hciattach >>>>>>> /dev/ttyS1 my_manufacturer 115200 >>>>>>> user bluetooth >>>>>>> group bluetooth net_bt_admin misc >>>>>>> disabled >>>>>>> oneshot >>>>>>> and when I run from console, it runs as root. Also have already tried >>>>>>> out removing the user bluetooth line to start as root... >>>>>>> >>>>>> >>>>>> Seems ok. >>>>>> >>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Tue, Nov 18, 2008 at 12:58 PM, Nick Pelly <[EMAIL PROTECTED]>wrote: >>>>>>> >>>>>>>> Sounds like hcid is not running. >>>>>>>> >>>>>>>> To diagnose why, try changing running hcid with -d and via >>>>>>>> logwrapper to pipe its output into logcat. For example, in init.rc: >>>>>>>> >>>>>>>> service hcid /system/bin/logwrapper /system/bin/hcid -d ... >>>>>>>> >>>>>>>> Another tip, to quickly turn on some verbose logging of the >>>>>>>> bluetooth JNI try >>>>>>>> #define LOG_NDEBUG 0 >>>>>>>> in android_bluetooth_common.h >>>>>>>> >>>>>>>> Nick >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Tue, Nov 18, 2008 at 12:52 PM, pavan savoy < >>>>>>>> [EMAIL PROTECTED]> wrote: >>>>>>>> >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> # E/BluetoothDevice( 784): BT_DBG: enable Called >>>>>>>>> E/BluetoothDeviceService( 656): enableNative will be called now... >>>>>>>>> E/BluetoothDeviceService.cpp( 656): BT_DBG bt_enable will be >>>>>>>>> called now... >>>>>>>>> E/BluetoothDeviceService.cpp( 656): BT_DBG bt_enable will be >>>>>>>>> called now... >>>>>>>>> I/bluedroid( 656): Starting hcid deamon >>>>>>>>> E/BluetoothDeviceService( 656): BT_DBG inside >>>>>>>>> BluetoothDeviceService->enable >>>>>>>>> I/bluedroid( 656): Starting hciattach daemon >>>>>>>>> I/bluetooth_ScoSocket.cpp( 695): Listening SCO socket... >>>>>>>>> E/bluetooth_common.cpp( 656): dbus_func_args_timeout_valist: D-Bus >>>>>>>>> error in GetName: org.freedesktop.DBus.Error.NoMemory >>>>>>>>> (Not enough memory) >>>>>>>>> E/bluetooth_common.cpp( 656): dbus_func_args_timeout_valist: D-Bus >>>>>>>>> error in ListBondings: org.freedesktop.DBus.Error.Unkn >>>>>>>>> ownMethod (Method "ListBondings" with signature "" on interface >>>>>>>>> "org.bluez.Adapter" doesn't exist >>>>>>>>> E/bluetooth_common.cpp( 656): ) >>>>>>>>> E/BluetoothDeviceService.cpp( 656): startDiscoveryNative: D-Bus >>>>>>>>> error: org.freedesktop.DBus.Error.UnknownMethod (Method " >>>>>>>>> DiscoverDevices" with signature "" on interface "org.bluez.Adapter" >>>>>>>>> doesn't exist >>>>>>>>> >>>>>>>>> >>>>>>>>> What does this error mean ? >>>>>>>>> Why isn't org.bluez.Adapter recognised ?? >>>>>>>>> >>>>>>>>> Please suggest. >>>>>>>>> >>>>>>>>> Thanks & Regards, >>>>>>>>> Pavan Savoy. >>>>>>>>> >>>>>>>>> On Tue, Nov 18, 2008 at 10:15 AM, pavan savoy < >>>>>>>>> [EMAIL PROTECTED]> wrote: >>>>>>>>> >>>>>>>>>> This went into the system/bluetooth/bluedroid/Android.mk file >>>>>>>>>> >>>>>>>>>> -- Android.mk 2008-11-18 11:51:19.000000000 -0600 >>>>>>>>>> +++ Android.mk.new 2008-11-18 11:51:57.000000000 -0600 >>>>>>>>>> @@ -12,7 +12,8 @@ >>>>>>>>>> bluetooth.c >>>>>>>>>> >>>>>>>>>> LOCAL_C_INCLUDES := \ >>>>>>>>>> - $(call include-path-for, bluez-libs) >>>>>>>>>> + $(call include-path-for, bluez-libs)\ >>>>>>>>>> + $(LOCAL_PATH)/include >>>>>>>>>> LOCAL_SHARED_LIBRARIES := \ >>>>>>>>>> libcutils >>>>>>>>>> >>>>>>>>>> This went into the frameworks/base/core/jni/Android.mk file... >>>>>>>>>> --- Android.mk 2008-11-18 11:53:25.000000000 -0600 >>>>>>>>>> +++ Android.mk.new 2008-11-18 11:53:55.000000000 -0600 >>>>>>>>>> @@ -146,7 +146,9 @@ >>>>>>>>>> ifeq ($(BOARD_HAVE_BLUETOOTH),true) >>>>>>>>>> LOCAL_C_INCLUDES += \ >>>>>>>>>> external/dbus \ >>>>>>>>>> - external/bluez/libs/include >>>>>>>>>> + external/bluez/libs/include \ >>>>>>>>>> + system/bluetooth/bluedroid/include >>>>>>>>>> + >>>>>>>>>> LOCAL_CFLAGS += -DHAVE_BLUETOOTH >>>>>>>>>> LOCAL_SHARED_LIBRARIES += libbluedroid libdbus >>>>>>>>>> endif >>>>>>>>>> Please respond back, as to whether this really is a problem, >>>>>>>>>> >>>>>>>>>> Thanks & Regards, >>>>>>>>>> Pavan Savoy. >>>>>>>>>> >>>>>>>>>> On Tue, Nov 18, 2008 at 9:38 AM, pavan savoy < >>>>>>>>>> [EMAIL PROTECTED]> wrote: >>>>>>>>>> >>>>>>>>>>> Nick, >>>>>>>>>>> >>>>>>>>>>> I would have sent a patch, but my problems with bluetooth build >>>>>>>>>>> is just beginning, I am having problems in Android.mk of >>>>>>>>>>> android_server_BluetoothDevice*, and having problems with dbus, of >>>>>>>>>>> which I >>>>>>>>>>> am yet to find a solution. >>>>>>>>>>> >>>>>>>>>>> I would be lucky If I could send you a patch by tonight for all >>>>>>>>>>> these build issues. >>>>>>>>>>> >>>>>>>>>>> However I wanted to confirm that it is happening, can you please >>>>>>>>>>> confirm me that it is a build issue. I've just added >>>>>>>>>>> BOARD_HAVE_BLUETOOTH >>>>>>>>>>> and everything gone beserk. >>>>>>>>>>> >>>>>>>>>>> I certainly tested it with a earlier version of code and never >>>>>>>>>>> faced this issue. Please respond on this. >>>>>>>>>>> >>>>>>>>>>> Thanks & Regards, >>>>>>>>>>> Pavan Savoy >>>>>>>>>>> >>>>>>>>>>> On Tue, Nov 18, 2008 at 9:23 AM, Nick Pelly <[EMAIL PROTECTED] >>>>>>>>>>> > wrote: >>>>>>>>>>> >>>>>>>>>>>> Can you send a patch? >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Tue, Nov 18, 2008 at 8:51 AM, pavan savoy < >>>>>>>>>>>> [EMAIL PROTECTED]> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Hi, >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> I got a bluetooth build error. The bluedroid library doesn't >>>>>>>>>>>>> find bluetooth.h which is inside include/bluedroid/ so the >>>>>>>>>>>>> LOCAL_C_INCLUDES >>>>>>>>>>>>> for bluedroid should also include the line.. >>>>>>>>>>>>> $(LOCAL_PATH)/include/ >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks & Regards, >>>>>>>>>>>>> Pavan Savoy. >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >>> >>> >>> >>> >>> > --~--~---------~--~----~------------~-------~--~----~ unsubscribe: [EMAIL PROTECTED] website: http://groups.google.com/group/android-porting -~----------~----~----~----~------~----~------~--~---