---
title: "W5500 client-How to handle receiving large file"
url: "https://maker.wiznet.io/forum/13936"
markdown_url: "https://maker.wiznet.io/forum/13936/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "cellkey"
created: "2020-07-15T12:40:10+09:00"
last_activity: "2023-10-13T14:18:29+09:00"
language: "en"
views: 688
replies: 10
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# W5500 client-How to handle receiving large file

## Question

Asked by cellkey on 2020-07-15 in Ethernet Chips.

Hello all:
I am sending and receiving short strings to/from my server without any problem.
I would like to be able to get large HEX file (updated firmware) , about 64K bytes, and looking for the best way to do it. I have to get the text data, convert it to binary and save it into memory while server sends the file.
Do I have to manage the sever transmit activity by some “flow control” mechanism?
Can I use interrupt to make receive more efficient?
How W5500 manage the RX buffer and the RX pointers when data exceeds buffer size?
Please advise…
Thanks
Dan

## Replies

### Reply 1 by cellkey, 2020-07-24

Well, I made it…
I can get the file ok, very easy, I must say… Lot easier than I thought…
Thanks for participating and support…
Dan …

### Reply 2 by Vien Huy Nguyen, 2023-10-04 (in reply to reply 1)

Hi Dan,

Could you share the solution? Thank you.

### Reply 3 by cellkey, 2023-10-11

Hi, that was long ago. Please remind me the subject and what you want to achieve…
Regards
Dan

### Reply 4 by cellkey, 2023-10-11

Do you mean reading file text from server?
If so I have to return to the code and share the relevant part.
Dan

### Reply 5 by cellkey, 2023-10-11

Do you have any experience with the WZ5500? do u work with it some how?

### Reply 6 by cellkey, 2023-10-11

Well, I read your post about your problem. My code is to get a HEX file from my server which is used to update firmware of the host controller. This is about 50k bytes in size. I don’t yet understand your post stucture and the problems that you are facing with it…
Dan

### Reply 7 by Vien Huy Nguyen, 2023-10-11

Hi Dan,

Thank you for replying.

I wanted to receive a large file send to the W5500 by the mean of a HTTP POST request.

Did you modify the WIZnet’s httpServer library or did you write your own code from scratch to achieve your tasks?

### Reply 8 by cellkey, 2023-10-13

Hi, i have not changed any thing in libraries. My server knew to get a request to send a file which was uploaded to it in advance. The code send to sever a request message (my own protocol) and get into receiving loop in which it get file (about 50K bytes) in several reading interactions to a local memory.
I can organize the relevant code and send it to you but it will take one or two days…
Is that ok?
Dan

### Reply 9 by cellkey, 2023-10-13

Hi, Attaching ZIP with few files for your inspection. The C file has the main proc RxUpdateFile which do the job. Try to understand the mechanism and if you still have questions ask me.
I added my own receiving proc to socket.c file.
Good luck
Dan

[WZ5500_LAN_FileReceiv.ZIP](https://maker.wiznet.io/forum/legacyFile.asp?path=uK9J4EqnOyByXe6qleNZotJqL2W.ZIP) (33.8 KB)

### Reply 10 by Vien Huy Nguyen, 2023-10-13

Thanks Dan. I really appreciate it.

---

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