Add new bluetooth DBUS API on android application framework.

736 views
Skip to first unread message

dracoid4

unread,
Nov 13, 2009, 5:21:21 AM11/13/09
to 0xlab-devel
I currently looking into adding new API from various portion eg SDP,
PPPD and PAND for bluetooth onto JNI Android Application Framework and
develop an bluetooth android application on them. I am a bit lost of
how to do it.

My progress so far is able to run all the bluez util from the console.
My current understanding is
1) Create D-BUS interface for SDP, PPPD and PAND in C/C++
2) Create Java class for the interface with native call
3) Generate JNI - C++ header from Java class from 2)
4) Using C++ header and implemented those native interface to call D-
BUS interface

The application part is still unclear to me at the moment. I thought
of using SDK which means I have to find a way to expose the android
bluetooth java as a seperate jar or on android.jar

Hope some one can point me to some direction with example of similar
implementation. Thanks.

Erin Yueh

unread,
Nov 15, 2009, 10:36:06 AM11/15/09
to 0xlab...@googlegroups.com
Hi there,

On Fri, Nov 13, 2009 at 18:21, dracoid4 <drac...@gmail.com> wrote:
> I currently looking into adding new API from various portion eg SDP,
> PPPD and PAND for bluetooth onto JNI Android Application Framework and
> develop an bluetooth android application on them. I am a bit lost of
> how to do it.
>

If you are looking for some Bluetooth UI application, you may check
the source code from Aurora forum[1]. I was working on make it running
in Android Dev phone. It's about Bluetooth OBEX functions and I am
using obexd[2] for dbus connections.

> My progress so far is able to run all the bluez util from the console.
> My current understanding is
> 1) Create D-BUS interface for SDP, PPPD and PAND in C/C++
> 2) Create Java class for the interface with native call
> 3) Generate JNI - C++ header from Java class from 2)
> 4) Using C++ header and implemented those native interface to call D-
> BUS interface
>

You could check obexd code and it's about creating D-BUS interface for
SDP in C. Also, check some bluetooth code in
/frameworks/base/core/jni[3], and it's about JNI and D-BUS
connections.

I didn't merged these code to 0xdroid project yet, since it's for
Beagle board. I only verified it in Android phone and I am going to
check-in the code after I verify it in Beagle board. BTW, what is your
platform? If you have G1, you can download a Cyangenmod[4] ROM image
from community. They put this Bluetooth UI application[5] inside.

[1] https://www.codeaurora.org/gitweb/quic/la/
[2] http://gitorious.org/android-obex/obexd
[3] https://www.codeaurora.org/gitweb/quic/la/?p=platform/frameworks/base.git;a=shortlog;h=refs/heads/donut_glazed
[4] http://www.cyanogenmod.com/
[5] http://i-miss-erin.blogspot.com/2009/10/android-bluetooth-ui-application-from.html

Regards,
Erin Yueh
http://0xlab.org

dracoid4

unread,
Nov 15, 2009, 10:55:31 PM11/15/09
to 0xlab-devel
Hi Erin Yueh, can you copy and paste my reply to you. I press wrongly
on my reply. Intend to put it on the forum. Thanks

On Nov 15, 11:36 pm, Erin Yueh <eriny...@gmail.com> wrote:
> Hi there,
>
> [3]https://www.codeaurora.org/gitweb/quic/la/?p=platform/frameworks/base...
> [4]http://www.cyanogenmod.com/
> [5]http://i-miss-erin.blogspot.com/2009/10/android-bluetooth-ui-applicat...
>
> Regards,
> Erin Yuehhttp://0xlab.org

Erin Yueh

unread,
Nov 15, 2009, 11:04:57 PM11/15/09
to 0xlab...@googlegroups.com
FYI...

