All pastes #561344 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-06-12 12:36 UTC
rendered paste body
jrs@linuxserver:/usr/src/universal/sources/svn/libgsmd/gsm/src/gsmd$ svn diff
Index: machine_generic.c
===================================================================
--- machine_generic.c   (revisjon 2216)
+++ machine_generic.c   (arbeidskopi)
@@ -49,7 +49,7 @@
         * wait for the "AT-Command Interpreter ready"
         * message before trying to send commands.
         */
-       g->interpreter_ready = 1;
+       g->interpreter_ready = 0;

        return 0;
 }
Index: vendor_qc.c
===================================================================
--- vendor_qc.c (revisjon 2216)
+++ vendor_qc.c (arbeidskopi)
@@ -81,6 +81,8 @@
 {
        /* FIXME: do actual detection of vendor if we have multiple vendors */
        /* open /proc/cpuinfo and check for HTC Universal? */
+        /* The Qualcomm chip starts in V0 mode */
+        g->flags |= GSMD_FLAG_V0;
        return 1;
 }

@@ -89,6 +91,8 @@
        int rc;
        struct gsmd_atcmd *cmd;

+        /* echo on, not verbose */
+        rc |= gsmd_simplecmd(g, "ATE0V0");
        /* enable @HTCCSQ: signal quality reports */
        rc |= gsmd_simplecmd(g, "AT@HTCCSQ=1");

Index: usock.c
===================================================================
--- usock.c     (revisjon 2216)
+++ usock.c     (arbeidskopi)
@@ -133,7 +133,7 @@
                /* FIXME: number type! */
                break;
        case GSMD_VOICECALL_HANGUP:
-               cmd = atcmd_fill("ATH0", 5, &usock_cmd_cb, gu, gph->id);
+               cmd = atcmd_fill("ATH", 5, &usock_cmd_cb, gu, gph->id);
                break;
        case GSMD_VOICECALL_ANSWER:
                cmd = atcmd_fill("ATA", 4, &usock_cmd_cb, gu, gph->id);
Index: atcmd.c
===================================================================
--- atcmd.c     (revisjon 2216)
+++ atcmd.c     (arbeidskopi)
@@ -184,6 +184,7 @@
        if (strlen(buf) == 0 ||
            !strcmp(buf, "AT-Command Interpreter ready")) {
                g->interpreter_ready = 1;
+               gmsd_alive_start(g);
                gsmd_initsettings(g);
                return 0;
        }
@@ -213,7 +214,7 @@
         *    TBD
         */

-       if (buf[0] == '+' || buf[0] == '%') {
+       if (buf[0] == '+' || buf[0] == '%' || buf[0] == '@') {
                /* an extended response */
                const char *colon = strchr(buf, ':');
                if (!colon) {
Index: gsmd.c
===================================================================
--- gsmd.c      (revisjon 2216)
+++ gsmd.c      (arbeidskopi)
@@ -128,7 +128,7 @@
        gsmd_timer_register(tmr);
 }

-static int gmsd_alive_start(struct gsmd *gsmd)
+int gmsd_alive_start(struct gsmd *gsmd)
 {
        struct timeval tv;

@@ -469,11 +469,11 @@
        /* select a vendor plugin */
        gsmd_vendor_plugin_find(&g);

-       if (g.interpreter_ready)
+       if (g.interpreter_ready) {
                gsmd_initsettings(&g);

-       gmsd_alive_start(&g);
-
+              gmsd_alive_start(&g);
+       }
        gsmd_opname_init(&g);

        while (1) {
jrs@linuxserver:/usr/src/universal/sources/svn/libgsmd/gsm/src/gsmd$