Disable SSL completely for SIM900

This commit is contained in:
Volodymyr Shymanskyy
2018-03-14 01:05:07 +02:00
parent 9068132ebf
commit 70e14853cd

View File

@@ -288,11 +288,15 @@ public:
} }
bool hasSSL() { bool hasSSL() {
#if defined(TINY_GSM_MODEM_SIM900)
return false;
#else
sendAT(GF("+CIPSSL=?")); sendAT(GF("+CIPSSL=?"));
if (waitResponse(GF(GSM_NL "+CIPSSL:")) != 1) { if (waitResponse(GF(GSM_NL "+CIPSSL:")) != 1) {
return false; return false;
} }
return waitResponse() == 1; return waitResponse() == 1;
#endif
} }
/* /*
@@ -745,11 +749,13 @@ public:
protected: protected:
bool modemConnect(const char* host, uint16_t port, uint8_t mux, bool ssl = false) { bool modemConnect(const char* host, uint16_t port, uint8_t mux, bool ssl = false) {
#if !defined(TINY_GSM_MODEM_SIM900)
sendAT(GF("+CIPSSL="), ssl); sendAT(GF("+CIPSSL="), ssl);
int rsp = waitResponse(); int rsp = waitResponse();
if (ssl && rsp != 1) { if (ssl && rsp != 1) {
return false; return false;
} }
#endif
sendAT(GF("+CIPSTART="), mux, ',', GF("\"TCP"), GF("\",\""), host, GF("\","), port); sendAT(GF("+CIPSTART="), mux, ',', GF("\"TCP"), GF("\",\""), host, GF("\","), port);
rsp = waitResponse(75000L, rsp = waitResponse(75000L,
GF("CONNECT OK" GSM_NL), GF("CONNECT OK" GSM_NL),