Fixed modem name request on ublox

This commit is contained in:
Sara Damiano
2018-09-24 15:08:57 -04:00
parent 2d1d9deccd
commit 69c1824539
8 changed files with 21 additions and 27 deletions

View File

@@ -213,7 +213,6 @@ public:
*/
bool init(const char* pin = NULL) {
DBG(GF("### Modem Defined:"), getModemName());
if (!testAT()) {
return false;
}
@@ -225,7 +224,7 @@ public:
sendAT(GF("+CMEE=2"));
waitResponse();
#endif
DBG(GF("### Modem:"), getModemName());
getSimStatus();
return true;
}
@@ -329,6 +328,8 @@ public:
return true;
}
bool sleepEnable(bool enable = true) TINY_GSM_ATTR_NOT_IMPLEMENTED;
/*
* SIM card functions
*/
@@ -644,14 +645,11 @@ public:
protected:
bool modemConnect(const char* host, uint16_t port, uint8_t mux, bool ssl = false) {
sendAT(GF("+QIOPEN="), GF("\"TCP"), GF("\",\""), host, GF("\","), port);
sendAT(GF("+QIOPEN="), mux, GF("\"TCP"), GF("\",\""), host, GF("\","), port);
int rsp = waitResponse(75000L,
GF("CONNECT OK" GSM_NL),
GF("CONNECT FAIL" GSM_NL),
GF("ALREADY CONNECT" GSM_NL));
if ( rsp != 1 ) {
return false;
}
return (1 == rsp);
}