diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gsmd/atcmd.c | 9 | ||||
-rw-r--r-- | src/gsmd/gsmd.c | 4 | ||||
-rw-r--r-- | src/gsmd/vendor_wavecom.c | 2 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/gsmd/atcmd.c b/src/gsmd/atcmd.c index adf18e0..d8a01b6 100644 --- a/src/gsmd/atcmd.c +++ b/src/gsmd/atcmd.c @@ -101,6 +101,7 @@ static int llparse_byte(struct llparser *llp, char byte) llp->state = LLPARSE_STATE_PROMPT; else { #ifdef STRICT + DEBUGP("IDLE: no \\r or > following \\r\n"); llp->state = LLPARSE_STATE_ERROR; #else llp->state = LLPARSE_STATE_RESULT; @@ -115,8 +116,10 @@ static int llparse_byte(struct llparser *llp, char byte) case LLPARSE_STATE_IDLE_CR: if (byte == '\n') llp->state = LLPARSE_STATE_IDLE_LF; - else if (byte != '\r') + else if (byte != '\r') { + DEBUGP("IDLE_CR: no \\r following \\n\n"); llp->state = LLPARSE_STATE_ERROR; + } break; case LLPARSE_STATE_IDLE_LF: /* can we really go directly into result_cr ? */ @@ -156,9 +159,13 @@ static int llparse_byte(struct llparser *llp, char byte) } break; case LLPARSE_STATE_ERROR: + DEBUGP("already in state ERROR\n"); break; } + if (llp->state == LLPARSE_STATE_ERROR) + exit(5); + return ret; } diff --git a/src/gsmd/gsmd.c b/src/gsmd/gsmd.c index 58d92e3..c213a6f 100644 --- a/src/gsmd/gsmd.c +++ b/src/gsmd/gsmd.c @@ -185,7 +185,7 @@ static int gsmd_initsettings2(struct gsmd *gsmd) /* set it 0 to disable subscriber info and avoid cme err 512 */ rc |= gsmd_simplecmd(gsmd, "AT+COLP=0"); /* use +CCWA: to indicate waiting call */ - rc |= gsmd_simplecmd(gsmd, "AT+CCWA=1,1"); + //rc |= gsmd_simplecmd(gsmd, "AT+CCWA=1,1"); /* configure message format as PDU mode*/ /* FIXME: TEXT mode support!! */ rc |= gsmd_simplecmd(gsmd, "AT+CMGF=0"); @@ -240,7 +240,7 @@ int gsmd_initsettings(struct gsmd *gsmd) { struct gsmd_atcmd *cmd; - cmd = atcmd_fill("ATZ", strlen("ATZ")+1, &firstcmd_atcb, gsmd, 0, NULL); + cmd = atcmd_fill("ATE0", strlen("ATE0")+1, &firstcmd_atcb, gsmd, 0, NULL); if (!cmd) return -ENOMEM; diff --git a/src/gsmd/vendor_wavecom.c b/src/gsmd/vendor_wavecom.c index 514145d..c1683ea 100644 --- a/src/gsmd/vendor_wavecom.c +++ b/src/gsmd/vendor_wavecom.c @@ -136,7 +136,7 @@ static int wavecom_initsettings(struct gsmd *g) struct gsmd_atcmd *cmd; /* use +WREGC to enter "spy mode" (no transmit / registration) */ - rc |= gsmd_simplecmd(g, "AT+WREGC=1"); + rc |= gsmd_simplecmd(g, "AT+WREGC=0"); rc |= gsmd_simplecmd(g, "AT+CCED=1,3"); return rc; |