Add TINY_GSM_TCP_KEEP_ALIVE
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
#define GSM_NL "\r\n"
|
#define GSM_NL "\r\n"
|
||||||
static const char GSM_OK[] TINY_GSM_PROGMEM = "OK" GSM_NL;
|
static const char GSM_OK[] TINY_GSM_PROGMEM = "OK" GSM_NL;
|
||||||
static const char GSM_ERROR[] TINY_GSM_PROGMEM = "ERROR" GSM_NL;
|
static const char GSM_ERROR[] TINY_GSM_PROGMEM = "ERROR" GSM_NL;
|
||||||
|
static unsigned TINY_GSM_TCP_KEEP_ALIVE = 120;
|
||||||
|
|
||||||
class TinyGsm
|
class TinyGsm
|
||||||
{
|
{
|
||||||
@@ -237,7 +238,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
int modemConnect(const char* host, uint16_t port, uint8_t mux) {
|
int modemConnect(const char* host, uint16_t port, uint8_t mux) {
|
||||||
sendAT(GF("+CIPSTART="), mux, ',', GF("\"TCP"), GF("\",\""), host, GF("\","), port, GF(",120"));
|
sendAT(GF("+CIPSTART="), mux, ',', GF("\"TCP"), GF("\",\""), host, GF("\","), port, GF(","), TINY_GSM_TCP_KEEP_ALIVE);
|
||||||
int rsp = waitResponse(75000L,
|
int rsp = waitResponse(75000L,
|
||||||
GFP(GSM_OK),
|
GFP(GSM_OK),
|
||||||
GFP(GSM_ERROR),
|
GFP(GSM_ERROR),
|
||||||
|
Reference in New Issue
Block a user