Macbook with docker environment correctly installed and running and esptool installed too
Nodemcu board 0.9 (ESP8266MOD from AI-Thinker, ESP-12 module, 16 pins, nodemcu 0.9.6 firmware to start)
Step 1
Marcelstoer nodemcu-firmware repository cloned (latest master release cloned) through
git clone https://github.com/nodemcu/nodemcu-firmware.git
to my user folder -> nodemcu-firmware, done
Step 2
Build the firmware through docker console (i just want INTEGER firmware), change to my nodemcu-firmware folder an then
docker run -e "INTEGER_ONLY" -e --rm -ti -v `pwd`:/opt/nodemcu-firmware marcelstoer/nodemcu-build
no file edited from app/include folder (all that lovely code running like hacker movie from console ) i don´t paste here the whole console output because is huge
and i get the .bin finished correctly (nodemcu_integer_master_20160626-2132.bin), done
Step 3
Flashing the .bin file through esptool
esptool.py --port /dev/cu.wchusberserial1410 write_flash -fm dio -fs 32m 0x00000 nodemcu_integer_master_20160626-2132.bin
esptool.py v1.1
Connecting...
Running Cesanta flasher stub...
Flash params set to 0x0240
Writing 405504 @ 0x0... 405504 (100 %)
Wrote 405504 bytes at 0x0 in 35.2 seconds (92.2 kbits/s)...
Leaving...
done
Step 4
Exit from all the console windows and test via Lua Uploader serial window at 115200 bauds, and this is what i have
SENT: node.restart()
s$rl???
NodeMCU 1.5.1 build unspecified powered by Lua 5.1.4 on SDK 1.5.1(e67da894)
after the second restart, i have this
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x40100000, len 27528, room 16
tail 8
chksum 0x2d
load 0x3ffe8000, len 2184, room 0
tail 8
chksum 0x9a
load 0x3ffe8888, len 8, room 0
tail 8
chksum 0xc1
csum 0xc1
don't use rtc mem data
;l???
NodeMCU 1.5.1 build unspecified powered by Lua 5.1.4 on SDK 1.5.1(e67da894)
the module seems no restart randomly, but this is the script i run to test and have a bad behaviour
init.lua
wifi.setmode(wifi.STATION)
wifi.sta.config("INF1N1TUM1369","3ncr1pt4d4")
dofile("flovidpdoRESPUESTA.lua")
flovidpdoRESPUESTA.lua
function datos()
azar = math.random(0,10)
conn = net.createConnection(net.TCP, 0)
conn:on("receive", function(conn, payload)
print(payload)
end)
conn:on("connection", function(conn, payload)
print("Conectado a flovid...")
print("Enviando dato: "..azar)
conn:send("GET /valoresPDO.php?valmed="..azar.." HTTP/1.1\r\n")
conn:send("Host: lab.flovid.com.mx\r\n")
conn:send("Accept: */*\r\n")
conn:send("User-Agent: Mozilla/4.0 (compatible; esp8266 Lua; Windows NT 5.1)\r\n")
conn:send("\r\n")
end)
conn:connect(80,"lab.flovid.com.mx")
conn:on("disconnection", function(conn)
print("Desconectado de flovid...")
print("-------------------------")
end)
end
datos()
--Se ejecuta el envío de datos cada 1 minuto
tmr.alarm(1, 60000, 1, function() datos() end)
the code just send a random value between 0 and 10 and record the value in a MySql DB to the remote server, so when new data is stored to the DB the PHP page returns a message that a sucess record was entered to de data base
with the 0.9.6 firmware all works perfectly, but in the new firmware no more i don´t have a response from the server and the random values always seems to be the same (10,10,7, 9 and go so on...) after a new restart.
I hope with this info you can help me this time
Thanks a lot for your time and patience, regards