On Mon, Nov 16, 2009 at 11:16, dracoid4 <drac...@gmail.com> wrote:
> Hi Erin,
>
> Yah I saw your work at your blog. It is fantanstic. I currently
> working on a netbook enivronment.
> Try to create DUN and PANU connection to a nokia N95 and Apple iPhone
> respectively for internet access
>
> For DUN connection to N95:
> 1) Paired the N95 with my android device using the Bluetooth setting
> 2) rfcomm bind 0 <N95 BDadd> 2
> 3) Use pppd and chat (this was put in by me under the android source)
> to do the dial up with APN, dial number, username and password of the
> telco.
>
> For PANU connection to Apple iPhone
> 1) Paired the Apple iPhone with my android device using the Bluetooth
> setting
> 2) pand --connect <iPhone BDadd>
> 3) dhcpcd -d bnep0
> 4) setprop net.dns1 and dns2 with telco respective DNS.
>
> Both are done using the Linux kernel console and command line.  I want
> to translate it to a GUI application on android level. Having issue
> where to start it. eg identifying the API for the rfcomm, pppd, chat
> (to send AT command), pand, dhcpcd and dns.
>
> [2]http://gitorious.org/android-obex/obexd, can you stated the name of
> the src file that I should be looking at. Thanks.
>
> Regards
> Chris
>
> On Nov 15, 11:36 pm, Erin Yueh <eriny...@gmail.com> wrote:
>> Hi there,
>> [3]https://www.codeaurora.org/gitweb/quic/la/?p=platform/frameworks/base...
>> [4]http://www.cyanogenmod.com/

Erin Yueh

unread,
Nov 16, 2009, 11:42:12 PM11/16/09
to 0xlab...@googlegroups.com
Hi Chris,

On Mon, Nov 16, 2009 at 11:16, dracoid4 <drac...@gmail.com> wrote:
> Hi Erin,
>
> Yah I saw your work at your blog. It is fantanstic. I currently
> working on a netbook enivronment.

Thanks! you are welcome. You are using Android x86? Like asus EeePc?

> Try to create DUN and PANU connection to a nokia N95 and Apple iPhone
> respectively for internet access
>
That is cool! You are trying to connect all of them and you could
learn from different platforms!

[...]
> Both are done using the Linux kernel console and command line.  I want
> to translate it to a GUI application on android level. Having issue
> where to start it. eg identifying the API for the rfcomm, pppd, chat
> (to send AT command), pand, dhcpcd and dns.
>
> [2]http://gitorious.org/android-obex/obexd, can you stated the name of
> the src file that I should be looking at. Thanks.
>

If you are trying to set up the network in bluetooth, you may read
bluez wiki site. It's a really great site with a lot of examples and
architecture images. BTW, you are using bluez version 3.36, right?
since dbus API is different from version 3.0 to version 4.0.

bluez network wiki website
http://wiki.bluez.org/wiki/Network

bluez network d-bus api document
http://bluez.cvs.sourceforge.net/*checkout*/bluez/utils/network/network-api.txt

network connection examples
http://wiki.bluez.org/wiki/HOWTO/NetworkConnections

When we try to set up a network connection in bluez, we can send this
dbus method as below:
$dbus-send --system --type=method_call --print-reply --dest=":X.Y"
/org/bluez/network org.bluez.network.Manager.CreateConnection
string:"XX:XX:XX:XX:XX:XX" string:nap

If I use OBEX for example, it would like 'CreateSession' in obexd. You
can trace the related code in obexd, frameworks, and bluetooth UI
application. Then you will find it's triggered from UI application,
then to frameworks, it would send a dbus method call, then arrive to
obex-client. After tracing the code, we probably could know what the
work flow is.

dracoid4

unread,
Nov 19, 2009, 9:51:56 PM11/19/09
to 0xlab-devel
I tried both the dbus command from serial and network of bluez dbus
but got errors on them.

For DUN connection:

dbus-send --system --type=method_call --print-reply --dest=org.bluez /
org/bluez/serial org.bluez.serial.Manager.ConnectService string:
00:12:34:56:78:9A string:dun

Error: Error org.freedesktop.DBus.Error.UnknownMethod: Method
"ConnectService" with signature "ss" on interface
"org.bluez.serial.Manager" doesn't exist

and PANU conneciton:

dbus-send --system --type=method_call --print-reply --dest=org.bluez /
org/bluez/network org.bluez.network.Manager.CreateConnection string:
00:12:34:56:78:9A string:nap

