Browse Source

Fix get modem name

Signed-off-by: Sara Damiano <sdamiano@stroudcenter.org>
v_master
Sara Damiano 5 years ago
parent
commit
7235f76efa
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/TinyGsmModem.tpp

+ 2
- 2
src/TinyGsmModem.tpp View File

@ -141,8 +141,8 @@ class TinyGsmModem {
thisModem().sendAT(GF("+GMM")); thisModem().sendAT(GF("+GMM"));
String res2; String res2;
if (thisModem().waitResponse(1000L, res2) != 1) { return "unknown"; } if (thisModem().waitResponse(1000L, res2) != 1) { return "unknown"; }
res1.replace("\r\nOK\r\n", "");
res1.replace("\rOK\r", "");
res2.replace("\r\nOK\r\n", "");
res2.replace("\rOK\r", "");
res2.trim(); res2.trim();
String name = res1 + String(' ') + res2; String name = res1 + String(' ') + res2;


Loading…
Cancel
Save