ESP8266 Webserver Project

Moderator: Sprite_tm

User avatar
By managed_prune
#15614
Israel Lot wrote:My first goal was to have an interface I could use to configure the board and then shut it down. Image you got it from the store, took it home and configure you wifi network on it. Then the interface can vanish until you need to configure it again.
It was not meant to be connected via it's IP. But of course, we can add a module on cgi that will account for that if that's what needed.


Ah I see, you didn't expect the HTTP interface to be used on the local network. I guess that makes sense, I figured it was nice to have it there anyway so you can access the relay toggles etc.

scratchrobot wrote:Maybe you can tell me how i can change the GPIO 4 and GPIO 5 to GPIO 12 and GPIO 13 in your code so i can use the relais on the ESP-09.


Check the relay.c, around line 158. The pin numbers are hard coded there, and I think at the moment that's the only place but I'm not sure.
User avatar
By jcferreira
#15621
managed_prune wrote:Just having a look at this, first impressions are quite good!

One issue I've noticed is that the captive portal works a bit weirdly when you're using AP and station together.

So, for example, I connect to the AP and am redirected to "smart.relay.com" and configure my wifi. It gets given 192.168.1.246 for example.

I then try and connect to that IP directly on my home wifi and it redirects me to "smart.relay.com" again, which obviously isn't a real site. If I turn off captive portal then instead of the redirect I get a 400. I think on the station side of things I should be able to access it using the IP as it won't even have a hostname set up?

I'll continue to play around today, thanks for the hard work from all contributors though!



Hello managed_prune and every one else. This is my first post, and i'm yet a complete noob about this wonderfoul device.
First, i'd like to thanks a lot to Israel Lot, Sprite_tm and everyone else who made this AMAZING job. It blow my mind.

Answering your question, managed_prune, i've faced the same issue, but "bypassed" it by commenting the line 'http_server_bind_domain(INTERFACE_DOMAIN);' in file 'app/http/app.c'.

Hope it helps

Best Regards from Brasil
User avatar
By LEDAero
#15647
hdrut wrote:Hi,

i´d like to try it on my ESP, how exactly you compile it??

Cheers and congrats on your efforts!


It's quite involved:

Firstly you need to install the ESP8266 SDK (Either Expressif's, or an independent).

Once you have done that, you can create the binaries, and using the esptool, load the firmware to the ESP.

(for those shit-hot developers out there that just threw their hands up in horror at my explanation, soz. I am fumbling through this without benefit of any development background...)

The SDK has the apps needed to compile the code for the Extensa lx103 chips. Without that installed and working correctly, you won't get any further - unless someone compiles it and posts the binary for you to upload.
User avatar
By Chris--A
#15761 Hi, thanks for this Server. I have not used it yet, but its a great learning piece.

I finally got your mkfs.py working (first py script run ever!). And I'll try implementing the rofs in my code using the Arduino IDE. But I do have a question regarding the objects created.

My question is regarding the generated array marked with 'ICACHE_STORE_ATTR ICACHE_RODATA_ATTR'.

Is this declaration putting the array in Flash memory only (not in ram apart from pointer to data)?
I come from an AVR background and this seems to be a 'PROGMEM' equivalent. I'm assuming this as some comments in rofs mention data being on a 32Bit boundary, which is what the SPI flash uses.

Great Job.