[PATCH] Qtopia - SMS messages fail to be received.

Mike (mwester) mwester at dls.net
Thu Jun 12 06:27:25 CEST 2008


I have been unable to receive SMS messages.

The problem is that Qtopia does not retry long enough to send
the AT+CNMI message before giving up.  (This message instructs
the GSM to send an unsolicited message upon arrival of an SMS.)

Notes in the code indicate that some modems will be busy for a
while after the AT+CPIN transaction, and Qtopia retries 5 times,
each time one second apart.

However, the docs for the Enfora Enabler, which have been noted
to be more similar to the Calypso than others, make a specific
note that it may take 20 seconds or more after power-up before
the SIM is read, and certain SIM-related commmands can be run.
(The error we get from the Calypso is "SIM BUSY".)  Various tests
here confirm that the magic number for the Calypso with the SIM
in question (a T-Mobile SIM) is 20 seconds.

The patch below changes the 5 retries to 25 -- which solves my SMS
problems completely, and is large enough that it should work for
others as well.  There is no impact for SIMs that worked before.

Thanks,
Mike (mwester)


--- git/src/libraries/qtopiaphonemodem/qmodemsmsreader.cpp.orig 2008-06-08 02:10:07.000000000 -0500
+++ git/src/libraries/qtopiaphonemodem/qmodemsmsreader.cpp      2008-06-11 20:55:10.000000000 -0500
@@ -443,7 +443,7 @@
     // Some modems fail to process this command for a small period
     // of time after the AT+CPIN request at startup, so we need
     // to repeat the command if it fails.
-    new QRetryAtChat( d->service->primaryAtChat(), line, 5 );
+    new QRetryAtChat( d->service->primaryAtChat(), line, 25 );

     // We are now initialized.
     d->initializing = false;



More information about the openmoko-devel mailing list