ESP8266 Webserver Project

Moderator: Sprite_tm

User avatar
By dnts
#6262 Very cool example. I've already exploited it to capture GET requests and control an IR LED to emulate remote control transmissions. Way cool!.
Two things bug me at this time:
1. How to save the ST SSID and password into the flash as they get reset to MYAP default on every power cycle (let alone re-flashing). I think I've traced the mode changing function wifi_set_opmode to user_interface.h which exposes some of the library commands so the mode itself is persistent but SSID and password are not.
2. I'm using the Windows based SDK (no Linux for me) and I've tried the workaround to compile the flie system image but it failed. If anyone has this up and running on a Win machine and can shed some light on exactly what to do I'd much appreciate the effort.

Thx.

P.S. another quick one - is there a way to stop all printing to the UART and only have my specific functions access it? so that I can run an HTTPD server that receives some GET and POST requests and transfer only their arguments to the UART without all the current debug printing getting in the way?
User avatar
By Sprite_tm
#6321
dnts wrote:How to save the ST SSID and password into the flash as they get reset to MYAP default on every power cycle (let alone re-flashing). I think I've traced the mode changing function wifi_set_opmode to user_interface.h which exposes some of the library commands so the mode itself is persistent but SSID and password are not.

You mean the SSID and password of the AP it connects to in STA mode? It should save that, at least, last time I checked the SDK itself does that. What version of the SDK do you use?

P.S. another quick one - is there a way to stop all printing to the UART and only have my specific functions access it? so that I can run an HTTPD server that receives some GET and POST requests and transfer only their arguments to the UART without all the current debug printing getting in the way?


You can disable the printfs in the httpd code (I should create a define for that) but that doesn't disable the printfs of the SDK itself. The usual trick, I believe, is to install a putchar handler using os_install_putc1 and either use that to send the data to UART1 or drop it alltogether, and then use the putchar routine of uart0 to send your data.
User avatar
By FeK9
#6374
Hartl192 wrote:
bkrajendra wrote:
Sprite_tm wrote:Just a FYI: I have developed httpd and the mkespfs stuff, but I can only develop/test it under Linux; I don't do Windows. If someone figures a way to make things work in Windows, please post them here; same goes for patches that make Windows-support easier. Don't go expecting Windows-support from me, though; I'll just advise you to install Linux :P


Hey all ... I'm already doing it with Windows64.
very efficiently. ...!

Could you please tell me how I can make the "webpages.espfs"-File with Windows?
Thank you


GDay Hart192

There's at the moment no easy way to make 'webpages.espfs' pages with Win7 x64... :(

I'm using 'Cherts' DevKit for Windows + Eclipse IDE...

This "DevKit..." as yet is unable to compress/heatshrink/compile a 'webpages.espfs' directly, it compiles the source but has issues
when dealing with the Web Root folders...

For that I went 'Cygwin' gcc way, compiled heatshrink's encoders source...

This I shrink'd, only afterwards did I modify it with a plain txt file called 'Quotes.txt' for a quaint idea of a 'Fortune Cookie (Unix)'...

│ index.tpl
│ led.tpl
│ style.css

├───cats
│ cross-eyed-cat.jpg
│ junge-katze-iv.jpg
│ kitten-loves-toy.jpg

└───wifi
140medley.min.js
connecting.html
icons.png
style.css
wifi.tpl

-----------------------------------------------------------------

If you still want tinkle with it (webpages.espfs), make a separate post on these forums... I'll try to give U some pointers... :)