[Home]

Summary:ASTERISK-13857: Initializing Samsung GT-C6620
Reporter:Nicola Turato (nikkk)Labels:
Date Opened:2009-03-30 03:05:56Date Closed:2009-04-08 14:08:14
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Addons/chan_mobile
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) debug1.diff
( 1) gtc6220_init_debug.txt
( 2) hfp-init1.diff
( 3) hfp-init2.diff
Description:I'm getting an error with Samsung GT-C6620 on intializing phase.
I have modified chan_mobile to let it to connect, this is what I get:

   -- Bluetooth Device GT-C6620 has connected, initilizing...
[Mar 30 09:27:28] DEBUG[26566]: chan_mobile.c:1338 rfcomm_write_full: rfcomm_write() (21) [AT+BRSF=4
[Mar 30 09:27:28] DEBUG[26566]: chan_mobile.c:1338 rfcomm_write_full: rfcomm_write() (21) [AT+CIND=?
[Mar 30 09:27:29] DEBUG[26566]: chan_mobile.c:1338 rfcomm_write_full: rfcomm_write() (21) [AT+CIND?
[Mar 30 09:27:29] DEBUG[26566]: chan_mobile.c:1338 rfcomm_write_full: rfcomm_write() (21) [AT+CMER=3,0,0,1
[Mar 30 09:27:29] DEBUG[26566]: chan_mobile.c:1338 rfcomm_write_full: rfcomm_write() (21) [AT+CLIP=1
[Mar 30 09:27:29] DEBUG[26566]: chan_mobile.c:1986 hfp_init: [GT-C6620] error enabling calling line notification
[Mar 30 09:27:29] DEBUG[26566]: chan_mobile.c:1338 rfcomm_write_full: rfcomm_write() (21) [AT+VGS=15
[Mar 30 09:27:29] DEBUG[26566]: chan_mobile.c:1992 hfp_init: [GT-C6620] error synchronizing gain settings
[Mar 30 09:27:29] DEBUG[26566]: chan_mobile.c:1338 rfcomm_write_full: rfcomm_write() (21) [AT+CMGF=1
[Mar 30 09:27:29] DEBUG[26566]: chan_mobile.c:1338 rfcomm_write_full: rfcomm_write() (21) [AT+CNMI=2,1,0,1,0
   -- Bluetooth Device GT-C6620 initialised and ready.
[Mar 30 09:27:29] DEBUG[26566]: chan_mobile.c:3306 do_monitor_phone: [GT-C6620]           ERROR
[Mar 30 09:27:29] DEBUG[26566]: chan_mobile.c:3034 handle_response_error: [GT-C6620] recieved unexpected AT message 'ERROR'
[Mar 30 09:27:29] DEBUG[26566]: chan_mobile.c:3306 do_monitor_phone: [GT-C6620]           ERROR
[Mar 30 09:27:29] DEBUG[26566]: chan_mobile.c:3034 handle_response_error: [GT-C6620] recieved unexpected AT message 'ERROR'


after initialization (partial as you see) I can issue previously failed commands and I get OK!

localhost*CLI> mobile rfcomm GT-C6620 AT+CLIP=1
[Mar 30 09:34:21] DEBUG[26571]: chan_mobile.c:1338 rfcomm_write_full: rfcomm_write() (21) [AT+CLIP=1
[Mar 30 09:34:23] DEBUG[26566]: chan_mobile.c:3306 do_monitor_phone: [GT-C6620] OK
[Mar 30 09:34:23] DEBUG[26566]: chan_mobile.c:2974 handle_response_ok: [GT-C6620] recieved OK for unhandled request: UNKNOWN




Comments:By: Matthew Nicholson (mnicholson) 2009-03-30 17:34:01

Please apply the attached patch, recompile, then test with debug level 2.  Upload the resulting debug log.  That should help to debug this issue.  I suspect that initialization is timing out (currently there is a 10 second timeout).

By: Nicola Turato (nikkk) 2009-03-31 02:47:28

I have attached the debug log, there is an unsolicited CIEV message that breaks the initialization.

By: Matthew Nicholson (mnicholson) 2009-03-31 10:18:36

Ok.  This shouldn't be too difficult to fix.  I'll have to tweak the initialization procedure to handle events, which are allowed after the CMER message.  Thanks for your prompt feedback on this issue.

By: Matthew Nicholson (mnicholson) 2009-04-06 14:06:32

Ok.  Try the attached patch (hfp-init1.diff).  This should fix the issue.

By: Matthew Nicholson (mnicholson) 2009-04-07 14:04:58

I just uploaded hfp-init2.diff.  Test with that.

By: Nicola Turato (nikkk) 2009-04-08 03:00:16

Ok it works, thank you

By: Digium Subversion (svnbot) 2009-04-08 14:08:13

Repository: asterisk-addons
Revision: 853

U   trunk/channels/chan_mobile.c

------------------------------------------------------------------------
r853 | mnicholson | 2009-04-08 14:08:13 -0500 (Wed, 08 Apr 2009) | 6 lines

Make hands-free profile intilization more robust.

(closes issue ASTERISK-13857)
Reported by: nikkk
Tested by: mnicholson, nikkk

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk-addons?view=rev&revision=853