So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By czaro05
#66387 Hello,
since I have updated firmware (using https://nodemcu-build.com/ ) from: 0.9.6-dev_20150704 release to newer, the following code (from nodemcu.com) stopped working:
Code: Select allprint(wifi.sta.getip())
--nil
wifi.setmode(wifi.STATION)
wifi.sta.config("SSID","password")
print(wifi.sta.getip())
--192.168.18.110

-- a simple http server
srv=net.createServer(net.TCP)
srv:listen(80,function(conn)
    conn:on("receive",function(conn,payload)
    print(payload)
    conn:send("<h1> Hello, NodeMcu.</h1>")
    end)
end)

To be clear, it seems that connection work (beacuse I see MCU on the list on my router), but when I type the corresponding address of MCU in the browser, it could not connect to server. Do you have any ideas, how to fix it?
Kind regards
Czarek