linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Ting Chou <Ting.Chou@iaSolution.net>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: [BLE] org.bluez.Device1.Connect() returns org.bluez.Error.NotAvailable
Date: Wed, 12 Dec 2012 11:25:37 +0200	[thread overview]
Message-ID: <20121212092537.GA5371@x220> (raw)
In-Reply-To: <ADCBF04BB97EBF4AAE65663F8478B61CA99E65ABCC@Luna.iaSolution.net>

Hi Ting,

On Wed, Dec 12, 2012, Ting Chou wrote:
> I tried Device.Pair, it does connect to the LE device like the first call to
> Device.Connect, but:
> 
> - I can't unpair the device (CancelPairing can't do this).

There's no "unpair" method. You'd need to call Adapter.RemoveDevice to
do it.

> - If I Device.Disconnect after Device.Pair, then I can't connect to the device
>   again by either Device.Connect or Device.Pair:
>   - Device1.Connect
>     Error org.bluez.Error.NotAvailable: Operation currently not available
>   - Device1.Pair
>     Error org.bluez.Error.AlreadyExists: Already Exists
> 
> I still can't connect to the LE device once I disconnect it.

That means that the profiles that are supposed to be supported with this
device are not calling either device_set_auto_connect() or
btd_device_add_attio_callback(). Both of those functions should cause
bluetoothd to start doing passive scanning and try to connect to the
device. Btw, which kernel version are you using. IIRC you'll need
something like 3.5 or newer for LE passive scanning to work.

Johan

  reply	other threads:[~2012-12-12  9:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-12  3:57 [BLE] org.bluez.Device1.Connect() returns org.bluez.Error.NotAvailable Ting Chou
2012-12-12  7:52 ` Johan Hedberg
2012-12-12  9:10   ` Ting Chou
2012-12-12  9:25     ` Johan Hedberg [this message]
2012-12-12  9:47       ` Ting Chou
2012-12-12 10:07         ` Johan Hedberg
2012-12-12 10:21           ` Ting Chou
2012-12-12 10:36             ` Johan Hedberg
2012-12-12 10:58               ` Anderson Lizardo
2012-12-12 10:53             ` Anderson Lizardo
2012-12-12 11:30               ` Ting Chou
2012-12-12 12:20                 ` Anderson Lizardo
2012-12-13  2:33                   ` Ting Chou
2012-12-13  7:48                     ` Johan Hedberg

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=20121212092537.GA5371@x220 \
    --to=johan.hedberg@gmail.com \
    --cc=Ting.Chou@iaSolution.net \
    --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;
as well as URLs for NNTP newsgroup(s).