Error: Error org.freedesktop.DBus.Error.UnknownMethod: Method
"CreateConnection" with signature "ss" on interface
"org.bluez.network.Manager" doesn't exist

I also try to activate the service using

DUN connection:
dbus-send --system --type=method_call --print-reply --dest=org.bluez /
org/bluez org.bluez.Manager.ActivateService string:serial

PANU connection:
dbus-send --system --type=method_call --print-reply --dest=org.bluez /
org/bluez org.bluez.Manager.ActivateService string:network

But got error: Error org.bluez.Error.NoSuchService: No such service

Did I missed out some configuration?

On Nov 17, 12:42 pm, Erin Yueh <eriny...@gmail.com> wrote:
> Hi Chris,
>
> On Mon, Nov 16, 2009 at 11:16, dracoid4 <draco...@gmail.com> wrote:
> > Hi Erin,
>
> > Yah I saw your work at your blog. It is fantanstic. I currently
> > working on a netbook enivronment.
>
> Thanks! you are welcome. You are using Android x86? Like asus EeePc?
>
> > Try to create DUN and PANU connection to a nokia N95 and Apple iPhone
> > respectively for internet access
>
> That is cool! You are trying to connect all of them and you could
> learn from different platforms!
>
> [...]
>
> > Both are done using the Linux kernel console and command line.  I want
> > to translate it to a GUI application on android level. Having issue
> > where to start it. eg identifying the API for the rfcomm, pppd, chat
> > (to send AT command), pand, dhcpcd and dns.
>
> > [2]http://gitorious.org/android-obex/obexd, can you stated the name of
> > the src file that I should be looking at. Thanks.
>
> If you are trying to set up the network in bluetooth, you may read
> bluez wiki site. It's a really great site with a lot of examples and
> architecture images. BTW, you are using bluez version 3.36, right?
> since dbus API is different from version 3.0 to version 4.0.
>
> bluez network wiki websitehttp://wiki.bluez.org/wiki/Network
>
> bluez network d-bus api documenthttp://bluez.cvs.sourceforge.net/*checkout*/bluez/utils/network/netwo...
>
> network connection exampleshttp://wiki.bluez.org/wiki/HOWTO/NetworkConnections

Erin Yueh

unread,
Nov 23, 2009, 5:22:32 AM11/23/09
to 0xlab...@googlegroups.com
Hi,

On Fri, Nov 20, 2009 at 10:51, dracoid4 <drac...@gmail.com> wrote:
> I tried both the dbus command from serial and network of bluez dbus
> but got errors on them.
>
[....]
>
> I also try to activate the service using
>
> DUN connection:
> dbus-send --system --type=method_call --print-reply --dest=org.bluez /
> org/bluez org.bluez.Manager.ActivateService string:serial
>
> PANU connection:
> dbus-send --system --type=method_call --print-reply --dest=org.bluez /
> org/bluez org.bluez.Manager.ActivateService string:network
>
> But got error: Error org.bluez.Error.NoSuchService: No such service
>
> Did I missed out some configuration?
>

I guess it's network service not initialized in bluez problem. If you
look at bluez/utils/network or bluez/utils/serial source code in
Android, you would find it's not built in. You cannot see network.conf
in /etc/bluez/ folder either. Therefore, you cannot activate 'network'
or 'serial' service in bluez.

Erin Yueh

unread,
Nov 23, 2009, 9:17:08 PM11/23/09
to 0xlab...@googlegroups.com
Hi,

On Mon, Nov 23, 2009 at 18:22, Erin Yueh <erin...@gmail.com> wrote:
> Hi,
>
> On Fri, Nov 20, 2009 at 10:51, dracoid4 <drac...@gmail.com> wrote:
>> I tried both the dbus command from serial and network of bluez dbus
>> but got errors on them.
>>
[...]
>>
>> PANU connection:
>> dbus-send --system --type=method_call --print-reply --dest=org.bluez /
>> org/bluez org.bluez.Manager.ActivateService string:network
>>
>> But got error: Error org.bluez.Error.NoSuchService: No such service
>>
For your information, I just built a network.so plug-in from
"/bluez/utils/network" and put it to Android Dev phone. Then I sent
some dbus-send methods and it can activate network service now. It
still has things to do, if you'd like to use dbus api for DUN and PANU
connections.

