ESP32 web server with AJAX functionality

santanapablo1975
Posts: 34
Joined: Wed Feb 15, 2017 8:31 pm

ESP32 web server with AJAX functionality

Postby santanapablo1975 » Mon Oct 02, 2017 1:34 pm

esch_esp wrote:Hello,

To get the thermal pad connected, I used one of the standard adapter boards from ali e.g. https://www.aliexpress.com/item/5Pcs-ES ... 178.bnub8x&. Then drilled a 1.5 mm hole through the thermal pad position on the adapter board.
By that it was easy to solder the thermal pad from the back. The proper way of course would be to have a via in the board design ..
So far I have not tried thermal paste. But also did not expect that much heat dissipation.
I did not do any benchmark tests. Just running a webserver based on a local filesystem, including an adapted version of tinyshell. Debugging information is transferred over tcpip to an ajax based log window. The idf is version 2, freertos. This of course if not much load on that CPU yet.
Ambient temperature around 22 degrees celsius.
Touching the metal case of a board which has no thermal contact and shows around 140 with the finger, the value goes down by about 5 values. So there is an effect, but not that high. I was surprised, that frequency scaling still is not supported via the API, that could be the answer for some heat issues. I am running my application at 240 MHz.
Hello esch_esp

In your post you mentioned the use of ajax, right now im am testing a web server on the esp32 and I would like to have ajax functionalities.. would you mind to point me with some code around it?

Thanks

Juan

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: ESP32 web server with AJAX functionality

Postby ESP_Angus » Wed Oct 04, 2017 11:18 pm

(This post has been split from this thread as it's a new topic.)

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: ESP32 web server with AJAX functionality

Postby kolban » Thu Oct 05, 2017 12:32 am

Juan,
There are a number of excellent Web Servers / HTTP Servers available for the ESP32. Some of the more popular ones based themselves on Mongoose networking library.

Un-abashedly trying to say "Oooh look at me" ... here is my own contribution to the web servers / http servers story:

https://github.com/nkolban/esp32-snippe ... Server.pdf

I am presuming you want a Web Server that can respond to browser oriented REST calls.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

santanapablo1975
Posts: 34
Joined: Wed Feb 15, 2017 8:31 pm

Re: ESP32 web server with AJAX functionality

Postby santanapablo1975 » Fri Oct 06, 2017 3:44 pm

Thanks ESP_angus for the split ;)

Thanks Mr Kolban for the links!

Have a nice WE

Juan

santanapablo1975
Posts: 34
Joined: Wed Feb 15, 2017 8:31 pm

Re: ESP32 web server with AJAX functionality

Postby santanapablo1975 » Thu Oct 12, 2017 2:49 pm

Hi Mr Kolban.

Thanks for the links again, after some test I was able to create a html with a script inside and the esp32 respond as a server in a JSON format, and it update the web page properly according to the sent information...

on the other hand after some reading around REST, I have found some similarities with SNMP, I would like to ask you your opinion about REST vs SNMP?

right now I am testing a lot, but sure SNMP is on the road map, but now i have hear about REST ;)

maybe we should split this last question about REST and SNMP?

Regards

Thanks in advance!

Juan

esch_esp
Posts: 7
Joined: Mon May 08, 2017 8:54 am

Re: ESP32 web server with AJAX functionality

Postby esch_esp » Thu Oct 19, 2017 12:15 pm

Hello,

I use the web server from sprite on an esp32 with html and javascript files to get data to the browser with ajax as
you described it.

cmorgan
Posts: 89
Joined: Thu Aug 24, 2017 12:52 am

Re: ESP32 web server with AJAX functionality

Postby cmorgan » Thu Oct 19, 2017 12:33 pm

esch_esp wrote:Hello,

I use the web server from sprite on an esp32 with html and javascript files to get data to the browser with ajax as
you described it.
Also some self promotion, I have a fork of Sprite's server with a range of changes collected from other forks of the same project, https support etc: https://github.com/chmorgan/libesphttpd

Ajax is fine as the server can respond to a number of simultaneous requests and supports cgi functions to plug into URIs, a flash filesystem so you can drop files in etc.

santanapablo1975
Posts: 34
Joined: Wed Feb 15, 2017 8:31 pm

Re: ESP32 web server with AJAX functionality

Postby santanapablo1975 » Thu Oct 19, 2017 7:15 pm

Thanks all for the support!

Cheers!

Juan

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: ESP32 web server with AJAX functionality

Postby kolban » Sun Dec 10, 2017 6:56 pm

My perspective on SNMP vs REST is that they serve dramatically different purposes. REST is a client/server based protocol used to send update requests to a partner or request data from the partner. SNMP is all about efficiently retrieving/querying status information about a device.

While if what you want to do is send a query request to an ESP32 to ask for its status, in theory SNMP could be used to process this however ... the core question (in my mind) is the nature of the client. If you have SNMP based client software then SNMP is the solution ... if you have ANYTHING other than an SNMP client, then I would go with REST as that provides signficantly more permutations for clients than SNMP.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

santanapablo1975
Posts: 34
Joined: Wed Feb 15, 2017 8:31 pm

Re: ESP32 web server with AJAX functionality

Postby santanapablo1975 » Mon Dec 11, 2017 6:37 pm

Hello Mr Kolban.

Thank you very much for the explanation.

In the mean time I have tried the SNMP following the tips form this link

http://www.nongnu.org/lwip/2_0_x/group_ ... 7b5bbc22be

Thanks again and have a nice week.


Regards

Juan

Who is online

Users browsing this forum: No registered users and 52 guests