Hi Timo,
On 01/11/2013 07:00 AM, mail(a)timomueller.eu wrote:
From: Timo Mueller<timo.mueller(a)bmw-carit.de>
Currently the list of current calls is requested right after an
outgoing callsetup has been reported by the AG device. If the AG
device updates the list after reporting the callsetup the +CLCC
response may not contain the new call and it is not registered
with oFono.
AT sequence that exhibited the failure (AG device was a Nokia N9
placing an outgoing call)
< \r\n+CIEV: 5,2\r\n
So here it tells us that the callsetup is 2 (e.g. dialing)
> AT+CLCC\r
< \r\nOK\r\n
And then it tells us "There are no calls to see here..."
Big. Fail. ;)
< \r\n+VGS=7\r\n
< \r\n+VGM=7\r\n
< \r\n+CIEV: 5,3\r\n
< \r\n+CIEV: 4,1\r\n
< \r\n+CIEV: 5,0\r\n
---
drivers/hfpmodem/voicecall.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c
index 505601c..c7c5f45 100644
--- a/drivers/hfpmodem/voicecall.c
+++ b/drivers/hfpmodem/voicecall.c
@@ -912,8 +912,11 @@ static void ciev_callsetup_notify(struct ofono_voicecall *vc,
* from HF: query and sync the phone number.
* from AG: query and create call.
*/
- g_at_chat_send(vd->chat, "AT+CLCC", clcc_prefix,
- clcc_poll_cb, vc, NULL);
+ if (vd->clcc_source)
+ g_source_remove(vd->clcc_source);
+
+ vd->clcc_source = g_timeout_add(POLL_CLCC_DELAY,
+ poll_clcc, vc);
Actually I really don't like this, you are delaying the call detection
for all devices (even good ones) because of one broken one.
I'd rather we request the CLCC immediately, but set a flag to retry the
CLCC after a timeout in case the call list is not what we expected.
break;
case 3:
Regards,
-Denis