Totally different attempt

This commit is contained in:
SRGDamia1
2017-05-04 15:22:21 -04:00
parent f84789a49b
commit 8bc626f415
5 changed files with 57 additions and 42 deletions

View File

@@ -636,8 +636,9 @@ public:
}
private:
int modemConnect(const char* host, uint16_t port, uint8_t mux) {
sendAT(GF("+CIPSTART="), mux, ',', GF("\"TCP"), GF("\",\""), host, GF("\","), port);
int modemConnect(const char* host, uint16_t port, uint8_t mux, bool isUDP=false) {
if (isUDP) sendAT(GF("+CIPSTART="), mux, ',', GF("\"UDP"), GF("\",\""), host, GF("\","), port);
else sendAT(GF("+CIPSTART="), mux, ',', GF("\"TCP"), GF("\",\""), host, GF("\","), port);
int rsp = waitResponse(75000L,
GF("CONNECT OK" GSM_NL),
GF("CONNECT FAIL" GSM_NL),