From 18f5f4d70aecb6a6df8e0bf3e8a55b9a74b4ff68 Mon Sep 17 00:00:00 2001 From: mickey Date: Sun, 19 Aug 2007 21:03:58 +0000 Subject: gsmd: make it slightly more forgiving: 1.) remove early-alive trigger 2.) don't use AT as initial command since TI firmware errors out git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2744 99fdad57-331a-0410-800a-d7fa5415bdb3 --- ChangeLog | 0 src/gsmd/gsmd.c | 13 ++++--------- 2 files changed, 4 insertions(+), 9 deletions(-) create mode 100644 ChangeLog diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/src/gsmd/gsmd.c b/src/gsmd/gsmd.c index dc61e2c..2be6d79 100644 --- a/src/gsmd/gsmd.c +++ b/src/gsmd/gsmd.c @@ -143,8 +143,6 @@ int gmsd_alive_start(struct gsmd *gsmd) if (!gsmd_timer_create(&tv, &alive_interval_tmr_cb, gsmd)) return -1; - gsmd_modem_alive(gsmd); - return 0; } @@ -208,8 +206,9 @@ static int firstcmd_atcb(struct gsmd_atcmd *cmd, void *ctx, char *resp) if (strcmp(resp, "OK") && (!(gsmd->flags & GSMD_FLAG_V0) || resp[0] != '0')) { - gsmd_log(GSMD_FATAL, "response '%s' to initial command invalid", resp); - exit(5); + // temporarily changed to GSMD_ERROR instead of GSMD_FATAL + commented out exit(4) :M: + gsmd_log(GSMD_ERROR, "response '%s' to initial command invalid", resp); + //exit(4); } firstcmd_response = 1; @@ -241,13 +240,9 @@ int gsmd_initsettings(struct gsmd *gsmd) struct gsmd_atcmd *cmd; struct timeval tv; - cmd = atcmd_fill("AT", strlen("AT")+1, &firstcmd_atcb, gsmd, 0); + cmd = atcmd_fill("ATZ", strlen("ATZ")+1, &firstcmd_atcb, gsmd, 0); if (!cmd) return -ENOMEM; - - tv.tv_sec = GSMD_ALIVE_TIMEOUT; - tv.tv_usec = 0; - gsmd_timer_create(&tv, &firstcmd_tmr_cb, NULL); return atcmd_submit(gsmd, cmd); } -- cgit v1.2.3