Skip to content

Commit 1f4a1af

Browse files
author
Veijo Pesonen
committed
Truncates data to be send to modem to 2048 bytes
1 parent f54b250 commit 1f4a1af

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

components/wifi/esp8266-driver/ESP8266/ESP8266.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,9 @@ bool ESP8266::dns_lookup(const char *name, char *ip)
550550

551551
nsapi_error_t ESP8266::send(int id, const void *data, uint32_t amount)
552552
{
553+
// +CIPSEND supports up to 2048 bytes at a time
554+
amount = amount > 2048 ? 2048 : amount;
555+
553556
//May take a second try if device is busy
554557
for (unsigned i = 0; i < 2; i++) {
555558
_smutex.lock();

0 commit comments

Comments
 (0)