atgen.c (gammu-1.41.0.tar.bz2) | : | atgen.c (gammu-1.42.0.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 2037 | skipping to change at line 2037 | |||
return ERR_UNKNOWNRESPONSE; | return ERR_UNKNOWNRESPONSE; | |||
} | } | |||
GSM_Error ATGEN_GetManufacturer(GSM_StateMachine *s) | GSM_Error ATGEN_GetManufacturer(GSM_StateMachine *s) | |||
{ | { | |||
GSM_Error error; | GSM_Error error; | |||
GSM_Phone_ATGENData *Priv = &s->Phone.Data.Priv.ATGEN; | GSM_Phone_ATGENData *Priv = &s->Phone.Data.Priv.ATGEN; | |||
if (Priv->Manufacturer != 0 && s->Phone.Data.Manufacturer[0] != 0) return ERR_NONE; | if (Priv->Manufacturer != 0 && s->Phone.Data.Manufacturer[0] != 0) return ERR_NONE; | |||
strcpy(s->Phone.Data.Manufacturer, "Unknown"); | ||||
error = ATGEN_WaitForAutoLen(s, "AT+CGMI\r", 0x00, 40, ID_GetManufacturer ); | error = ATGEN_WaitForAutoLen(s, "AT+CGMI\r", 0x00, 40, ID_GetManufacturer ); | |||
if (error != ERR_NONE) { | if (error != ERR_NONE) { | |||
error = ATGEN_WaitForAutoLen(s, "ATI3\r", 0x00, 40, ID_GetManufac turer); | error = ATGEN_WaitForAutoLen(s, "ATI3\r", 0x00, 40, ID_GetManufac turer); | |||
} | } | |||
return error; | return ERR_NONE; | |||
} | } | |||
GSM_Error ATGEN_ReplyGetFirmware(GSM_Protocol_Message *msg, GSM_StateMachine *s) | GSM_Error ATGEN_ReplyGetFirmware(GSM_Protocol_Message *msg, GSM_StateMachine *s) | |||
{ | { | |||
GSM_Phone_ATGENData *Priv = &s->Phone.Data.Priv.ATGEN; | GSM_Phone_ATGENData *Priv = &s->Phone.Data.Priv.ATGEN; | |||
int line = 0; | int line = 0; | |||
strcpy(s->Phone.Data.Version, "Unknown"); | strcpy(s->Phone.Data.Version, "Unknown"); | |||
skipping to change at line 2212 | skipping to change at line 2214 | |||
Priv->MemoryUsed = 0; | Priv->MemoryUsed = 0; | |||
Priv->TextLength = 0; | Priv->TextLength = 0; | |||
Priv->NumberLength = 0; | Priv->NumberLength = 0; | |||
Priv->CNMIMode = -1; | Priv->CNMIMode = -1; | |||
Priv->CNMIProcedure = -1; | Priv->CNMIProcedure = -1; | |||
Priv->CNMIDeliverProcedure = -1; | Priv->CNMIDeliverProcedure = -1; | |||
#ifdef GSM_ENABLE_CELLBROADCAST | #ifdef GSM_ENABLE_CELLBROADCAST | |||
Priv->CNMIBroadcastProcedure = -1; | Priv->CNMIBroadcastProcedure = -1; | |||
#endif | #endif | |||
Priv->CNMIClearUnsolicitedResultCodes = -1; | ||||
Priv->ErrorText = NULL; | Priv->ErrorText = NULL; | |||
Priv->SMSCount = 0; | Priv->SMSCount = 0; | |||
Priv->SMSCache = NULL; | Priv->SMSCache = NULL; | |||
Priv->ReplyState = 0; | Priv->ReplyState = 0; | |||
if (s->ConnectionType != GCT_IRDAAT && s->ConnectionType != GCT_BLUEAT) { | if (s->ConnectionType != GCT_IRDAAT && s->ConnectionType != GCT_BLUEAT) { | |||
/* We try to escape AT+CMGS mode, at least Siemens M20 | /* We try to escape AT+CMGS mode, at least Siemens M20 | |||
* then needs to get some rest | * then needs to get some rest | |||
skipping to change at line 3325 | skipping to change at line 3328 | |||
if (error != ERR_NONE) { | if (error != ERR_NONE) { | |||
return error; | return error; | |||
} | } | |||
smprintf(s, "Getting packet network LAC and CID and state\n"); | smprintf(s, "Getting packet network LAC and CID and state\n"); | |||
error = ATGEN_WaitForAutoLen(s, "AT+CGREG?\r", 0x00, 40, ID_GetNetworkInf o); | error = ATGEN_WaitForAutoLen(s, "AT+CGREG?\r", 0x00, 40, ID_GetNetworkInf o); | |||
if (error != ERR_NONE) { | if (error != ERR_NONE) { | |||
return error; | return error; | |||
} | } | |||
if (netinfo->State == GSM_HomeNetwork || netinfo->State == GSM_RoamingNet | if (netinfo->State == GSM_HomeNetwork || | |||
work) { | netinfo->State == GSM_RoamingNetwork || | |||
netinfo->PacketState == GSM_HomeNetwork || | ||||
netinfo->PacketState == GSM_RoamingNetwork | ||||
) { | ||||
/* Set numeric format for AT+COPS? */ | /* Set numeric format for AT+COPS? */ | |||
smprintf(s, "Setting short network name format\n"); | smprintf(s, "Setting short network name format\n"); | |||
error = ATGEN_WaitForAutoLen(s, "AT+COPS=3,2\r", 0x00, 40, ID_Con figureNetworkInfo); | error = ATGEN_WaitForAutoLen(s, "AT+COPS=3,2\r", 0x00, 40, ID_Con figureNetworkInfo); | |||
/* Get operator code */ | /* Get operator code */ | |||
smprintf(s, "Getting network code\n"); | smprintf(s, "Getting network code\n"); | |||
error = ATGEN_WaitForAutoLen(s, "AT+COPS?\r", 0x00, 40, ID_GetNet workCode); | error = ATGEN_WaitForAutoLen(s, "AT+COPS?\r", 0x00, 40, ID_GetNet workCode); | |||
/* Set string format for AT+COPS? */ | /* Set string format for AT+COPS? */ | |||
smprintf(s, "Setting long string network name format\n"); | smprintf(s, "Setting long string network name format\n"); | |||
skipping to change at line 6320 | skipping to change at line 6327 | |||
{ATGEN_GenericReplyIgnore, "^BOOT:" ,0x00,0x00,ID_IncomingFra me }, | {ATGEN_GenericReplyIgnore, "^BOOT:" ,0x00,0x00,ID_IncomingFra me }, | |||
{ATGEN_GenericReplyIgnore, "^MODE:" ,0x00,0x00,ID_IncomingFra me }, | {ATGEN_GenericReplyIgnore, "^MODE:" ,0x00,0x00,ID_IncomingFra me }, | |||
{ATGEN_GenericReplyIgnore, "^DSFLOWRPT:" ,0x00,0x00,ID_IncomingFra me }, | {ATGEN_GenericReplyIgnore, "^DSFLOWRPT:" ,0x00,0x00,ID_IncomingFra me }, | |||
{ATGEN_GenericReplyIgnore, "^CSNR:" ,0x00,0x00,ID_IncomingFra me }, | {ATGEN_GenericReplyIgnore, "^CSNR:" ,0x00,0x00,ID_IncomingFra me }, | |||
{ATGEN_GenericReplyIgnore, "^HCSQ:" ,0x00,0x00,ID_IncomingFra me }, | {ATGEN_GenericReplyIgnore, "^HCSQ:" ,0x00,0x00,ID_IncomingFra me }, | |||
{ATGEN_GenericReplyIgnore, "^SRVST:" ,0x00,0x00,ID_IncomingFra me }, | {ATGEN_GenericReplyIgnore, "^SRVST:" ,0x00,0x00,ID_IncomingFra me }, | |||
{ATGEN_GenericReplyIgnore, "^SIMST:" ,0x00,0x00,ID_IncomingFra me }, | {ATGEN_GenericReplyIgnore, "^SIMST:" ,0x00,0x00,ID_IncomingFra me }, | |||
{ATGEN_GenericReplyIgnore, "^STIN:" ,0x00,0x00,ID_IncomingFra me }, | {ATGEN_GenericReplyIgnore, "^STIN:" ,0x00,0x00,ID_IncomingFra me }, | |||
{ATGEN_GenericReplyIgnore, "+ZUSIMR:" ,0x00,0x00,ID_IncomingFra me }, | {ATGEN_GenericReplyIgnore, "+ZUSIMR:" ,0x00,0x00,ID_IncomingFra me }, | |||
{ATGEN_GenericReplyIgnore, "+SPNWNAME:" ,0x00,0x00,ID_IncomingFra me }, | {ATGEN_GenericReplyIgnore, "+SPNWNAME:" ,0x00,0x00,ID_IncomingFra me }, | |||
{ATGEN_GenericReplyIgnore, "+PSBEARER:" ,0x00,0x00,ID_IncomingFrame }, | ||||
{ATGEN_GenericReplyIgnore, "+ZEND" ,0x00,0x00,ID_IncomingFra me }, | {ATGEN_GenericReplyIgnore, "+ZEND" ,0x00,0x00,ID_IncomingFra me }, | |||
{ATGEN_IncomingSMSInfo, "+CDSI:" ,0x00,0x00,ID_Inc omingFrame }, | {ATGEN_IncomingSMSInfo, "+CDSI:" ,0x00,0x00,ID_Inc omingFrame }, | |||
{ATGEN_GenericReplyIgnore, "+CLCC:" ,0x00,0x00,ID_IncomingFra me }, | {ATGEN_GenericReplyIgnore, "+CLCC:" ,0x00,0x00,ID_IncomingFra me }, | |||
{ATGEN_GenericReplyIgnore, "#STN:" ,0x00,0x00,ID_IncomingFra me }, | {ATGEN_GenericReplyIgnore, "#STN:" ,0x00,0x00,ID_IncomingFra me }, | |||
/* Sony Ericsson screenshot */ | /* Sony Ericsson screenshot */ | |||
{SONYERICSSON_Reply_Screenshot, "AT*ZISI=?\r", 0x00,0x00,ID_Scre enshot }, | {SONYERICSSON_Reply_Screenshot, "AT*ZISI=?\r", 0x00,0x00,ID_Scre enshot }, | |||
{SONYERICSSON_Reply_ScreenshotData, "AT*ZISI\r", 0x00,0x00,ID_Scre enshot }, | {SONYERICSSON_Reply_ScreenshotData, "AT*ZISI\r", 0x00,0x00,ID_Scre enshot }, | |||
#ifdef GSM_ENABLE_ATOBEX | #ifdef GSM_ENABLE_ATOBEX | |||
End of changes. 5 change blocks. | ||||
3 lines changed or deleted | 10 lines changed or added |