cancel
Showing results for 
Search instead for 
Did you mean: 

Demonstration code - how to add AJAX to LWIP on stm32

clock.1166
Senior

Hi.

There are very few topics regarding LWIP MCU which have any actual demonstration of implementing AJAX with LWIP. I am obviously not clever enough to do this from scratch, but why cant someone at least post some working code to show me how - or at least provide some useful pointers in the right direction? We all benefit from other people's work in some way or another.

Thanks Chris

3 REPLIES 3

I have tried to get this working, but unfortunately I failed.

I re-iterate: 'why cant someone at least post some working code to show me'

I am trying to learn!

Piranha
Chief II

Well, I partly agree to you, but then again - everyone is just waiting for someone else to do things, so that they can copy-paste and not invest their own RnD effort in it.

Take a look at the official example:

https://github.com/lwip-tcpip/lwip/blob/master/contrib/examples/httpd/post_example/post_example.c

To generate a response data dynamically, you will also need custom "files":

https://github.com/lwip-tcpip/lwip/blob/master/contrib/examples/httpd/genfiles_example/genfiles_example.c

And, to understand the AJAX basics, look at the relevant parts of this series of articles:

http://www.martyncurrey.com/esp8266-and-the-arduino-ide/