Does anyone have an example of a web server?
Does anyone have an example of a web server?
I am looking for an example of the ESP32 being able to display html/javascript on a web page for example: 192.168.1.250
I actually have no idea of this concept so any pointers to what concepts to look at would be appreciated. I think the ESP32 would need to be a web server and process HTTP requests.
I have looked at Kolban's C++ snippets on HTTP and they seem thorough but I have some trouble understanding what's going on. If you see this Kolban, I just sent you an email inquiring about possibly doing a video tutorial on this topic, it would be greatly appreciated.
For starters I would like to understand what is required to get this set up. So far, I think the ESP32 should listen on port 80 for HTTP requests, process them, and return html/javascript? However it does seem much more complicated than that.
Thanks!
I actually have no idea of this concept so any pointers to what concepts to look at would be appreciated. I think the ESP32 would need to be a web server and process HTTP requests.
I have looked at Kolban's C++ snippets on HTTP and they seem thorough but I have some trouble understanding what's going on. If you see this Kolban, I just sent you an email inquiring about possibly doing a video tutorial on this topic, it would be greatly appreciated.
For starters I would like to understand what is required to get this set up. So far, I think the ESP32 should listen on port 80 for HTTP requests, process them, and return html/javascript? However it does seem much more complicated than that.
Thanks!
- iot-bits.com
- Posts: 25
- Joined: Wed Dec 21, 2016 6:14 am
- Location: India
- Contact:
Re: Does anyone have an example of a web server?
I ported HTTPD to ESP32 and the sockets work fine, but the code is very unstable right now. Plus I don't know what would be the best way to store files. SD card?
- Pratik
Just another hobbyist and consultant
Just another hobbyist and consultant
Re: Does anyone have an example of a web server?
I am working on a sample that is an HTTP Server with WebSockets and file access ... as a library that is built and consumable from C++.
See .. https://github.com/nkolban/esp32-snippe ... Server.cpp
However ... as of September 7th 2017, it is not ready for consumption. It is what I am actively tinkering with ... should expect it to be ready for play in October.
Again, this is just another HTTP server ... and we are already awash in those. My goal in re-inventing the wheel here is to 100% leverage C++ and make it 100% C++ based (classes, callbacks, encapsulation etc etc).
See .. https://github.com/nkolban/esp32-snippe ... Server.cpp
However ... as of September 7th 2017, it is not ready for consumption. It is what I am actively tinkering with ... should expect it to be ready for play in October.
Again, this is just another HTTP server ... and we are already awash in those. My goal in re-inventing the wheel here is to 100% leverage C++ and make it 100% C++ based (classes, callbacks, encapsulation etc etc).
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Does anyone have an example of a web server?
Is this something we can use directly? Not looked into yet.
http://www.freertos.org/FreeRTOS-Plus/F ... ver.html?0
http://www.freertos.org/FreeRTOS-Plus/F ... ver.html?0
Re: Does anyone have an example of a web server?
I'm having good luck with libesphttpd. The esp-idf branch is what you want. You'll want to put that into the esp-idf/components/ folder like esp-idf/components/libesphttpd and then look at the README.md for how to pass it an array of urls and initialize it.
In the near future I'll be pushing out a version with ssl (https) support as well as Linux support in case you'd like to test/debug under Linux.
You can find it at https://github.com/Spritetm/libesphttpd, my fork is at https://github.com/chmorgan/libesphttpd
In the near future I'll be pushing out a version with ssl (https) support as well as Linux support in case you'd like to test/debug under Linux.
You can find it at https://github.com/Spritetm/libesphttpd, my fork is at https://github.com/chmorgan/libesphttpd
Re: Does anyone have an example of a web server?
Oh, and libesphttpd also supports bundling and compressing files to a in-flash filesystem. This makes it super easy to include your resources in your project like images etc by simply putting them into a target folder and letting libesphttpd leverage heatshrink and gzip to compress and build them into a filesystem object that is built directly into your output application image.
If you run into any issues please let me know.
If you run into any issues please let me know.
cmorgan wrote:I'm having good luck with libesphttpd. The esp-idf branch is what you want. You'll want to put that into the esp-idf/components/ folder like esp-idf/components/libesphttpd and then look at the README.md for how to pass it an array of urls and initialize it.
In the near future I'll be pushing out a version with ssl (https) support as well as Linux support in case you'd like to test/debug under Linux.
You can find it at https://github.com/Spritetm/libesphttpd, my fork is at https://github.com/chmorgan/libesphttpd
Re: Does anyone have an example of a web server?
Sounds good. And wss:// too?cmorgan wrote:
In the near future I'll be pushing out a version with ssl (https) support
Re: Does anyone have an example of a web server?
Yep, it uses the same transport portions of the server so wss:// comes for free when you enable SSL mode.WiFive wrote:Sounds good. And wss:// too?cmorgan wrote:
In the near future I'll be pushing out a version with ssl (https) support
Re: Does anyone have an example of a web server?
Alright, pushed the changes out to https://github.com/chmorgan/libesphttpd ... f_chmorgan if you'd like to give it a test spin. It's working well here.WiFive wrote:Sounds good. And wss:// too?cmorgan wrote:
In the near future I'll be pushing out a version with ssl (https) support
Re: Does anyone have an example of a web server?
I also pushed out an example of using libesphttpd under Linux at https://github.com/chmorgan/libesphttpd_linux_example
Who is online
Users browsing this forum: Baidu [Spider], Google [Bot] and 132 guests