From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: yesir yao <yesiryao@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: dbus of c program for adapter get/set properties
Date: Mon, 20 Apr 2009 23:50:26 -0300 [thread overview]
Message-ID: <2d5a2c100904201950s3d8b2b84p2ddb4e89ac5bfe50@mail.gmail.com> (raw)
In-Reply-To: <6edf6b480904201827n5049a614se097643adeba9932@mail.gmail.com>
Hi
On Mon, Apr 20, 2009 at 10:27 PM, yesir yao <yesiryao@gmail.com> wrote:
> hi, all:
>
> I need to use dbus api to control my bluetooth adapter in my C program.
> After I had read doc/adapter-api.txt and writed the codes, It can't work
The answer is very simple, you are using fixed/hardcoded object path
(/org/bluez/hci0) that is causing the problem. We made sure it won't
work by adding the pid to the path so no one will have a change to
hardcode an adapter path and the code still work after bluetoothd has
restarted, the correct way of doing this is via '/' path (the only
fixed path bluetoothd has) which implements org.bluez.Manager (see
doc/manager-api.txt).
About the G_DBUS_METHOD_FLAG_ASYNC are really not for clients,
although they hint the behavior of the daemon the client should know
better whether to block or not.
ps: check this http://smcv.pseudorandom.co.uk/2008/11/nonblocking/
--
Luiz Augusto von Dentz
Engenheiro de Computação
next prev parent reply other threads:[~2009-04-21 2:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-21 1:27 dbus of c program for adapter get/set properties yesir yao
2009-04-21 2:50 ` Luiz Augusto von Dentz [this message]
2009-04-23 4:52 ` yesir yao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2d5a2c100904201950s3d8b2b84p2ddb4e89ac5bfe50@mail.gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=yesiryao@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox