Browse Source

Disable SSL completely for SIM900

v_master
Volodymyr Shymanskyy 7 years ago
parent
commit
70e14853cd
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      src/TinyGsmClientSIM800.h

+ 6
- 0
src/TinyGsmClientSIM800.h 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),


Loading…
Cancel
Save