Hi Folks,
I develop a system based on the followings:
- TM4C1294 TI Cortex M4 CPU
- FreeRTOS 7.x
- TinyFS for FAT file system handling on SD card
- LwIP 1.4.1 netconn API
I have to receive files (20-40MB) via HTTP POST request and store them into SD card (basically it is a simple HTTP file server).
Due to the other design decisions and the FreeRTOS, using "netconn" API seems to be the most suitable for me.
My problem is that it only works well with small files (20~100B) not with the desired sizes. I implemented the following logic looks like:
- wait for an incoming connection
- parse the HTTP header (excluding resource name and method)
- write the rest of data from the current pbuf
- repeat the following while data can be read from the connection:
- acquire the next "part" of data by netbuf_next()
- if it results -1
- delete the current netbuf by netbuf_delete()
- call netconn_recv() on the connection
- store data (if all the above result success)
Can anybody help me, what should I fix? What did I wrong?
Regards,
Nobert