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();