Chat freely about anything...

User avatar
By ArnieO
#19583 I (and others, I have read) have recovered several locked ESPs by flashing AT firmware (I think more or less any version will do), then reflashing with nodeMCU/Lua firmware. I have no idea why this works, but it does.
User avatar
By Ambro
#19596 Done as suggested but the following messages from the console:

NodeMCU 0.9.5 build 20150318 powered by Lua 5.1.4
> IP unavailable, Waiting..
IP unavailable, Waiting..
IP unavailable, Waiting..
PANIC: unprotected error in call to Lua API (init.lua:9: attempt to call field 'getip' (a nil value))
?)�þ19@H
)ôD�9ÿD€ÿø

NodeMCU 0.9.5 build 20150318 powered by Lua 5.1.4
> IP unavailable, Waiting..
IP unavailable, Waiting..

Now the esp does not longer respond to lua commands . At power_on I get the unreadable text again.
I will recover it.

Ambro
User avatar
By Ambro
#19607 I have my esp at the following position:
IP: 192.168.0.106
port : 86
ds18b20 connected to: GPIO_0
Could you please post the lines to be changed in the init.lua, ds18b20.lua and ds18b20-web.lua ?
I want to be sure to do it properly.
Thanks
Ambro
User avatar
By twaymouth
#19616 I have used ds18b20.lua and ds18b20-web.lua exactly as they came from the nodemcu wiki with no changes, init .lua I have changed the line highlighted in red. It looks like you are getting really close, the error "PANIC: unprotected error in call to Lua API (init.lua:9: attempt to call field 'getip' (a nil value))" is an indication that you have a syntax error in your init.lua code

init.lua:

wifi.setmode(wifi.STATION)

--Change to match your network
--wifi.sta.config("SSID","PASSWORD")

wifi.sta.connect()
tmr.alarm(1, 1000, 1, function()
if wifi.sta.getip()== nil then
print("IP unavaiable, Waiting...")
else
tmr.stop(1)
print("Connected, IP is "..wifi.sta.getip())
dofile("ds18b20-web.lua")
end
end)


I have uploaded a copy of the init.lua I am using to this page: https://drive.google.com/open?id=0B6gn-WoB7xpCb182ZF9YZGRvQkU&authuser=0 I am in Melbourne, time zone (UTC+10:00) Canberra, Melbourne, Sydney. I am also working on a video tutorial covering setting up a simple ESP web server and will share the link once it is complete. if you get errors in your code usually you can recover the module by restarting the module and issuing the command file.remove("init.lua") as soon as it boots.