[RFC] Change alive check and first commands to bare "AT"

Alex Osborne bobofdoom at gmail.com
Sun Jul 29 14:12:49 CEST 2007


The BCM2132 responds to a very limited command set when the radio is off
(AT+CFUN=0).  Almost any command except the identification queries
(+CGSN, +CGMI, +CGMM, +CGMR), +CFUN and +CMUX just results in an ERROR
response.  ATE and ATV both also ERROR causing the alive check and "first"
command both to fail and hence gsmd to exit.

The easiest solution that occurred to me was to change both commands to 
just a bare "AT" attention command.  I'm not familiar enough with GSM
modules though to know whether this will work on all devices.  If not,
I guess an alternative might be to make these commands configurable
on a per-vendor basis or simply to treat "ERROR" as a valid response.


 src/gsmd/gsmd.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gsmd/gsmd.c b/src/gsmd/gsmd.c
index b915073..f9daba7 100644
--- a/src/gsmd/gsmd.c
+++ b/src/gsmd/gsmd.c
@@ -44,7 +44,7 @@
 #include <gsmd/vendorplugin.h>
 #include <gsmd/talloc.h>
-#define GSMD_ALIVECMD		"ATE0"
+#define GSMD_ALIVECMD		"AT"
@@ -237,7 +237,7 @@ int gsmd_initsettings(struct gsmd *gsmd)
 	struct gsmd_atcmd *cmd;
 	struct timeval tv;
-	cmd = atcmd_fill("ATE0V1", strlen("ATE0V1")+1, &firstcmd_atcb, gsmd, 0);
+	cmd = atcmd_fill("AT", strlen("AT")+1, &firstcmd_atcb, gsmd, 0);
 	if (!cmd)
 		return -ENOMEM;

More information about the gsmd-devel mailing list