# Sending big data more than 10KB

**URL:** <https://forum.amebaiot.com/t/sending-big-data-more-than-10kb/1847>\
**Category:** SDK\
**Tags:** rtl872xd\
**Created:** [May 9, 2023, 5:13am UTC](https://forum.amebaiot.com/t/sending-big-data-more-than-10kb/1847 "2023-05-09T05:13:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tuxford](https://avatars.discourse-cdn.com/v4/letter/t/7feea3/32.png) [@Tuxford](https://forum.amebaiot.com/u/Tuxford)\
**Post date:** [May 9, 2023, 5:13am UTC](https://forum.amebaiot.com/t/sending-big-data-more-than-10kb/1847/1 "2023-05-09T05:13:06Z")

</div>

Hi All,  
If I send small buffer via WiFi it works fine but when I try to send data about 10KB it does’t work. Some times it crashes depends on size.  
If it does’t crash it return an interesting result.

```auto
if (isSocketAlive() == true) {
        auto rs = write(fd, (void *)buff, 10000);
       printf("XCommClient send body rs:%s %d; fd:%d; err:%d; sz:%d\n", (char *)buff, rs, fd, errno,
               serializedSize + strlen(dump));
}
```

> -1; fd:3; err:0; sz:12579  
> Not sent but errno is 0.

What the limitation of data size? If it impossible to change it how to workaround?

---

<div class="post-metadata">

**Author:** ![dakamaster](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/dakamaster/32/3588_2.png) [@dakamaster](https://forum.amebaiot.com/u/dakamaster)\
**Post date:** [September 18, 2023, 6:31am UTC](https://forum.amebaiot.com/t/sending-big-data-more-than-10kb/1847/2 "2023-09-18T06:31:00Z")

</div>

HI @Tuxford ,

Recently we have modified the `senddata()` API in `core/ard_socket.c` in commit: [Update send\_data() in ard\_socket.c (#203) · ambiot/ambd\_arduino@b31ef1d · GitHub](https://github.com/ambiot/ambd_arduino/commit/b31ef1d5a656a7600bc0d82dbe647c3a281cb4a8)

Maybe you could try whether this new API would help with this issue, this sperate the large data size into chunk of TCP\_MSS(1460 Bytes) and send accordingly.

Thank you.
