• I have a HiLetgo NodeMCU LUA WiFi Internet ESP8266 Development Board.

    I was able to flash espruino_1v86_esp8266_combined_512.bin onto it.
    I have followed instructions found here: http://www.espruino.com/ESP8266_Flashing­

    I am able to connect and setup wifi and establish a connection to my network. I can ping the IP address and connect via telnet, screen, and Web IDE. I can connect via USB or wifi.

    When I attempt to save any script or power cycle, the wifi settings are lost and I have to reconnect. I have tried this multiple times.

  • You need to use wifi.save after connecting to have the settings save in flash.

    You only need to do this once.

  • Right, I've done that. But after trying to upload/flash some code that I enter into Web IDE there is a reboot and the wifi connection never comes back up. After I connect with screen over USB I see that the wifi configuration is missing, just like right after a fresh OS flash.
    Same thing will happen if I setup the wifi connection and then cycle the power.
    In both cases the wifi configuration is lost.

  • Can you paste the welcome screen of espruino with the version number and all that under it? Any warning about flash chip & size mismatch?

    The correct stand-alone saving command is require("Wifi").save(). Perhaps you can also paste the output of require("Wifi").getDetails() right before saving.

    NB: I haven't used the "combined" binary. I always flash bootloader, user1, blank, and rf defaults as individual files. Gordon wanted the combined binary to make things simpler, but I'm not convinced that there aren't ugly corner cases. For example, it doesn't clear/initialize the SDK's save areas.


  • | |_ ___ ___ _ ||___ ___
    | |_ -| . | _| | | | | . |
    |
    || || |_|||_|_|

          |_| http://espruino.com
    

    1v86 Copyright 2016 G.Williams

    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    Flash map 4MB:512/512, manuf 0xe0 chip 0x4016

    require("Wifi").getDetails()
    ={
    "status": "connected",
    "ssid": "someSsid",
    "password": "somePassword",
    "rssi": -61, "savedSsid": null }

  • FYI, I am able to successfully run Arduino sketches on the board.
    I was also able to load and run smart.js scripts.

  • After reflashing and uninstalling/reinstalling Web IDE things are working properly now.
    No idea what I did different to 'fix' things.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Cannot get wifi.save() to work. Wifi settings do not survive power cycle. Cannot save code.

Posted by Avatar for jfox @jfox

Actions