From 7235f76efa70413f9800494d5adc74fecbe1ee3c Mon Sep 17 00:00:00 2001 From: Sara Damiano Date: Wed, 19 Feb 2020 19:24:46 -0500 Subject: [PATCH] Fix get modem name Signed-off-by: Sara Damiano --- src/TinyGsmModem.tpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TinyGsmModem.tpp b/src/TinyGsmModem.tpp index 6f1a722..08405bd 100644 --- a/src/TinyGsmModem.tpp +++ b/src/TinyGsmModem.tpp @@ -141,8 +141,8 @@ class TinyGsmModem { thisModem().sendAT(GF("+GMM")); String res2; 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(); String name = res1 + String(' ') + res2;