From 1f4a1af6edf5978fe952f5d39daa93ab8914cd3e Mon Sep 17 00:00:00 2001 From: Veijo Pesonen Date: Mon, 19 Nov 2018 13:16:56 +0200 Subject: [PATCH] Truncates data to be send to modem to 2048 bytes --- components/wifi/esp8266-driver/ESP8266/ESP8266.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/wifi/esp8266-driver/ESP8266/ESP8266.cpp b/components/wifi/esp8266-driver/ESP8266/ESP8266.cpp index f147e65e22..f5960c548c 100644 --- a/components/wifi/esp8266-driver/ESP8266/ESP8266.cpp +++ b/components/wifi/esp8266-driver/ESP8266/ESP8266.cpp @@ -550,6 +550,9 @@ bool ESP8266::dns_lookup(const char *name, char *ip) nsapi_error_t ESP8266::send(int id, const void *data, uint32_t amount) { + // +CIPSEND supports up to 2048 bytes at a time + amount = amount > 2048 ? 2048 : amount; + //May take a second try if device is busy for (unsigned i = 0; i < 2; i++) { _smutex.lock();