# dbus-send --system --type=method_call --print-reply --dest=org.bluez \
> /org/bluez org.bluez.Manager.ActivateService string:network
method return sender=:1.9 -> dest=:1.10
string "org.bluez"

# dbus-send --system --type=method_call --print-reply --dest=org.bluez \
> /org/bluez/network org.freedesktop.DBus.Introspectable.Introspect
method return sender=:1.9 -> dest=:1.15
string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object
Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/org/bluez/network">
<interface name="org.bluez.network.Manager">
<method name="ListServers">
<arg type="as" direction="out"/>
</method>
<method name="FindServer">
<arg type="s" direction="in"/>
<arg type="s" direction="out"/>
</method>
<method name="ListConnections">
<arg type="as" direction="out"/>
</method>
<method name="FindConnection">
<arg type="s" direction="in"/>
<arg type="s" direction="out"/>
</method>
<method name="CreateConnection">
<arg type="s" direction="in"/>
<arg type="s" direction="in"/>
<arg type="s" direction="out"/>
</method>
<method name="RemoveConnection">
<arg type="s" direction="in"/>
</method>
<method name="LastConnection">
<arg type="s" direction="out"/>
</method>
<method name="DefaultConnection">
<arg type="s" direction="out"/>
</method>
<method name="ChangeDefaultConnection">
<arg type="s" direction="in"/>
<arg type="s" direction="out"/>
</method>
<signal name="ConnectionCreated">
<arg type="s"/>
</signal>
<signal name="ConnectionRemoved">
<arg type="s"/>
</signal>
<signal name="DefaultConnectionChanged">
<arg type="s"/>
</signal>
</interface>
<node name="gn"/>
<node name="nap"/>
<node name="panu"/>
</node>

dracoid4

unread,
Nov 24, 2009, 1:15:29 AM11/24/09
to 0xlab-devel
How you built a network.so plug-in from "/bluez/utils/network" and
where you put it to in the Android Dev phone?

On Nov 24, 10:17 am, Erin Yueh <eriny...@gmail.com> wrote:
> Hi,
>
> On Mon, Nov 23, 2009 at 18:22, Erin Yueh <eriny...@gmail.com> wrote:
> > Hi,
>

Erin Yueh

unread,
Nov 24, 2009, 1:37:48 AM11/24/09
to 0xlab...@googlegroups.com
Hi,

On Tue, Nov 24, 2009 at 14:15, dracoid4 <drac...@gmail.com> wrote:
> How you  built a network.so plug-in from "/bluez/utils/network" and
> where you put it to in the Android Dev phone?
>

Write an "Android.mk" file and it's a Makefile for Android building
system. You can find a lot of these files in Android source code. I
put network.so to "/system/lib/bluez-plugin". When you build from
Android building environment, it would generate to related folder.
Then you can upload them to same folder in Android device.

eg. compile /bluez/utils/hcid, it would generate two files as below:
Install: out/target/product/dream-open/system/lib/libhcid.so
Install: out/target/product/dream-open/system/bin/hcid

then we can upload libhcid.so to /system/lib/ and upload hcid to /system/bin.

dracoid4

