Typo in builtin script "APN"
Status: Beta
Brought to you by:
pharscape
--- comgt.0.32.orig/comgt.h 2006-10-20 16:49:46.000000000 +0200
+++ comgt.0.32/comgt.h 2006-12-06 13:10:54.000000000 +0100
@@ -470,8 +470,8 @@ char _SETAPN_code[]=
if a=0 goto apnerror\n\
if a>32 goto apnerror\n\
:enterapn\n\
- send \"AT+CGDCONT=1,\\\"IP\\\",\\\"\n\
- send $c\n\
+ send \"AT+CGDCONT=1,\\\"IP\\\",\\\"\"\n\
+ send $x\n\
send \"\\\"^m\"\n\
waitfor 20 \"OK\",\"ERR\"\n\
if % = -1 goto timeerror\n\
Hi Paul,
this bug is now open for more than 3 years; can you please apply it, and push out a new release?
I just came over same trap, and was already patching around when I thought 'wait! look for the bug report page at SF' which then showed me that its kinda 'known bug' ...
While the above patch fixes the problem of setting the APN its still confusing to get wrong error messages. In this case comgt always reported 'COMGTAPN environment var is not set', but -v option clearly showed that it passed the test of the environment var, and failed later while setting the APN with the wrong var. Therefore it would be good to add another error case where comgt reports correctly that the problem is with setting the APN, and not with fetching the environment var.
Thanks, Gün.
Hi, below the patch I would suggest (although the apnseterror label and the goto before the label are obsolete, but I just kept the previous form):
--- comgt.h.orig 2006-10-20 16:49:46.000000000 +0200
+++ comgt.h 2010-01-25 19:05:22.000000000 +0100
@@ -22,8 +22,8 @@
/***************************************************************************
* $Id: comgt.h,v 1.4 2006/10/20 14:30:19 pharscape Exp $
****************************************************************************/
-#define COMGT_VERSION "0.32"
-#define YEARS "2005,2006"
+#define COMGT_VERSION "0.32.1"
+#define YEARS "2005,2006,2010"
char _default_code[] =
"opengt\n\
@@ -470,13 +470,17 @@
if a=0 goto apnerror\n\
if a>32 goto apnerror\n\
:enterapn\n\
- send \"AT+CGDCONT=1,\\\"IP\\\",\\\"\n\
- send $c\n\
+ send \"AT+CGDCONT=1,\\\"IP\\\",\\\"\"\n\
+ send $x\n\
send \"\\\"^m\"\n\
waitfor 20 \"OK\",\"ERR\"\n\
if % = -1 goto timeerror\n\
if % = 0 goto OK\n\
- if % = 1 goto apnerror\n\
+ if % = 1 goto apnseterror\n\
+ :apnseterror\n\
+ print \"ERROR entering APN\n\"\n\
+ print \"The device did not accept the APN set command\n\"\n\
+ exit 1\n\
:apnerror\n\
print \"ERROR entering APN\n\"\n\
print \"The COMGTAPN env variable is not set\n\"\n\
This bug is now fixed in CVS.