---
title: "Packet size in MQTT"
url: "https://maker.wiznet.io/forum/14294"
markdown_url: "https://maker.wiznet.io/forum/14294/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "kamin"
created: "2021-07-18T04:50:12+09:00"
last_activity: "2021-07-27T04:48:33+09:00"
language: "en"
views: 833
replies: 8
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# Packet size in MQTT

## Question

Asked by kamin on 2021-07-18 in Ethernet Chips.

Hello
I’m using IoLibrary and I have this problem.
I’m using w5500 as my chip and I’m a mqtt client who is using iolibrary.
Until packet size is less than my socket dedicated volume everything is ok . I can subscribe and get message successfully .
But when packet size is more than socket dedicated volume, I receive nothing despite of subscribing this special topic.
Maximum socket dedicated volume is 16kb in w5500 chip, but my desired data size is more than 16kb its about 40kb .

Please help me solve this problem . what should I do ?
Thank you.

## Replies

### Reply 1 by irina, 2021-07-19

Anything over 40kb per packet is not available on our chip.

But if you want to send them sequentially, there is no problem with the code you are currently providing.

### Reply 2 by kamin, 2021-07-19 (in reply to reply 1)

Thanks for your support.

what is the exact maximum size that your chip support and where this information has been set in your chip?

how can i set maximum size in your chip?

how can i send and receive big packet message sequentially?

### Reply 3 by irina, 2021-07-20

In case of TCP mode, it can send up to 1460byte per packet.
![image](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/d/d69235e4794119eb63eeb828f01cbbadae0e657c.png)

Our chips not supports the fragmentation of TCP.
Therefore, in order to transmit a lot of data, it is necessary to control the memory.
For this part, we recommend that you check the send() / recv() function in the iolibrary that we provide.

### Reply 4 by kamin, 2021-07-20

hello irina thanks for your help.
I’m using mqtt protocol . do you have any solution for me ?
I will appreciate if you provide me piece of code for receiving a lot of data in mqtt using iolibrary?

### Reply 5 by irina, 2021-07-21

We can support the MQTT example but I don’t know if that code can receive and transmit large amounts of data.
This code simply supports MQTT.

![](https://github.githubassets.com/favicons/favicon.svg) [GitHub](https://github.com/WIZnet-ioLibrary/W5x00_MQTT)

![](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/e/e64f463c37ea2667f278ea5688491ca0877f5c94.png)

### [GitHub - WIZnet-ioLibrary/W5x00_MQTT: W5x00_MQTT](https://github.com/WIZnet-ioLibrary/W5x00_MQTT)

W5x00_MQTT. Contribute to WIZnet-ioLibrary/W5x00_MQTT development by creating an account on GitHub.

### Reply 6 by kamin, 2021-07-24

thanks, but this cant help us.
I have questions about details of ioLibrary.
would you please connect me with the developer of ioLibrary .

### Reply 7 by irina, 2021-07-27 (in reply to reply 6)

Ask your questions here.

### Reply 8 by kamin, 2021-07-27

we have sent and received large data with w5500 chip successfully by using its registers without iolibrary , but now we are using iolibrary and facing with problem, the issue is we cant receive large data . please provide me the process sequence of receiving large data using iolibrary. unfortunately the GitHub source code you mentioned didn’t help me .
please help me overcome this obstacle.

---

Source: https://maker.wiznet.io/forum/14294
