public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Zhao Forrest <forrest.zhao@gmail.com>
To: Thierry Pierret <extern.Thierry.Pierret@awtce.be>
Cc: linux-bluetooth@vger.kernel.org, event <event.riga@gmail.com>
Subject: Re: [PATCH 0/4] HFP Gateway profile
Date: Tue, 17 Feb 2009 16:31:56 +0800	[thread overview]
Message-ID: <ac8af0be0902170031l32c54051w19fdedf1a2aabf6d@mail.gmail.com> (raw)
In-Reply-To: <OF066E85D2.BE4D0799-ONC125755C.002E8D45-C125755C.00306BFF@aweurope.be>

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

> 1°/ No "Headset" service is exported.
Yes, this patch only provides the support for "Handsfree", so no
"Headset" service is exported.

> 2°/ As soon as the mobile is paired and the "Handsfree" service is
> connected, the mobiledirectly disconnects. I cannot see in the logs what's
> wrong.
>
Please apply the attached patch against my posted patch set and try
again. It works for me
to connect with Nokia N95.

Thanks,
Forrest

[-- Attachment #2: 5.patch --]
[-- Type: application/octet-stream, Size: 1628 bytes --]

diff --git a/audio/gateway.c b/audio/gateway.c
index 4b86c4e..895c772 100644
--- a/audio/gateway.c
+++ b/audio/gateway.c
@@ -543,6 +543,11 @@ static void rfcomm_connect_cb(GIOChannel * chan, int err, const bdaddr_t * src,
 	gateway_close(gw);
 }
 
+void gateway_start_service(struct audio_device *device)
+{
+	rfcomm_connect_cb(device->gateway->rfcomm, 0, NULL, NULL, device);
+}
+
 static void get_record_cb(sdp_list_t * recs, int err, gpointer user_data)
 {
 	struct audio_device *dev = user_data;
diff --git a/audio/gateway.h b/audio/gateway.h
index f217544..3546cd4 100644
--- a/audio/gateway.h
+++ b/audio/gateway.h
@@ -38,4 +38,4 @@ int gateway_config_stream(struct audio_device *dev, gateway_stream_cb_t cb,
 gboolean gateway_cancel_stream(struct audio_device *dev, unsigned int id);
 int gateway_get_sco_fd(struct audio_device *dev);
 void gateway_suspend_stream(struct audio_device *dev);
-
+void gateway_start_service(struct audio_device *device);
diff --git a/audio/manager.c b/audio/manager.c
index 178de73..36d7f87 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -498,8 +498,20 @@ drop:
 
 static void gateway_auth_cb(DBusError *derr, void *user_data)
 {
+	struct audio_device *device = user_data;
+
 	if (derr && dbus_error_is_set(derr))
 		error("Access denied: %s", derr->message);
+	else {
+		char ag_address[18];
+
+		ba2str(&device->dst, ag_address);
+		debug("Accepted AG connection from %s for %s",
+			ag_address, device->path);
+		debug("in gateway_auth_cb, src is %d", device->src);
+
+		gateway_start_service(device);
+	}
 }
 
 static void hf_io_cb(GIOChannel *chan, int err, const bdaddr_t *src,

  parent reply	other threads:[~2009-02-17  8:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-13  8:48 [PATCH 0/4] HFP Gateway profile Thierry Pierret
2009-02-13  9:00 ` Michele Noberasco
2009-02-17  8:31 ` Zhao Forrest [this message]
2009-02-18 10:11   ` Thierry Pierret
  -- strict thread matches above, loose matches on Subject: below --
2009-02-12  7:11 Zhao Forrest
2009-02-12  7:31 ` event

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=ac8af0be0902170031l32c54051w19fdedf1a2aabf6d@mail.gmail.com \
    --to=forrest.zhao@gmail.com \
    --cc=event.riga@gmail.com \
    --cc=extern.Thierry.Pierret@awtce.be \
    --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