mirror of
https://github.com/KevinMidboe/TinyGSM.git
synced 2025-10-29 18:00:18 +00:00
Totally different attempt
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user