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

@@ -370,8 +370,9 @@ public:
}
private:
int modemConnect(const char* host, uint16_t port, uint8_t mux) {
sendAT(GF("+CIPSTART="), mux, ',', GF("\"TCP"), GF("\",\""), host, GF("\","), port, GF(",120"));
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, GF(",120"));
else sendAT(GF("+CIPSTART="), mux, ',', GF("\"TCP"), GF("\",\""), host, GF("\","), port, GF(",120"));
int rsp = waitResponse(75000L,
GFP(GSM_OK),
GFP(GSM_ERROR),