From: Johan Hedberg <johan.hedberg@gmail.com>
To: Igor pesando <ipesando@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: Activating a serial connection with qdbus
Date: Wed, 20 Oct 2010 17:40:04 +0300 [thread overview]
Message-ID: <20101020144004.GA14607@jh-x301> (raw)
In-Reply-To: <AANLkTikmAHP8JiBw=cYqHCbiLot6rLjjboc7wnySmEmj@mail.gmail.com>
Hi Igor,
On Wed, Oct 20, 2010, Igor pesando wrote:
> If I try to connect with the spp profile to a device using qdbus o dbus.send as
>
> qdbus --system org.bluez /org/bluez/5989/hci1/dev_00_11_22_33_44
> org.bluez.Serial.Connect spp
>
> I get the proper reply /dev/rfcomm0 but the connection is dropped
> immediately as rfcomm shows.
> On the other side if I use rfcomm or the python script test-serial the
> connection is established and kept alive.
>
> So the questions is whether this is the expected behaviour.
> Equivalently I ask whether one should interact with the dbus interface
> only by programs and use rfcomm otherwise.
bluetoothd is "intelligent" and cleans up after the D-Bus client if the
client exists unexpectedly without calling Serial.Disconnect() first
(which is what qdbus does when it receives the reply). So the only way
to keep the connection alive is to also keep the process alive that
requested it. I.e. probably you can't use qdbus for this.
> If so I do not understand why it is not possible to set the Powered
> property using hciconfig since if the device property Powered is false
> it is not possible to initialize HCI device.
I'm not quite following your question. You can use "test-adapter powered
yes/no" and even "hciconfig hci0 up/down" should also work.
Johan
next prev parent reply other threads:[~2010-10-20 14:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-20 14:21 Activating a serial connection with qdbus Igor pesando
2010-10-20 14:40 ` Johan Hedberg [this message]
2010-10-20 15:17 ` Igor pesando
2010-10-20 16:56 ` Anderson Lizardo
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=20101020144004.GA14607@jh-x301 \
--to=johan.hedberg@gmail.com \
--cc=ipesando@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/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