mirror of
https://github.com/KevinMidboe/TinyGSM.git
synced 2025-10-29 18:00:18 +00:00
Fixed modem name request on ublox
This commit is contained in:
@@ -217,7 +217,6 @@ public:
|
||||
*/
|
||||
|
||||
bool init(const char* pin = NULL) {
|
||||
DBG(GF("### Modem Defined:"), getModemName());
|
||||
if (!testAT()) {
|
||||
return false;
|
||||
}
|
||||
@@ -227,6 +226,7 @@ public:
|
||||
if (waitResponse() != 1) {
|
||||
return false;
|
||||
}
|
||||
DBG(GF("### Modem:"), getModemName());
|
||||
getSimStatus();
|
||||
return true;
|
||||
}
|
||||
@@ -350,6 +350,8 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool sleepEnable(bool enable = true) TINY_GSM_ATTR_NOT_IMPLEMENTED;
|
||||
|
||||
/*
|
||||
* SIM card functions
|
||||
*/
|
||||
@@ -671,14 +673,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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user