unread,
Dec 2, 2009, 5:02:44 AM12/2/09
to 0xlab-devel
Can you share out the Android.mk makefile? I got some errors and
warning from common.c and connection.c as follow:
external/bluez/utils/network/common.c:64: warning: missing initializer
external/bluez/utils/network/common.c:64: warning: (near
initialization for '__svc[3].uuid128')
external/bluez/utils/network/common.c: In function
'bnep_kill_all_connections':
external/bluez/utils/network/common.c:196: warning: comparison between
signed and unsigned
external/bluez/utils/network/common.c: In function 'bnep_if_down':
external/bluez/utils/network/common.c:352: warning: implicit
declaration of function 'kill'
external/bluez/utils/network/common.c:352: error: 'SIGTERM' undeclared
(first use in this function)
external/bluez/utils/network/common.c:352: error: (Each undeclared
identifier is reported only once
external/bluez/utils/network/common.c:352: error: for each function it
appears in.)
external/bluez/utils/network/connection.c:511: warning: missing
initializer
external/bluez/utils/network/connection.c:511: warning: (near
initialization for 'connection_methods[0].flags')
external/bluez/utils/network/connection.c:512: warning: missing
initializer
external/bluez/utils/network/connection.c:512: warning: (near
initialization for 'connection_methods[1].flags')
external/bluez/utils/network/connection.c:513: warning: missing
initializer
external/bluez/utils/network/connection.c:513: warning: (near
initialization for 'connection_methods[2].flags')
external/bluez/utils/network/connection.c:514: warning: missing
initializer
external/bluez/utils/network/connection.c:514: warning: (near
initialization for 'connection_methods[3].flags')
external/bluez/utils/network/connection.c:515: warning: missing
initializer
external/bluez/utils/network/connection.c:515: warning: (near
initialization for 'connection_methods[4].flags')
external/bluez/utils/network/connection.c:516: warning: missing
initializer
external/bluez/utils/network/connection.c:516: warning: (near
initialization for 'connection_methods[5].flags')
external/bluez/utils/network/connection.c:519: warning: missing
initializer
external/bluez/utils/network/connection.c:519: warning: (near
initialization for 'connection_methods[7].flags')
external/bluez/utils/network/connection.c:520: warning: missing
initializer
external/bluez/utils/network/connection.c:520: warning: (near
initialization for 'connection_methods[8].flags')
external/bluez/utils/network/connection.c:521: warning: missing
initializer
external/bluez/utils/network/connection.c:521: warning: (near
initialization for 'connection_methods[9].flags')
external/bluez/utils/network/connection.c:522: warning: missing
initializer
external/bluez/utils/network/connection.c:522: warning: (near
initialization for 'connection_methods[10].flags')
external/bluez/utils/network/connection.c:523: warning: missing
initializer
external/bluez/utils/network/connection.c:523: warning: (near
initialization for 'connection_methods[11].name')
external/bluez/utils/network/connection.c:527: warning: missing
initializer
external/bluez/utils/network/connection.c:527: warning: (near
initialization for 'connection_signals[0].flags')
external/bluez/utils/network/connection.c:528: warning: missing
initializer
external/bluez/utils/network/connection.c:528: warning: (near
initialization for 'connection_signals[1].flags')
external/bluez/utils/network/connection.c:529: warning: missing
initializer
external/bluez/utils/network/connection.c:529: warning: (near
initialization for 'connection_signals[2].name')


On Nov 24, 2:37 pm, Erin Yueh <eriny...@gmail.com> wrote:
> Hi,
>

Erin Yueh

unread,
Dec 2, 2009, 6:11:14 AM12/2/09
to 0xlab-devel
Hi there,

On Wed, Dec 2, 2009 at 18:02, dracoid4 <drac...@gmail.com> wrote:
> Can you share out the Android.mk makefile? I got some errors and
> warning from common.c and connection.c as follow:

erin@midnight:~/donut/mydroid_G1_donut/external/bluez/utils/network$
cat Android.mk
LOCAL_PATH:= $(call my-dir)
# network plugin

include $(CLEAR_VARS)

LOCAL_SRC_FILES:= \
bridge.c common.c connection.c main.c manager.c server.c

LOCAL_CFLAGS:= \
-DVERSION=\"3.36\" \
-DSTORAGEDIR=\"/data/misc/hcid\" \
-DCONFIGDIR=\"/etc/bluez\" \
-DANDROID \
-D__S_IFREG=0100000 # missing from bionic stat.h

LOCAL_C_INCLUDES:= \
$(call include-path-for, bluez-libs) \
$(call include-path-for, bluez-utils)/common \
$(call include-path-for, bluez-utils)/hcid \
$(call include-path-for, bluez-utils)/sdpd \
$(call include-path-for, bluez-utils)/eglib \
$(call include-path-for, bluez-utils)/gdbus \
$(call include-path-for, dbus)

