LPC1768 - LWIP Limit

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1768 - LWIP Limit

522 Views
lpcware
NXP Employee
NXP Employee
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!
Labels (1)
0 Kudos
2 Replies

253 Views
lpcware
NXP Employee
NXP Employee
bump
0 Kudos

253 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rosfudum on Thu Mar 31 04:03:38 MST 2016
I've found a solution by myself and I hope it can help someone.

I enabled LWIP_HTTPD_SUPPORT_POST define in file httpd.h
It enables few POST function that are not implemented in C code.

Thanks to this source code I was able to write my routines of previously unimplemented code.

Now all of POST parameters coming from client arrive in callback httpd_post_receive_data
0 Kudos