ERROR:Reject SCO: Agent not registered.
by Abhishek Dharmapurikar
Hi,
I was trying to setup HFP uing ofono. I have the following setup
Rasperry Pi B+ ( ARM1176JZF-S)
Bluez 5.32
Pulseaudio 6.0
ofono 1.16
Used the following steps
http://padovan.org/blog/2010/02/handsfree-profile-into-bluez-and-ofono/
start pulseaudio, bluetoothd and ofonod
Connect to phone using bluetoothctl
./enable-modem
./dial-number
loopback
I was able to pair my nexus 4 device and use the script ./dial-number which
actually sets a call up. But the audio of the call doesn't route to the
default sink. I see the following error in ofonod
*Reject SCO: Agent not registered*
Which could be the reason for the audio problem.
Things that I have already tried.
Patched http://cgit.freedesktop.org/~jprvita/pulseaudio/ file
bluetooth-headsets-media-api.
Recompiled the raspbian kernel with
*CONFIG_BT_SCOCONFIG_BT_HCIUSB_SCO*
enabled
Added
*Enable = Source,Sink,Headset,Gateway,Control,MediaDisable = Socket*
to /etc/bluetooth/audio.conf.
Things that could be wrong
When I do a pactl list cards, i see the bluetooth card at #0 with two
profiles.
* Profiles: a2dp_source: High Fidelity Capture (A2DP
Source) (sinks: 0, sources: 1, priority: 10, available: yes)
headset_audio_gateway: Headset Audio Gateway (HSP/HFP) (sinks: 1, sources:
1, priority: 20, available: no) off: Off (sinks: 0, sources:
0, priority: 0, available: yes) Active Profile: a2dp_source*
But when I try making the headset_audio_gateway the default profile. I get
*$ sudo pactl set-card-profile 0 headset_audio_gatewayFailure: Input/Output
error*
Also read this in the pulseaudio notes
http://www.freedesktop.org/wiki/Software/PulseAudio/Notes/6.0/
"When building PulseAudio, it's possible to choose between "native" and
"ofono" BlueZ 5 headset backends."
How do I specify that I wish to use the ofono headset backend? Is that the
problem?
5 years, 1 month
[PATCH] hfp: Handle extra CCWA event
by Kuba Pawlak
When a call is waitng, CCWA event is sent and call object
in state WAITING is created. on ReleaseAndAnswer it is
promoted to INCOMING and later to ACTIVE.
iPhones send an extra CCWA event when active call is ended.
This extra event is creating a second call object in state
WAITING. It is not possible to have two WAITING calls, but
previously waiting call was already promoted to INCOMING.
For a brief time we have two calls from the same number,
one INCOMING and one WAITING. Later WAITING one is removed.
As we cannot have a waiting and incoming call at the same
time, ignore CCWA when there is already an INCOMING call.
< \r\n+CIEV: 3,3\r\n
< \r\n+CIEV: 2,1\r\n
< \r\n+CIEV: 3,0\r\n
< \r\n+CCWA: "01234567890",129,1,"Me"\r\n
< \r\n+CIEV: 3,1\r\n
> AT+CLCC\r
< \r\n+CLCC: 1,0,0,0,0,"09876543210",129,"Me"\r\n
< \r\n+CLCC: 2,1,5,0,0,"01234567890",129,"Me"\r\n
< \r\nOK\r\n
< \r\n+CIEV: 2,0\r\n
< \r\n+CCWA: "01234567890",129,1,"Me"\r\n
< \r\n+CIEV: 2,1\r\n
< \r\n+CIEV: 3,0\r\n
> AT+CLCC\r
< \r\n+CLCC: 2,1,0,0,0,"01234567890",129,"Me"\r\n
< \r\nOK\r\n
---
drivers/hfpmodem/voicecall.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c
index 7542fe4bd41424774dc888e11a6afed4b159f546..b6e0886c8d62e667421b0f5d43ac1565c94e0838 100644
--- a/drivers/hfpmodem/voicecall.c
+++ b/drivers/hfpmodem/voicecall.c
@@ -712,6 +712,16 @@ static void ccwa_notify(GAtResult *result, gpointer user_data)
at_util_call_compare_by_status))
return;
+ /* some phones may send extra CCWA after active call is ended
+ * this would trigger creation of second call in state 'WAITING'
+ * as our previous WAITING call has been promoted to INCOMING
+ */
+ if (g_slist_find_custom(vd->calls,
+ GINT_TO_POINTER(CALL_STATUS_INCOMING),
+ at_util_call_compare_by_status))
+ return;
+
+
g_at_result_iter_init(&iter, result);
if (!g_at_result_iter_next(&iter, "+CCWA:"))
--
1.7.11.7
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Prof. Dr. Hermann Eul
Chairperson of the Supervisory Board: Tiffany Doon Silva
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
5 years, 6 months
[PATCH 0/3] Driver specific dial string validation
by Kuba Pawlak
Dial() method is generic for all modems but hfpmodem may not support some dial
strings. HFP 1.6 SPEC for ATD says: "Only voice calls are covered in this
specification."
Problem is with dialling USSD codes. Request is accepted and a call object
is state dialling is created. USSD code is completed, result displays on
the phone, but there are no events that would allow oFono to remove this fake
call object.
We may end up in such situation (Samsung S3 4.3):
ofonod[292]: > ATD*132#;\r
ofonod[292]: < \r\nOK\r\n
ofonod[292]: src/voicecall.c:dial_handle_result() Registering new call: 1
ofonod[292]: > AT+CHUP\r
ofonod[292]: < \r\nOK\r\n
ofonod[292]: > AT+CHUP\r
ofonod[292]: < \r\nOK\r\n
ofonod[292]: > AT+CHUP\r
ofonod[292]: < \r\nOK\r\n
This call cannot be ended and no more calls can be done as there can only be
one call in state 'Dialling'.
Proposed workaround is to have a validation string also in the driver, where
a USSD request can be stopped.
Kuba Pawlak (3):
voicecall.h: add dial string validation to driver
voicecall.c: call driver's dial string validation
hfp: define driver specific dial string validation
drivers/hfpmodem/voicecall.c | 37 ++++++++++++++++++++++++++++++++++++-
include/voicecall.h | 6 ++++++
src/voicecall.c | 7 ++++++-
3 files changed, 48 insertions(+), 2 deletions(-)
--
1.7.11.7
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Prof. Dr. Hermann Eul
Chairperson of the Supervisory Board: Tiffany Doon Silva
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
5 years, 6 months
[PATCH v2] Synchronize call status in case of Hangup error
by Kuba Pawlak
It is possible for the phone to accept Dial request
but not actually dial. This leaves a voicecall object
in state 'dialling' that cannot be removed.
Proposed workaround is to trigger AT+CLCC when an error
is returned for Hangup. As the call is not on the list,
this would remove this hanging object and signal CallRemoved.
Windows Phone trace with this fix:
ofonod[273]: > ATD1;\r
ofonod[273]: < \r\nOK\r\n
ofonod[273]: src/voicecall.c:dial_handle_result() Registering new call: 1
ofonod[273]: < \r\n+CIEV: 5,4\r\n
ofonod[273]: src/network.c:ofono_netreg_strength_notify() strength 80
ofonod[273]: > AT+CHUP\r
ofonod[273]: < \r\nERROR\r\n
ofonod[273]: src/voicecall.c:generic_callback() command failed with error: Unknown error type
ofonod[273]: > AT+CLCC\r
ofonod[273]: < \r\nOK\r\n
ofonod[273]: src/voicecall.c:ofono_voicecall_disconnected() Got disconnection event for id: 1, reason: 2
---
drivers/hfpmodem/voicecall.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c
index e3e6e0f..f1e9096 100644
--- a/drivers/hfpmodem/voicecall.c
+++ b/drivers/hfpmodem/voicecall.c
@@ -333,6 +333,10 @@ static void generic_cb(gboolean ok, GAtResult *result, gpointer user_data)
}
}
+ if (!ok && vd->calls)
+ g_at_chat_send(vd->chat, "AT+CLCC", clcc_prefix,
+ clcc_poll_cb, req->vc, NULL);
+
req->cb(&error, req->data);
}
--
1.7.11.7
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Prof. Dr. Hermann Eul
Chairperson of the Supervisory Board: Tiffany Doon Silva
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
5 years, 7 months
[PATCH] Synchronize call status in case of Hangup error
by Kuba Pawlak
It is possible for the phone to accept Dial request
but not actually dial. This leaves a voicecall object
in state 'dialling' that cannot be removed.
Proposed workaround is to trigger AT+CLCC when an error
is returned for Hangup. As the call is not on the list,
this would remove this hanging object and signal CallRemoved.
---
drivers/hfpmodem/voicecall.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c
index e3e6e0f5eccbbd61972c4b823c8093dd227e4bb9..06ad216b91bcbe99f9632f3c129a8f61756fd585 100644
--- a/drivers/hfpmodem/voicecall.c
+++ b/drivers/hfpmodem/voicecall.c
@@ -318,21 +318,31 @@ static void generic_cb(gboolean ok, GAtResult *result, gpointer user_data)
struct change_state_req *req = user_data;
struct voicecall_data *vd = ofono_voicecall_get_data(req->vc);
struct ofono_error error;
+ unsigned int num_calls = 0;
decode_at_error(&error, g_at_result_final_response(result));
- if (ok && req->affected_types) {
+ if (req->affected_types) {
GSList *l;
struct ofono_call *call;
for (l = vd->calls; l; l = l->next) {
call = l->data;
- if (req->affected_types & (1 << call->status))
- vd->local_release |= (1 << call->id);
+ if (req->affected_types & (1 << call->status)) {
+ if (ok)
+ vd->local_release |= (1 << call->id);
+ else
+ num_calls++;
+ }
}
}
+ /* AG returned an error, but some calls are present, resync*/
+ if (num_calls)
+ g_at_chat_send(vd->chat, "AT+CLCC", clcc_prefix,
+ clcc_poll_cb, req->vc, NULL);
+
req->cb(&error, req->data);
}
--
1.7.11.7
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Prof. Dr. Hermann Eul
Chairperson of the Supervisory Board: Tiffany Doon Silva
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
5 years, 7 months