Skip to main content
clock.1166
Senior
April 28, 2022
Question

Demonstration code - how to add AJAX to LWIP on stm32

  • April 28, 2022
  • 2 replies
  • 2626 views

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

This topic has been closed for replies.

2 replies

Piranha
Principal III
May 2, 2022
clock.1166
Senior
May 2, 2022

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
Principal III
May 3, 2022

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/