* [PATCH 4/4] IPC integration part for HFP Audio gateway -- take5
@ 2009-04-08 8:46 Forrest Zhao
2009-04-08 12:28 ` Johan Hedberg
0 siblings, 1 reply; 7+ messages in thread
From: Forrest Zhao @ 2009-04-08 8:46 UTC (permalink / raw)
To: linux-bluetooth; +Cc: johan.hedberg, Forrest Zhao
From: Forrest Zhao <forrest.zhao@gmail.com>
---
audio/gateway.c | 77 +++++++++++++++++++++++++++++++++++++
audio/gateway.h | 7 +++
audio/unix.c | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++---
3 files changed, 192 insertions(+), 7 deletions(-)
diff --git a/audio/gateway.c b/audio/gateway.c
index 272927b..62359eb 100644
--- a/audio/gateway.c
+++ b/audio/gateway.c
@@ -1126,3 +1126,80 @@ int gateway_close(struct audio_device *device)
"Connected", DBUS_TYPE_BOOLEAN, &value);
return 0;
}
+
+/* These are functions to be called from unix.c for audio system
+ * ifaces (alsa, gstreamer, etc.) */
+gboolean gateway_request_stream(struct audio_device *dev,
+ gateway_stream_cb_t cb, void *user_data)
+{
+ struct gateway *gw = dev->gateway;
+ GError *err = NULL;
+ GIOChannel *io;
+
+ if (!gw->sco) {
+ if (!gw->rfcomm)
+ return FALSE;
+ gw->sco_start_cb = cb;
+ gw->sco_start_cb_data = user_data;
+ io = bt_io_connect(BT_IO_SCO, sco_connect_cb, dev, NULL, &err,
+ BT_IO_OPT_SOURCE_BDADDR, &dev->src,
+ BT_IO_OPT_DEST_BDADDR, &dev->dst,
+ BT_IO_OPT_INVALID);
+ if (!io) {
+ error("%s", err->message);
+ g_error_free(err);
+ return FALSE;
+ }
+ } else {
+ if (cb)
+ cb(dev, user_data);
+ }
+ return TRUE;
+}
+
+int gateway_config_stream(struct audio_device *dev, gateway_stream_cb_t sco_cb,
+ void *user_data)
+{
+ struct gateway *gw = dev->gateway;
+
+ if (!gw->rfcomm) {
+ gw->sco_start_cb = sco_cb;
+ gw->sco_start_cb_data = user_data;
+ return get_records(dev);
+ }
+
+ if (sco_cb)
+ sco_cb(dev, user_data);
+
+ return 0;
+}
+
+gboolean gateway_cancel_stream(struct audio_device *dev, unsigned int id)
+{
+ gateway_close(dev);
+ return TRUE;
+}
+
+int gateway_get_sco_fd(struct audio_device *dev)
+{
+ GIOChannel *sco_chan = dev->gateway->sco;
+
+ if (!sco_chan)
+ return -1;
+
+ return g_io_channel_unix_get_fd(sco_chan);
+}
+
+void gateway_suspend_stream(struct audio_device *dev)
+{
+ struct gateway *gw = dev->gateway;
+
+ if (gw->sco) {
+ g_io_channel_close(gw->sco);
+ g_io_channel_unref(gw->sco);
+ gw->sco = NULL;
+ gw->sco_start_cb = NULL;
+ gw->sco_start_cb_data = NULL;
+ }
+}
+
diff --git a/audio/gateway.h b/audio/gateway.h
index 78eef87..7acad46 100644
--- a/audio/gateway.h
+++ b/audio/gateway.h
@@ -32,3 +32,10 @@ struct gateway *gateway_init(struct audio_device *device);
gboolean gateway_is_connected(struct audio_device *dev);
int gateway_connect_rfcomm(struct audio_device *dev, GIOChannel *chan);
void gateway_start_service(struct audio_device *device);
+gboolean gateway_request_stream(struct audio_device *dev,
+ gateway_stream_cb_t cb, void *user_data);
+int gateway_config_stream(struct audio_device *dev, gateway_stream_cb_t cb,
+ void *user_data);
+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);
diff --git a/audio/unix.c b/audio/unix.c
index 1234f45..ea40cd8 100644
--- a/audio/unix.c
+++ b/audio/unix.c
@@ -47,6 +47,7 @@
#include "a2dp.h"
#include "headset.h"
#include "sink.h"
+#include "gateway.h"
#include "unix.h"
#include "glib-helper.h"
@@ -55,6 +56,7 @@
typedef enum {
TYPE_NONE,
TYPE_HEADSET,
+ TYPE_GATEWAY,
TYPE_SINK,
TYPE_SOURCE
} service_type_t;
@@ -182,6 +184,8 @@ static service_type_t select_service(struct audio_device *dev, const char *inter
return TYPE_SINK;
else if (!strcmp(interface, AUDIO_HEADSET_INTERFACE) && dev->headset)
return TYPE_HEADSET;
+ else if (!strcmp(interface, AUDIO_GATEWAY_INTERFACE) && dev->gateway)
+ return TYPE_GATEWAY;
return TYPE_NONE;
}
@@ -226,7 +230,7 @@ static uint8_t headset_generate_capability(struct audio_device *dev,
pcm = (void *) codec;
pcm->sampling_rate = 8000;
- if (headset_get_nrec(dev))
+ if (dev->headset && headset_get_nrec(dev))
pcm->flags |= BT_PCM_FLAG_NREC;
if (!headset_get_sco_hci(dev))
pcm->flags |= BT_PCM_FLAG_PCM_ROUTING;
@@ -299,6 +303,32 @@ failed:
unix_ipc_error(client, BT_SET_CONFIGURATION, EIO);
}
+static void gateway_setup_complete(struct audio_device *dev, void *user_data)
+{
+ struct unix_client *client = user_data;
+ char buf[BT_SUGGESTED_BUFFER_SIZE];
+ struct bt_set_configuration_rsp *rsp = (void *) buf;
+
+ if (!dev) {
+ unix_ipc_error(client, BT_SET_CONFIGURATION, EIO);
+ return;
+ }
+
+ client->req_id = 0;
+
+ memset(buf, 0, sizeof(buf));
+
+ rsp->h.type = BT_RESPONSE;
+ rsp->h.name = BT_SET_CONFIGURATION;
+ rsp->h.length = sizeof(*rsp);
+
+ rsp->link_mtu = 48;
+
+ client->data_fd = gateway_get_sco_fd(dev);
+
+ unix_ipc_sendmsg(client, &rsp->h);
+}
+
static void headset_resume_complete(struct audio_device *dev, void *user_data)
{
struct unix_client *client = user_data;
@@ -343,6 +373,35 @@ failed:
unix_ipc_error(client, BT_START_STREAM, EIO);
}
+static void gateway_resume_complete(struct audio_device *dev, void *user_data)
+{
+ struct unix_client *client = user_data;
+ char buf[BT_SUGGESTED_BUFFER_SIZE];
+ struct bt_start_stream_rsp *rsp = (void *) buf;
+ struct bt_new_stream_ind *ind = (void *) buf;
+
+ memset(buf, 0, sizeof(buf));
+ rsp->h.type = BT_RESPONSE;
+ rsp->h.name = BT_START_STREAM;
+ rsp->h.length = sizeof(*rsp);
+
+ unix_ipc_sendmsg(client, &rsp->h);
+
+ memset(buf, 0, sizeof(buf));
+ ind->h.type = BT_INDICATION;
+ ind->h.name = BT_NEW_STREAM;
+ ind->h.length = sizeof(*ind);
+
+ unix_ipc_sendmsg(client, &ind->h);
+
+ client->data_fd = gateway_get_sco_fd(dev);
+ if (unix_sendmsg_fd(client->sock, client->data_fd) < 0) {
+ error("unix_sendmsg_fd: %s(%d)", strerror(errno), errno);
+ unix_ipc_error(client, BT_START_STREAM, EIO);
+ }
+ client->req_id = 0;
+}
+
static void headset_suspend_complete(struct audio_device *dev, void *user_data)
{
struct unix_client *client = user_data;
@@ -757,6 +816,7 @@ static void start_discovery(struct audio_device *dev, struct unix_client *client
break;
case TYPE_HEADSET:
+ case TYPE_GATEWAY:
headset_discovery_complete(dev, client);
break;
@@ -908,6 +968,13 @@ static void start_config(struct audio_device *dev, struct unix_client *client)
client);
client->cancel = headset_cancel_stream;
break;
+ case TYPE_GATEWAY:
+ if (gateway_config_stream(dev, gateway_setup_complete, client) >= 0) {
+ client->cancel = gateway_cancel_stream;
+ id = 1;
+ } else
+ id = 0;
+ break;
default:
error("No known services for device");
@@ -970,6 +1037,14 @@ static void start_resume(struct audio_device *dev, struct unix_client *client)
client->cancel = headset_cancel_stream;
break;
+ case TYPE_GATEWAY:
+ if (gateway_request_stream(dev, gateway_resume_complete, client))
+ id = 1;
+ else
+ id = 0;
+ client->cancel = gateway_cancel_stream;
+ break;
+
default:
error("No known services for device");
goto failed;
@@ -1030,6 +1105,13 @@ static void start_suspend(struct audio_device *dev, struct unix_client *client)
client->cancel = headset_cancel_stream;
break;
+ case TYPE_GATEWAY:
+ gateway_suspend_stream(dev);
+ client->cancel = gateway_cancel_stream;
+ headset_suspend_complete(dev, client);
+ id = 1;
+ break;
+
default:
error("No known services for device");
goto failed;
@@ -1142,6 +1224,17 @@ static void handle_getcapabilities_req(struct unix_client *client,
dev = manager_find_device(req->object, &src, &dst,
client->interface, FALSE);
+ if (!dev && req->transport == BT_CAPABILITIES_TRANSPORT_SCO) {
+ g_free(client->interface);
+ client->interface = g_strdup(AUDIO_GATEWAY_INTERFACE);
+
+ dev = manager_find_device(req->object, &src, &dst,
+ client->interface, TRUE);
+ if (!dev && (req->flags & BT_FLAG_AUTOCONNECT))
+ dev = manager_find_device(req->object, &src, &dst,
+ client->interface, FALSE);
+ }
+
if (!dev) {
error("Unable to find a matching device");
goto failed;
@@ -1252,9 +1345,17 @@ failed:
static int handle_sco_transport(struct unix_client *client,
struct bt_set_configuration_req *req)
{
- if (!client->interface)
- client->interface = g_strdup(AUDIO_HEADSET_INTERFACE);
- else if (!g_str_equal(client->interface, AUDIO_HEADSET_INTERFACE))
+ struct audio_device *dev = client->dev;
+
+ if (!client->interface) {
+ if (dev->headset)
+ client->interface = g_strdup(AUDIO_HEADSET_INTERFACE);
+ else if (dev->gateway)
+ client->interface = g_strdup(AUDIO_GATEWAY_INTERFACE);
+ else
+ return -EIO;
+ } else if (!g_str_equal(client->interface, AUDIO_HEADSET_INTERFACE) &&
+ !g_str_equal(client->interface, AUDIO_GATEWAY_INTERFACE))
return -EIO;
return 0;
@@ -1339,6 +1440,9 @@ static void handle_setconfiguration_req(struct unix_client *client,
goto failed;
}
+ if (!client->dev)
+ goto failed;
+
if (req->codec.transport == BT_CAPABILITIES_TRANSPORT_SCO) {
err = handle_sco_transport(client, req);
if (err < 0) {
@@ -1353,9 +1457,6 @@ static void handle_setconfiguration_req(struct unix_client *client,
}
}
- if (!client->dev)
- goto failed;
-
start_config(client->dev, client);
return;
--
1.5.4.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 4/4] IPC integration part for HFP Audio gateway -- take5
2009-04-08 8:46 [PATCH 4/4] IPC integration part for HFP Audio gateway -- take5 Forrest Zhao
@ 2009-04-08 12:28 ` Johan Hedberg
2009-04-09 17:14 ` Rajan Batra
0 siblings, 1 reply; 7+ messages in thread
From: Johan Hedberg @ 2009-04-08 12:28 UTC (permalink / raw)
To: Forrest Zhao; +Cc: linux-bluetooth
Hi Forrest,
On Wed, Apr 08, 2009, Forrest Zhao wrote:
> From: Forrest Zhao <forrest.zhao@gmail.com>
>
> ---
> audio/gateway.c | 77 +++++++++++++++++++++++++++++++++++++
> audio/gateway.h | 7 +++
> audio/unix.c | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++---
> 3 files changed, 192 insertions(+), 7 deletions(-)
Thanks! The patch has now been pushed upstream with some minor coding
style fixes.
Johan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 4/4] IPC integration part for HFP Audio gateway -- take5
2009-04-08 12:28 ` Johan Hedberg
@ 2009-04-09 17:14 ` Rajan Batra
2009-04-10 2:37 ` Zhao Forrest
0 siblings, 1 reply; 7+ messages in thread
From: Rajan Batra @ 2009-04-09 17:14 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Forrest Zhao
Hello,
i used today's git bluez head code for headset gateway. i am able
to dial the number. receive the call.
but the voice stream is not starting. i have connected headphone to my
bluez linux host.
i am not able to hear or pass my voice to other side.
do i have to do some setting in PA ?. or any extra settings.
i do following steps :
1) dbus-send --system --type=method_call --print-reply
--dest=org.bluez /org/bluez/32112/hci0/dev_00_24_04_46_4E_FA
org.bluez.HeadsetGateway.Connect
2) dbus-send --system --type=method_call --print-reply
--dest=org.bluez /org/bluez/32112/hci0/dev_00_24_04_46_4E_FA
org.bluez.HeadsetGateway.Call string:<number>
i changed macro in gateway.c
#define AG_PLACE_CALL "ATD%s\r"
to
#define AG_PLACE_CALL "ATD%s;\r"
without semicolon, phone wasnt dialing the number.
-thanks and regards,
-rajan batra
On Wed, Apr 8, 2009 at 5:58 PM, Johan Hedberg <johan.hedberg@nokia.com> wrote:
> Hi Forrest,
>
> On Wed, Apr 08, 2009, Forrest Zhao wrote:
>> From: Forrest Zhao <forrest.zhao@gmail.com>
>>
>> ---
>> audio/gateway.c | 77 +++++++++++++++++++++++++++++++++++++
>> audio/gateway.h | 7 +++
>> audio/unix.c | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++---
>> 3 files changed, 192 insertions(+), 7 deletions(-)
>
> Thanks! The patch has now been pushed upstream with some minor coding
> style fixes.
>
> Johan
> --
> 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
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 4/4] IPC integration part for HFP Audio gateway -- take5
2009-04-09 17:14 ` Rajan Batra
@ 2009-04-10 2:37 ` Zhao Forrest
2009-04-10 5:44 ` Rajan Batra
2009-04-10 6:00 ` Rajan Batra
0 siblings, 2 replies; 7+ messages in thread
From: Zhao Forrest @ 2009-04-10 2:37 UTC (permalink / raw)
To: Rajan Batra; +Cc: linux-bluetooth
On Fri, Apr 10, 2009 at 1:14 AM, Rajan Batra <rajan.batra@gmail.com> wrote:
> Hello,
> i used today's git bluez head code for headset gateway. i am able
> to dial the number. receive the call.
> but the voice stream is not starting. i have connected headphone to my
> bluez linux host.
> i am not able to hear or pass my voice to other side.
>
> do i have to do some setting in PA ?. or any extra settings.
Did you use the latest version of PA?
>
> i do following steps :
>
> 1) dbus-send --system --type=method_call --print-reply
> --dest=org.bluez /org/bluez/32112/hci0/dev_00_24_04_46_4E_FA
> org.bluez.HeadsetGateway.Connect
>
>
> 2) dbus-send --system --type=method_call --print-reply
> --dest=org.bluez /org/bluez/32112/hci0/dev_00_24_04_46_4E_FA
> org.bluez.HeadsetGateway.Call string:<number>
>
> i changed macro in gateway.c
> #define AG_PLACE_CALL "ATD%s\r"
> to
> #define AG_PLACE_CALL "ATD%s;\r"
>
> without semicolon, phone wasnt dialing the number.
>
According to HFP spec there should not be semicolon, this might be an
interoperability issue.
Thanks,
Forrest
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 4/4] IPC integration part for HFP Audio gateway -- take5
2009-04-10 2:37 ` Zhao Forrest
@ 2009-04-10 5:44 ` Rajan Batra
2009-04-10 5:56 ` Rajan Batra
2009-04-10 6:00 ` Rajan Batra
1 sibling, 1 reply; 7+ messages in thread
From: Rajan Batra @ 2009-04-10 5:44 UTC (permalink / raw)
To: Zhao Forrest; +Cc: linux-bluetooth
Hello,
what am i missing to establish voice connection ?
why ALSA is not able to stream voice from Phone to my bluez headphone ?
is there some settings ?
thanks.
Rajan
On Fri, Apr 10, 2009 at 8:07 AM, Zhao Forrest <forrest.zhao@gmail.com> wrote:
> On Fri, Apr 10, 2009 at 1:14 AM, Rajan Batra <rajan.batra@gmail.com> wrote:
>> Hello,
>> i used today's git bluez head code for headset gateway. i am able
>> to dial the number. receive the call.
>> but the voice stream is not starting. i have connected headphone to my
>> bluez linux host.
>> i am not able to hear or pass my voice to other side.
>>
>> do i have to do some setting in PA ?. or any extra settings.
> Did you use the latest version of PA?
>
>>
>> i do following steps :
>>
>> 1) dbus-send --system --type=method_call --print-reply
>> --dest=org.bluez /org/bluez/32112/hci0/dev_00_24_04_46_4E_FA
>> org.bluez.HeadsetGateway.Connect
>>
>>
>> 2) dbus-send --system --type=method_call --print-reply
>> --dest=org.bluez /org/bluez/32112/hci0/dev_00_24_04_46_4E_FA
>> org.bluez.HeadsetGateway.Call string:<number>
>>
>> i changed macro in gateway.c
>> #define AG_PLACE_CALL "ATD%s\r"
>> to
>> #define AG_PLACE_CALL "ATD%s;\r"
>>
>> without semicolon, phone wasnt dialing the number.
>>
> According to HFP spec there should not be semicolon, this might be an
> interoperability issue.
>
> Thanks,
> Forrest
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 4/4] IPC integration part for HFP Audio gateway -- take5
2009-04-10 5:44 ` Rajan Batra
@ 2009-04-10 5:56 ` Rajan Batra
0 siblings, 0 replies; 7+ messages in thread
From: Rajan Batra @ 2009-04-10 5:56 UTC (permalink / raw)
To: Zhao Forrest; +Cc: linux-bluetooth
[-- Attachment #1: Type: text/plain, Size: 1852 bytes --]
Please find bluetooth -d -n log attached.
I called a number, number answered the call. but i didnt hear any
voice and also
couldnt send my voice to other side.
Is there anything appears obvious from log ? (about what i am missing)
thanks.
-Rajan Batra
On Fri, Apr 10, 2009 at 11:14 AM, Rajan Batra <rajan.batra@gmail.com> wrote:
> Hello,
>
> what am i missing to establish voice connection ?
> why ALSA is not able to stream voice from Phone to my bluez headphone ?
> is there some settings ?
>
> thanks.
> Rajan
>
>
> On Fri, Apr 10, 2009 at 8:07 AM, Zhao Forrest <forrest.zhao@gmail.com> wrote:
>> On Fri, Apr 10, 2009 at 1:14 AM, Rajan Batra <rajan.batra@gmail.com> wrote:
>>> Hello,
>>> i used today's git bluez head code for headset gateway. i am able
>>> to dial the number. receive the call.
>>> but the voice stream is not starting. i have connected headphone to my
>>> bluez linux host.
>>> i am not able to hear or pass my voice to other side.
>>>
>>> do i have to do some setting in PA ?. or any extra settings.
>> Did you use the latest version of PA?
>>
>>>
>>> i do following steps :
>>>
>>> 1) dbus-send --system --type=method_call --print-reply
>>> --dest=org.bluez /org/bluez/32112/hci0/dev_00_24_04_46_4E_FA
>>> org.bluez.HeadsetGateway.Connect
>>>
>>>
>>> 2) dbus-send --system --type=method_call --print-reply
>>> --dest=org.bluez /org/bluez/32112/hci0/dev_00_24_04_46_4E_FA
>>> org.bluez.HeadsetGateway.Call string:<number>
>>>
>>> i changed macro in gateway.c
>>> #define AG_PLACE_CALL "ATD%s\r"
>>> to
>>> #define AG_PLACE_CALL "ATD%s;\r"
>>>
>>> without semicolon, phone wasnt dialing the number.
>>>
>> According to HFP spec there should not be semicolon, this might be an
>> interoperability issue.
>>
>> Thanks,
>> Forrest
>>
>
[-- Attachment #2: bluez-GatewayLog.txt --]
[-- Type: text/plain, Size: 14218 bytes --]
[root@pe-lt029 bluetooth]# bluetoothd -d -n | tee bluetooth-hdsetgatewayLog
bluetoothd[843]: Bluetooth daemon 4.34
bluetoothd[843]: Enabling debug information
bluetoothd[843]: parsing main.conf
bluetoothd[843]: discovto=0
bluetoothd[843]: pairto=0
bluetoothd[843]: pageto=8192
bluetoothd[843]: name=%h-%d
bluetoothd[843]: class=0x000100
bluetoothd[843]: inqmode=0
bluetoothd[843]: Key file does not have key 'DeviceID'
bluetoothd[843]: Starting SDP server
bluetoothd[843]: Loading plugins /usr/local/lib/bluetooth/plugins
bluetoothd[843]: /usr/local/etc/bluetooth/network.conf: Key file does not have key 'Disable'
bluetoothd[843]: /usr/local/etc/bluetooth/network.conf: Key file does not have key 'DisableSecurity'
bluetoothd[843]: /usr/local/etc/bluetooth/network.conf: Key file does not have key 'Interface'
bluetoothd[843]: /usr/local/etc/bluetooth/network.conf: Key file does not have key 'Interface'
bluetoothd[843]: /usr/local/etc/bluetooth/network.conf: Key file does not have key 'Interface'
bluetoothd[843]: Config options: InterfacePrefix=bnep%d, PANU_Script=(null), GN_Script=(null), NAP_Script=(null), GN_Interface=pan0, NAP_Interface=pan1, Security=true
bluetoothd[843]: bridge pan0 created
bluetoothd[843]: register_interface: path /org/bluez/843/any
bluetoothd[843]: Registered interface org.bluez.Service on path /org/bluez/843/any
bluetoothd[843]: Unix socket created: 13
bluetoothd[843]: audio.conf: Key file does not have key 'AutoConnect'
bluetoothd[843]: audio.conf: Key file does not have key 'MaxConnected'
bluetoothd[843]: Telephony plugin initialized
bluetoothd[843]: HFP AG features: "Ability to reject a call" "Enhanced call status" "Extended Error Result Codes"
bluetoothd[843]: RAJAN GATEWAY IS IN
bluetoothd[843]: input.conf: Key file does not have key 'IdleTimeout'
bluetoothd[843]: HCI dev 0 registered
bluetoothd[843]: child 847 forked
bluetoothd[843]: Entering main loop
bluetoothd[843]: child 847 exited
bluetoothd[843]: HCI dev 0 up
bluetoothd[843]: Starting security manager 0
bluetoothd[843]: network_server_probe: path /org/bluez/843/hci0
bluetoothd[843]: Adding record with handle 0x10000
bluetoothd[843]: Record pattern UUID 0000000f-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00001115-0000-1000-8000-00805f9
bluetoothd[843]: register_server_record: got record id 0x10000
bluetoothd[843]: Registered interface org.bluez.NetworkPeer on path /org/bluez/843/hci0
bluetoothd[843]: network_server_probe: path /org/bluez/843/hci0
bluetoothd[843]: Adding record with handle 0x10001
bluetoothd[843]: Record pattern UUID 0000000f-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00001117-0000-1000-8000-00805f9
bluetoothd[843]: register_server_record: got record id 0x10001
bluetoothd[843]: Registered interface org.bluez.NetworkHub on path /org/bluez/843/hci0
bluetoothd[843]: network_server_probe: path /org/bluez/843/hci0
bluetoothd[843]: Adding record with handle 0x10002
bluetoothd[843]: Record pattern UUID 0000000f-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00001116-0000-1000-8000-00805f9
bluetoothd[843]: register_server_record: got record id 0x10002
bluetoothd[843]: Registered interface org.bluez.NetworkRouter on path /org/bluez/843/hci0
bluetoothd[843]: register_interface: path /org/bluez/843/hci0
bluetoothd[843]: Registered interface org.bluez.Service on path /org/bluez/843/hci0
bluetoothd[843]: headset_server_probe: path /org/bluez/843/hci0
bluetoothd[843]: audio.conf: Key file does not have key 'Master'
bluetoothd[843]: Adding record with handle 0x10003
bluetoothd[843]: Record pattern UUID 00000003-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00001108-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00001112-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00001203-0000-1000-8000-00805f9
bluetoothd[843]: audio.conf: Key file does not have key 'SCORouting'
bluetoothd[843]: Adding record with handle 0x10004
bluetoothd[843]: Record pattern UUID 00000003-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 0000111e-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 0000111f-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00001203-0000-1000-8000-00805f9
bluetoothd[843]: gateway_server_probe: path /org/bluez/843/hci0
bluetoothd[843]: audio.conf: Key file does not have key 'Master'
bluetoothd[843]: Adding record with handle 0x10005
bluetoothd[843]: Record pattern UUID 00000003-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 0000111e-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00001203-0000-1000-8000-00805f9
bluetoothd[843]: a2dp_server_probe: path /org/bluez/843/hci0
bluetoothd[843]: audio.conf: Key file does not have key 'Disable'
bluetoothd[843]: audio.conf: Key file does not have group 'A2DP'
bluetoothd[843]: audio.conf: Key file does not have group 'A2DP'
bluetoothd[843]: audio.conf: Key file does not have group 'A2DP'
bluetoothd[843]: audio.conf: Key file does not have group 'A2DP'
bluetoothd[843]: audio.conf: Key file does not have key 'Master'
bluetoothd[843]: SEP 0xb7fc90f8 registered: type:0 codec:0 seid:1
bluetoothd[843]: Adding record with handle 0x10006
bluetoothd[843]: Record pattern UUID 00000019-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 0000110a-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 0000110d-0000-1000-8000-00805f9
bluetoothd[843]: avrcp_server_probe: path /org/bluez/843/hci0
bluetoothd[843]: audio.conf: Key file does not have key 'Master'
bluetoothd[843]: Adding record with handle 0x10007
bluetoothd[843]: Record pattern UUID 00000017-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 0000110c-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 0000110e-0000-1000-8000-00805f9
bluetoothd[843]: Adding record with handle 0x10008
bluetoothd[843]: Record pattern UUID 00000017-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[843]: Record pattern UUID 0000110e-0000-1000-8000-00805f9
bluetoothd[843]: proxy_probe: path /org/bluez/843/hci0
bluetoothd[843]: Registered interface org.bluez.SerialProxyManager on path /org/bluez/843/hci0
bluetoothd[843]: Creating device /org/bluez/843/hci0/dev_00_24_04_46_4E_FA
bluetoothd[843]: Probe drivers for /org/bluez/843/hci0/dev_00_24_04_46_4E_FA
bluetoothd[843]: network_probe: path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA
bluetoothd[843]: Registered interface org.bluez.Network on path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA
bluetoothd[843]: adapter_get_device(00:24:04:46:4E:FA)
bluetoothd[843]: Registered interface org.bluez.Audio on path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA
bluetoothd[843]: audio handle_uuid: server not enabled for 00001112-0000-1000-8000-00805f9b34fb (0x1112)
bluetoothd[843]: Found Handsfree AG record
bluetoothd[843]: in gateway_init, dev is 0xb7fd0240
bluetoothd[843]: audio handle_uuid: server not enabled for 0000110a-0000-1000-8000-00805f9b34fb (0x110a)
bluetoothd[843]: Found AV Target
bluetoothd[843]: Registered interface org.bluez.Control on path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA
bluetoothd[843]: Found AV Remote
bluetoothd[843]: headset_probe: path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA
bluetoothd[843]: probe failed with driver input-headset for device /org/bluez/843/hci0/dev_00_24_04_46_4E_FA
bluetoothd[843]: serial_probe: path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA: 00000002-0000-1000-8000-0002ee000002
bluetoothd[843]: Registered interface org.bluez.Serial on path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA
bluetoothd[843]: serial_probe: path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA: 00001101-0000-1000-8000-00805f9b34fb
bluetoothd[843]: serial_probe: path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA: 00001103-0000-1000-8000-00805f9b34fb
bluetoothd[843]: serial_probe: path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA: 00001105-0000-1000-8000-00805f9b34fb
bluetoothd[843]: serial_probe: path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA: 00001106-0000-1000-8000-00805f9b34fb
bluetoothd[843]: serial_probe: path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA: 00001112-0000-1000-8000-00805f9b34fb
bluetoothd[843]: serial_probe: path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA: 0000111f-0000-1000-8000-00805f9b34fb
bluetoothd[843]: serial_probe: path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA: 0000112d-0000-1000-8000-00805f9b34fb
bluetoothd[843]: serial_probe: path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA: 0000112f-0000-1000-8000-00805f9b34fb
bluetoothd[843]: serial_probe: path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA: 00005002-0000-1000-8000-0002ee000001
bluetoothd[843]: serial_probe: path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA: 00005557-0000-1000-8000-0002ee000001
bluetoothd[843]: serial_probe: path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA: 00005601-0000-1000-8000-0002ee000001
bluetoothd[843]: Changing service classes to 0x6a010c
bluetoothd[843]: Adapter /org/bluez/843/hci0 has been enabled
bluetoothd[843]: Computer is classified as laptop
bluetoothd[843]: Current device class is 0x6a010c
bluetoothd[843]: Setting 0x00010c for major/minor device class
bluetoothd[843]: Changing major/minor class to 0x6a010c
bluetoothd[843]: at the begin of ag_connect()
bluetoothd[843]: at the end of ag_connect()
bluetoothd[843]: adapter_get_device(00:24:04:46:4E:FA)
bluetoothd[843]: link_key_request (sba=00:15:83:F0:D9:66, dba=00:24:04:46:4E:FA)
bluetoothd[843]: kernel auth requirements = 0x00
bluetoothd[843]: stored link key type = 0x00
bluetoothd[843]: at the begin of establish_service_level_conn()
bluetoothd[843]: features are 0x1EF
bluetoothd[843]: Service layer connection successfully established!
bluetoothd[843]: /org/bluez/843/hci0/dev_00_24_04_46_4E_FA: Connected to 00:24:04:46:4E:FA
bluetoothd[843]: at the begin of sco_connect_cb() in gateway.c
bluetoothd[843]: No matching connection found for handle 46
bluetoothd[843]: at the begin of ag_call()
bluetoothd[843]: in process_ag_reponse, response is
OK
bluetoothd[843]: at the begin of rfcomm_ag_data_cb()
bluetoothd[843]: at the begin of process_ind_change, name is "call_setup"
bluetoothd[843]: at the begin of rfcomm_ag_data_cb()
bluetoothd[843]: at the begin of process_ind_change, name is "call_setup"
bluetoothd[843]: at the begin of sco_connect_cb() in gateway.c
bluetoothd[843]: at the begin of rfcomm_ag_data_cb()
bluetoothd[843]: at the begin of process_ind_change, name is "call"
bluetoothd[843]: at the begin of rfcomm_ag_data_cb()
bluetoothd[843]: at the begin of process_ind_change, name is "call_setup"
bluetoothd[843]: at the begin of rfcomm_ag_data_cb()
bluetoothd[843]: rfcomm_ag_data_cb(): read wrong data '
NO CARRIER
'
bluetoothd[843]: at the begin of rfcomm_ag_data_cb()
bluetoothd[843]: at the begin of process_ind_change, name is "call"
bluetoothd[843]: in process_ag_reponse, response is
OK
bluetoothd[843]: No matching connection found for handle 46
^Cbluetoothd[843]: Removing adapter /org/bluez/843/hci0
bluetoothd[843]: network_server_remove: path /org/bluez/843/hci0
bluetoothd[843]: Unregistered interface org.bluez.NetworkPeer on path /org/bluez/843/hci0
bluetoothd[843]: Removing record with handle 0x10000
bluetoothd[843]: network_server_remove: path /org/bluez/843/hci0
bluetoothd[843]: Unregistered interface org.bluez.NetworkHub on path /org/bluez/843/hci0
bluetoothd[843]: Removing record with handle 0x10001
bluetoothd[843]: network_server_remove: path /org/bluez/843/hci0
bluetoothd[843]: Unregistered interface org.bluez.NetworkRouter on path /org/bluez/843/hci0
bluetoothd[843]: Removing record with handle 0x10002
bluetoothd[843]: unregister_interface: path /org/bluez/843/hci0
bluetoothd[843]: headset_server_remove: path /org/bluez/843/hci0
bluetoothd[843]: Removing record with handle 0x10003
bluetoothd[843]: Removing record with handle 0x10004
bluetoothd[843]: gateway_server_remove: path /org/bluez/843/hci0
bluetoothd[843]: Removing record with handle 0x10005
bluetoothd[843]: a2dp_server_remove: path /org/bluez/843/hci0
bluetoothd[843]: Removing record with handle 0x10006
bluetoothd[843]: avrcp_server_remove: path /org/bluez/843/hci0
bluetoothd[843]: Removing record with handle 0x10008
bluetoothd[843]: Removing record with handle 0x10007
bluetoothd[843]: proxy_remove: path /org/bluez/843/hci0
bluetoothd[843]: Removing device /org/bluez/843/hci0/dev_00_24_04_46_4E_FA
bluetoothd[843]: network_remove: path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA
bluetoothd[843]: Unregistered interface org.bluez.Network on path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA
bluetoothd[843]: Unregistered interface org.bluez.Control on path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA
bluetoothd[843]: serial_remove: path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA
bluetoothd[843]: Unregistered interface org.bluez.Serial on path /org/bluez/843/hci0/dev_00_24_04_46_4E_FA
bluetoothd[843]: Cleanup plugins
bluetoothd[843]: bridge pan0 removed
bluetoothd[843]: unregister_interface: path /org/bluez/843/any
bluetoothd[843]: Stopping SDP server
bluetoothd[843]: Exit
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 4/4] IPC integration part for HFP Audio gateway -- take5
2009-04-10 2:37 ` Zhao Forrest
2009-04-10 5:44 ` Rajan Batra
@ 2009-04-10 6:00 ` Rajan Batra
1 sibling, 0 replies; 7+ messages in thread
From: Rajan Batra @ 2009-04-10 6:00 UTC (permalink / raw)
To: Zhao Forrest; +Cc: linux-bluetooth
> Did you use the latest version of PA?
when i restart my machine. pulseaudio daemon is by default
running. i havent done any setting to use PA for bluez nor loaded any
bluetooth modules in PA.
so this means i am not using PA for bluez rite ? so i guess all
should go to ALSA
thanks.
-rajan
On Fri, Apr 10, 2009 at 8:07 AM, Zhao Forrest <forrest.zhao@gmail.com> wrote:
> On Fri, Apr 10, 2009 at 1:14 AM, Rajan Batra <rajan.batra@gmail.com> wrote:
>> Hello,
>> i used today's git bluez head code for headset gateway. i am able
>> to dial the number. receive the call.
>> but the voice stream is not starting. i have connected headphone to my
>> bluez linux host.
>> i am not able to hear or pass my voice to other side.
>>
>> do i have to do some setting in PA ?. or any extra settings.
> Did you use the latest version of PA?
>
>>
>> i do following steps :
>>
>> 1) dbus-send --system --type=method_call --print-reply
>> --dest=org.bluez /org/bluez/32112/hci0/dev_00_24_04_46_4E_FA
>> org.bluez.HeadsetGateway.Connect
>>
>>
>> 2) dbus-send --system --type=method_call --print-reply
>> --dest=org.bluez /org/bluez/32112/hci0/dev_00_24_04_46_4E_FA
>> org.bluez.HeadsetGateway.Call string:<number>
>>
>> i changed macro in gateway.c
>> #define AG_PLACE_CALL "ATD%s\r"
>> to
>> #define AG_PLACE_CALL "ATD%s;\r"
>>
>> without semicolon, phone wasnt dialing the number.
>>
> According to HFP spec there should not be semicolon, this might be an
> interoperability issue.
>
> Thanks,
> Forrest
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-04-10 6:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-08 8:46 [PATCH 4/4] IPC integration part for HFP Audio gateway -- take5 Forrest Zhao
2009-04-08 12:28 ` Johan Hedberg
2009-04-09 17:14 ` Rajan Batra
2009-04-10 2:37 ` Zhao Forrest
2009-04-10 5:44 ` Rajan Batra
2009-04-10 5:56 ` Rajan Batra
2009-04-10 6:00 ` Rajan Batra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox