Linux bluetooth development
 help / color / mirror / Atom feed
From: Tobias Jakobi <liquid.acid@gmx.net>
To: Anderson Lizardo <anderson.lizardo@openbossa.org>
Cc: BlueZ development <linux-bluetooth@vger.kernel.org>
Subject: Re: [bluez-5.14] connect fails with 'org.bluez.Error.NotAvailable'
Date: Mon, 07 Apr 2014 00:24:03 +0200	[thread overview]
Message-ID: <5341D403.8050001@gmx.net> (raw)
In-Reply-To: <534179D4.4040607@gmx.net>

[-- Attachment #1: Type: text/plain, Size: 1280 bytes --]

Tobias Jakobi wrote:
> Just a small note that I updated the bluez stacks (both on the server
> and the client) to 5.17. However the issue remains.
> 
> I've also created log from the debug output of bluetoothd on both sides:
> http://www.math.uni-bielefeld.de/~tjakobi/bt-client.log
> http://www.math.uni-bielefeld.de/~tjakobi/bt-server.log
> 
> Has anyone here actually managed to get a working TCP/IP network with
> recent bluez stack?
> 
> Greets,
> Tobias
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

I think I isolated the issue. The problem is that the profiles that are
associated to the NAP, PANU and GN services haven't got the auto_connect
flag set.

So during connect_profiles() they're never considered, and there is no
way to change this via the cmdline tools. Which effectively disables
this functionality.

Maybe the DBus interface can change these setting for built-in profiles,
but you honestly can't expect the enduser to fiddle around with that.

I attached a patch which enables autoconnect for all the above services.
This finally establishes the TCP/IP connection for me.

Greets,
Tobias


[-- Attachment #2: 0001-network-enable-autoconnect-for-NAP-PANU-and-GN.patch --]
[-- Type: text/x-patch, Size: 1311 bytes --]

>From 25f98aa8bbce7763fc68402c7aeedf90f431e7de Mon Sep 17 00:00:00 2001
From: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Date: Sun, 6 Apr 2014 23:58:32 +0200
Subject: network: enable autoconnect for NAP, PANU and GN

---
 profiles/network/manager.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/profiles/network/manager.c b/profiles/network/manager.c
index 0fe98a0..9b501a3 100644
--- a/profiles/network/manager.c
+++ b/profiles/network/manager.c
@@ -137,6 +137,7 @@ static struct btd_profile panu_profile = {
 	.name		= "network-panu",
 	.local_uuid	= NAP_UUID,
 	.remote_uuid	= PANU_UUID,
+	.auto_connect	= true,
 	.device_probe	= connection_register,
 	.device_remove	= connection_unregister,
 	.connect	= connection_connect,
@@ -149,6 +150,7 @@ static struct btd_profile gn_profile = {
 	.name		= "network-gn",
 	.local_uuid	= PANU_UUID,
 	.remote_uuid	= GN_UUID,
+	.auto_connect	= true,
 	.device_probe	= connection_register,
 	.device_remove	= connection_unregister,
 	.connect	= connection_connect,
@@ -161,6 +163,7 @@ static struct btd_profile nap_profile = {
 	.name		= "network-nap",
 	.local_uuid	= PANU_UUID,
 	.remote_uuid	= NAP_UUID,
+	.auto_connect	= true,
 	.device_probe	= connection_register,
 	.device_remove	= connection_unregister,
 	.connect	= connection_connect,
-- 
1.8.3.2


  reply	other threads:[~2014-04-06 22:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-27 22:25 [bluez-5.14] connect fails with 'org.bluez.Error.NotAvailable' Tobias Jakobi
2014-02-28 12:16 ` Anderson Lizardo
2014-02-28 16:57   ` Tobias Jakobi
2014-02-28 17:11     ` Anderson Lizardo
2014-03-02 18:54       ` Tobias Jakobi
2014-04-06 15:59         ` Tobias Jakobi
2014-04-06 22:24           ` Tobias Jakobi [this message]
2014-04-07  7:45             ` 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=5341D403.8050001@gmx.net \
    --to=liquid.acid@gmx.net \
    --cc=anderson.lizardo@openbossa.org \
    --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