mirror of
https://github.com/esp8266/Arduino.git
synced 2025-08-12 20:49:16 +03:00
Align types: int to unsigned int
Block send SMS until finished operation. GSM3IO.h. Keeps most of board-dependant pins Flush buffer after GPRS detach Delete some references to HardwareSerial.h Include OFF modem status
This commit is contained in:
@@ -61,19 +61,13 @@ int GSM3ShieldV1ModemVerification::begin()
|
||||
// get IMEI
|
||||
String GSM3ShieldV1ModemVerification::getIMEI()
|
||||
{
|
||||
String number;
|
||||
String number(NULL);
|
||||
// AT command for obtain IMEI
|
||||
String modemResponse = modemAccess.writeModemCommand("AT+GSN", 2000);
|
||||
// Parse and check response
|
||||
char res_to_compare[modemResponse.length()];
|
||||
modemResponse.toCharArray(res_to_compare, modemResponse.length());
|
||||
if(strstr(res_to_compare,"OK") == NULL)
|
||||
{
|
||||
return String(NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(strstr(res_to_compare,"OK") != NULL)
|
||||
number = modemResponse.substring(1, 17);
|
||||
return number;
|
||||
}
|
||||
return number;
|
||||
}
|
||||
|
Reference in New Issue
Block a user