As the title says... Chat on...

User avatar
By marcelstoer
#75445
Alexsander Magalhães wrote:[code]Soft restart by user command
node.restart()
>
ets Jan 8 2013,rst cause:2, boot mode:(3,6)


Well, obviously you've got a `node.restart()` in your code or you pressed that button in ESPlorer. Never mind the "Can't autodetect firmware, because proper answer not received." message from ESPlorer; it's just buggy.
User avatar
By Alexsander Magalhães
#75519
marcelstoer wrote:Well, obviously you've got a `node.restart()` in your code or you pressed that button in ESPlorer. Never mind the "Can't autodetect firmware, because proper answer not received." message from ESPlorer; it's just buggy.


Yes indeed sir, I did press it to show you the startup sequence.

But I managed to fix it :D
It took me long cause I also realized that I was using the server in an old way not suported anymore by the current firmware. Now my server is using Terry's example and using lots of if-else to agregate the answer acordingly.

Another tricky part was that lots of browsers send the answer in two separated packages, one with the header and other with the body, so I had to search for valid data before answering anything.

But the pinackle was the _G. table. Dude... this guy made me realise I was writing to the wifi.sta by mistake when assigning _G.wifi = "anything".

I know I shall use the _G. table with caution, but I still dont know the variable names already declared there and, in my code, _G.wifi made total sense to use for storing my router's ssid, but unfortunately it was overwriting the wifi.sta module, that now I know its accessible this way.

Anyway it now needs lots of work, but I will upload a working example soon.
And thanks you guys for your awesome work with NodeMCU and the cloud build. Me and my friends definately want to pay you guys a beer soon.

Cheers!

EDIT: I almost forgot: yes it can be done! Infact I am even trying many configs without a single reset while polling its results from the client side.