mirror of
https://github.com/KevinMidboe/TinyGSM.git
synced 2025-10-29 18:00:18 +00:00
modemRead MUST end with sock_available correct
This commit is contained in:
@@ -183,23 +183,16 @@ public:
|
||||
String getModemName() {
|
||||
String name = "SIMCom SIM7000";
|
||||
|
||||
sendAT(GF("+CGMI"));
|
||||
String res1;
|
||||
if (waitResponse(1000L, res1) != 1) {
|
||||
return name;
|
||||
}
|
||||
res1.replace(GSM_NL "OK" GSM_NL, "");
|
||||
res1.trim();
|
||||
|
||||
sendAT(GF("+GMM"));
|
||||
String res2;
|
||||
if (waitResponse(1000L, res2) != 1) {
|
||||
return name;
|
||||
}
|
||||
res2.replace(GSM_NL "OK" GSM_NL, "");
|
||||
res2.replace("_", " ");
|
||||
res2.trim();
|
||||
|
||||
name = res1 + String(' ') + res2;
|
||||
name = res2;
|
||||
DBG("### Modem:", name);
|
||||
return name;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user