LOCAL_SHARED_LIBRARIES := \
libbluetooth \
libhcid \
libdbus

LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/bluez-plugin
LOCAL_UNSTRIPPED_PATH := $(TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED)/bluez-plugin
LOCAL_MODULE := network

include $(BUILD_SHARED_LIBRARY)

> external/bluez/utils/network/common.c:352: error: 'SIGTERM' undeclared
> (first use in this function)
> external/bluez/utils/network/common.c:352: error: (Each undeclared
> identifier is reported only once
> external/bluez/utils/network/common.c:352: error: for each function it
> appears in.)

I add this line in 'common.c'.
+#include <signal.h>

dracoid4

unread,
Dec 2, 2009, 10:59:09 PM12/2/09
to 0xlab-devel
Well I did the make for both /bluez/utils/serial and /bluez/utils/
network.

1) I have added "LOCAL_PRELINK_MODULE := false" on both Android.mk
because of the prelink map issue.
build/tools/apriori/prelinkmap.c(137): library 'network.so' not in
prelink map

2) I have added #include <signal.h> in /bluez/utils/network/manager.c
to resolve the error PATH_MAX not declared.

3) network.so and serial.so have been created under /system/lib/bluez-
plugin

The dbus for serial is working, I was able to
dbus-send --system --type=method_call --print-reply --dest=org.bluez /
org/bluez org.bluez.Manager.ActivateService string:serial

