mirror of
https://github.com/netfun2000/lcd4linux.git
synced 2026-02-27 09:44:34 +08:00
'Fix the huawei e220 at commands' by Jar
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1115 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
This commit is contained in:
+9
-12
@@ -94,16 +94,16 @@
|
||||
#define MIN_INTERVAL 100 /* minimum query interval 100 ms */
|
||||
|
||||
|
||||
#define INIT_STRING "ATE1;^CURC=0;^DSFLOWCLR" /* disable unsolicited report codes and reset DS traffic
|
||||
#define INIT_STRING "ATE1 ^CURC=0;^DSFLOWCLR" /* disable unsolicited report codes and reset DS traffic
|
||||
* with local echo enabled
|
||||
*/
|
||||
#define QUALITY "ATE1;+CSQ" /* signal quality query with local echo enabled */
|
||||
#define SYSINFO "ATE1;^SYSINFO" /* network access query with local echo enabled */
|
||||
#define MANUF "ATE1;+GMI" /* manufacturer query with local echo enabled */
|
||||
#define MODEL "ATE1;+GMM" /* model query with local echo enabled */
|
||||
#define FWVER "ATE1;+CGMR" /* firmware version query with local echo enabled */
|
||||
#define FLOWREPORT "ATE1;^DSFLOWQRY" /* DS traffic query with local echo enabled */
|
||||
#define OPERATOR "ATE1;+COPS=3,0;+COPS?" /* gsm/umts operator query (3=set format only, 0=long alphanum. string)
|
||||
#define QUALITY "ATE1 +CSQ" /* signal quality query with local echo enabled */
|
||||
#define SYSINFO "ATE1 ^SYSINFO" /* network access query with local echo enabled */
|
||||
#define MANUF "ATE1 +GMI" /* manufacturer query with local echo enabled */
|
||||
#define MODEL "ATE1 +GMM" /* model query with local echo enabled */
|
||||
#define FWVER "ATE1 +CGMR" /* firmware version query with local echo enabled */
|
||||
#define FLOWREPORT "ATE1 ^DSFLOWQRY" /* DS traffic query with local echo enabled */
|
||||
#define OPERATOR "ATE1 +COPS=3,0;+COPS?" /* gsm/umts operator query (3=set format only, 0=long alphanum. string)
|
||||
* with local echo enabled
|
||||
*/
|
||||
|
||||
@@ -738,7 +738,7 @@ static void huawei_read_fwver(const char *cmd)
|
||||
|
||||
static void huawei_read_operator(const char *cmd)
|
||||
{
|
||||
int bytes, i, pos, copy;
|
||||
int bytes, i, pos = 0, copy = 0;
|
||||
char *buf;
|
||||
|
||||
buf = huawei_send_receive(cmd);
|
||||
@@ -753,9 +753,6 @@ static void huawei_read_operator(const char *cmd)
|
||||
*/
|
||||
|
||||
/* parse "operator string" */
|
||||
pos = 0;
|
||||
copy = 0;
|
||||
|
||||
for (i = 6; i <= bytes; i++) {
|
||||
if (buf[i] == '\"' && copy == 0) {
|
||||
i++;
|
||||
|
||||
Reference in New Issue
Block a user