LPC1768 - LWIP Limit

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 18, 2016 by lpcware
Content originally posted in LPCWare by Rosfudum on Tue Mar 29 07:24:37 MST 2016
Dear All,

I'd like to develop my Web Server using LPC1768 microcontroller.
I've started my project with webserver demo without RTOS.

Everything is working fine. LWIP is a great open source project.
But I've got some limits I'm not able to workaround.

I've created my html web page (very light) and I use FORM to post parameters from browser to server.
Sometimes it doesn's work and I used wireshark to figured out why.

According to LWIP wiki   I got it's not possible to enqueue more than 2 frames.
I mean, when client send some data, in payload field, LWIP server enqueues up to two frames and invokes onReceive() callback function.

In my function onReceive() I parse html POST data and store values.

Sniffing with Wireshark I figured out when I doen's work it's because html POST is divided in 3 parts and it's consistent with my debugging.
When browser (chrome or firefox) send POST frame in three parts, my application lose last packet.

That's really annnoyng just because POST parameters are located at the end of TCP frame, so, I can get all s**t header, but I lose data I need.

Is there any solution?
Can I enqueue more than two frame? Or, alternatively, is it possibile to say to browser to enqueue POST data before headers?

Thank you for your support!