but not for network. The same issue of service not found still exist:(

On Dec 2, 7:11 pm, Erin Yueh <eriny...@gmail.com> wrote:
> Hi there,
>

Erin Yueh

unread,
Dec 3, 2009, 2:23:42 AM12/3/09
to 0xlab-devel
Hi there,

On Thu, Dec 3, 2009 at 11:59, dracoid4 <drac...@gmail.com> wrote:
> Well I did the make for both /bluez/utils/serial and /bluez/utils/
> network.
>
> 1) I have added "LOCAL_PRELINK_MODULE := false" on both Android.mk
> because of the prelink map issue.
> build/tools/apriori/prelinkmap.c(137): library 'network.so' not in
> prelink map
>
> 2) I have added #include <signal.h> in /bluez/utils/network/manager.c
> to resolve the error PATH_MAX not declared.
>
> 3) network.so and serial.so have been created under /system/lib/bluez-
> plugin
>
> The dbus for serial is working, I was able to
> dbus-send --system --type=method_call --print-reply --dest=org.bluez /
> org/bluez org.bluez.Manager.ActivateService string:serial
>
> but not for network. The same issue of service not found still exist:(
>
yup! i did the same like you, but I don't get this error. I am not
sure why. You probably need to trace bluez code and see why it cannot
activate this service. BTW, check out bluez version and dbus API
document.

Regards,
Erin Yueh
http://0xlab.org

> --
>
> You received this message because you are subscribed to the Google Groups "0xlab-devel" group.
> To post to this group, send email to 0xlab...@googlegroups.com.
> To unsubscribe from this group, send email to 0xlab-devel...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/0xlab-devel?hl=en.
>
>
>

dracoid4

unread,
Dec 4, 2009, 12:12:58 AM12/4/09
to 0xlab-devel
I did a

# dbus-send --system --type=method_call --print-reply --
dest=org.bluez /org/blue
z org.bluez.Manager.ListServices

and got this reply?
method return sender=:1.1 -> dest=:1.4
array [
string "/org/bluez/service_headset"
string "/org/bluez/service_sink"
string "/org/bluez/service_audio"
string "/org/bluez/service_input"
string "/org/bluez/service_serial"
]

Do I have to predefine the network service somewhere?
under http://wiki.bluez.org/wiki/Network there is these section:

Service File
The service file defines some service properties. When the BlueZ
daemon starts all services(.service) files under "/etc/bluetooth" are
loaded.
Network service file(network.service) example:

[Bluetooth Service]
Identifier=network
Name=Network service
Description=Bluetooth Personal Area Network service
Autostart=false


On Dec 3, 3:23 pm, Erin Yueh <eriny...@gmail.com> wrote:
> Hi there,
>
>
>
>
>
> On Thu, Dec 3, 2009 at 11:59, dracoid4 <draco...@gmail.com> wrote:
> > Well I did the make for both /bluez/utils/serial and /bluez/utils/
> > network.
>
> > 1) I have added "LOCAL_PRELINK_MODULE := false" on both Android.mk
> > because of the prelink map issue.
> > build/tools/apriori/prelinkmap.c(137): library 'network.so' not in
> > prelink map
>
> > 2) I have added #include <signal.h> in /bluez/utils/network/manager.c
> > to resolve the error PATH_MAX not declared.
>
> > 3) network.so and serial.so have been created under /system/lib/bluez-
> > plugin
>
> > The dbus for serial is working, I was able to
> > dbus-send --system --type=method_call --print-reply --dest=org.bluez /
> > org/bluez org.bluez.Manager.ActivateService string:serial
>
> > but not for network. The same issue of service not found still exist:(
>
> yup! i did the same like you, but I don't get this error. I am not
> sure why. You probably need to trace bluez code and see why it cannot
> activate this service. BTW, check out bluez version and dbus API
> document.
>
> Regards,
> Erin Yuehhttp://0xlab.org
> > For more options, visit this group athttp://groups.google.com/group/0xlab-devel?hl=en.- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

Erin Yueh

unread,
Dec 4, 2009, 12:44:06 AM12/4/09
to 0xlab-devel
Hi,
I guess you need 'network.conf' file. This file is in
bluez/utils/network folder.
erin@midnight:~/donut/mydroid_G1_donut/external/bluez/utils/network$
cat network.conf
# Configuration file for the network service

# This section contains options which are not specific to any
# particular interface
[General]

# If we want to disable support for specific services
# Defaults to supporting all implemented services
#Disable=Connection,Server

# Disable link encryption: default=false
#DisableSecurity=true

[PANU Role]

# Network interface name for PANU for connections. default:bnep%d
# (up to 16 characters)
#Interface=

# PAN user connection interface up script. default:none
Script=avahi-autoipd

[GN Role]

# Network Interface name for Group Network server. default:pan0
#Interface=

# Group Network connection interface up script. default:none
Script=avahi-autoipd

[NAP Role]

# Network Interface name for Network Access Point server. default:pan1
#Interface=

# Network Access Point connection interface up script. default:none
Script=dhclient

dracoid4

unread,
Dec 4, 2009, 2:48:24 AM12/4/09
to 0xlab-devel
How does I configure the bluetooth daemon to read the network.conf?

I do see audio.conf, input.conf under rootfs/system/etc/bluez.

On Dec 4, 1:44 pm, Erin Yueh <eriny...@gmail.com> wrote:
> Hi,
>
>
>
>
>
> On Fri, Dec 4, 2009 at 13:12, dracoid4 <draco...@gmail.com> wrote:
> > I did a
>
> > # dbus-send --system --type=method_call --print-reply --
> > dest=org.bluez /org/blue
> > z org.bluez.Manager.ListServices
>
> > and got this reply?
> > method return sender=:1.1 -> dest=:1.4
> >   array [
> >      string "/org/bluez/service_headset"
> >      string "/org/bluez/service_sink"
> >      string "/org/bluez/service_audio"
> >      string "/org/bluez/service_input"
> >      string "/org/bluez/service_serial"
> >   ]
>
> > Do I have to predefine the network service somewhere?
> > underhttp://wiki.bluez.org/wiki/Networkthere is these section:
> Erin Yuehhttp://0xlab.org- Hide quoted text -

Erin Yueh

unread,
Dec 6, 2009, 10:09:05 PM12/6/09
to 0xlab-devel
Hi,

2009/12/4 dracoid4 <drac...@gmail.com>:
> How does I configure the bluetooth daemon to read the network.conf?
>
> I do see audio.conf, input.conf under  rootfs/system/etc/bluez.
>
Put network.conf to /etc/bluez and put network.so to plug-in folder
with input.so and audio.so. You can read the source code and then you
will know how bluetooth daemon init these service.
Reply all
Reply to author
Forward
0 new messages