Return-Path: Message-ID: <3e9cdced0805171138r278aad56i9d1af3dfea5ca7c0@mail.gmail.com> Date: Sat, 17 May 2008 20:38:10 +0200 From: "Fritz Code" To: "BlueZ users" In-Reply-To: <75FB41F6-49E1-4CEE-8A7F-87DCF21645F5@holtmann.org> MIME-Version: 1.0 References: <3e9cdced0805170741i202cfe62kef18ca9a0c2e30c@mail.gmail.com> <75FB41F6-49E1-4CEE-8A7F-87DCF21645F5@holtmann.org> Subject: Re: [Bluez-users] using bluez dbus interface exposed from hcid with plain c code Reply-To: BlueZ users List-Id: BlueZ users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0433697796==" Sender: bluez-users-bounces@lists.sourceforge.net Errors-To: bluez-users-bounces@lists.sourceforge.net --===============0433697796== Content-Type: multipart/alternative; boundary="----=_Part_3415_24339239.1211049490326" ------=_Part_3415_24339239.1211049490326 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Marcel, is there anywhere a HowTo / Tutorial how to use the low-level C API of bluez through dbus? I've found a Tutorial for using the low-level C API of dbus here (unfortunately just a ver basic Tut.) http://dbus.freedesktop.org/doc/dbus/libdbus-tutorial.html But I didn't find anything about the characteristics of the Adapter Interface of bluez (hcid) if its used from low-level API. E.g. the method names which I have to pass the method dbus_message_new_method_call() ... thanks, Fritz On Sat, May 17, 2008 at 4:47 PM, Marcel Holtmann wrote: > Hi Fritz, > > > since I don't have resources for Glib or another abstraction layer > > on my Embedded Linux I can only use plain C for communication with > > bluez through dbus. > > But so far I've only find howto's with GLib or Qt etc. > > Are there any documents that describe my case (plain c > > communication) ? > > > > For general understanding of the bluez architecture and tools, a > > statement and a question: > > > > hcid is the daemon which exposes different Interfaces through dbus, > > e.g. the Interface "Adapter". > > Another Application can access bluez functionalities through dbus by > > using the Interfaces exposed from hcid. (hopefully also by using > > plain C). > > > > E.g.: You want to develop an application "example-app" which should > > list available local buetooth devices, remote devices and its > > services. > > In this case it is enough to start hcid and use its Interface > > "Adapter" from "example-app" ? > > > > The other tools like, hcitool, hciconfig etc. are not necessary, > > they are own applications, right. > > In order to use bluez features from another application (through > > dbus) the only tool/util needed is hcid? > > And this is configured by hcid.conf? > > if you use bluez-utils-3.31 or any later release, the only thing you > need is hcid. It will do everything for you. The only exception is if > your adapter is connected via an UART and using hci_uart driver, then > you also need hciattach, but that is it. > > And of course you can write a client application using D-Bus low-level > (libdbus) only. It is a little bit more work than using high level > languages, but it is possible. I still have plans to provide a D-Bus > only replacement for hciconfig, hcitool etc. > > Regards > > Marcel > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Bluez-users mailing list > Bluez-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bluez-users > -- Regards, --Codefritz ------=_Part_3415_24339239.1211049490326 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Marcel,

is there anywhere a HowTo / Tutorial how to use the low-level C API of bluez through dbus?

I've found a Tutorial for using the low-level C API of dbus here (unfortunately just a ver basic Tut.)
http://dbus.freedesktop.org/doc/dbus/libdbus-tutorial.html

But I didn't find anything about the characteristics of the Adapter Interface of bluez (hcid) if its used from low-level API.
E.g. the method names which I have to pass the method dbus_message_new_method_call() ...

thanks,
Fritz

On Sat, May 17, 2008 at 4:47 PM, Marcel Holtmann <marcel@holtmann.org> wrote:
Hi Fritz,

> since I don't have resources for Glib or another abstraction layer
> on my Embedded Linux I can only use plain C for communication with
> bluez through dbus.
> But so far I've only find howto's with GLib or Qt etc.
> Are there any documents that describe my case (plain c
> communication) ?
>
> For general understanding of the bluez architecture and tools, a
> statement and a question:
>
> hcid is the daemon which exposes different Interfaces through dbus,
> e.g. the Interface "Adapter".
> Another Application can access bluez functionalities through dbus by
> using the Interfaces exposed from hcid. (hopefully also by using
> plain C).
>
> E.g.: You want to develop an application "example-app" which should
> list available local buetooth devices, remote devices and its
> services.
> In this case it is enough to start hcid and use its Interface
> "Adapter" from "example-app" ?
>
> The other tools like, hcitool, hciconfig etc. are not necessary,
> they are own applications, right.
> In order to use bluez features from another application (through
> dbus) the only tool/util needed is hcid?
> And this is configured by hcid.conf?

if you use bluez-utils-3.31 or any later release, the only thing you
need is hcid. It will do everything for you. The only exception is if
your adapter is connected via an UART and using hci_uart driver, then
you also need hciattach, but that is it.

And of course you can write a client application using D-Bus low-level
(libdbus) only. It is a little bit more work than using high level
languages, but it is possible. I still have plans to provide a D-Bus
only replacement for hciconfig, hcitool etc.

Regards

Marcel


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users



--
Regards,
--Codefritz



------=_Part_3415_24339239.1211049490326-- --===============0433697796== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ --===============0433697796== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users --===============0433697796==--