How to Restore original WEMOS D1 firmware ?



  • Is there anybody that could advise how to flash the original firmware back to the D1 ?
    were to get the .bin(s) ?

    thanks



  • You can build it with https://nodemcu-build.com/ and the flashing instructions are here: https://nodemcu.readthedocs.io/en/master/en/flash/



  • I afraid there is not any original firmwares except esp_init_data_default.bin provided in SDK.
    But this flash is just clean one without any data or programs inside used for clear memory.
    So you can use any flashes starts any compiled example program from Arduino GUI to NodeMcu and Python flash.

    My first received D1 Minis were with some NodeMcu flashes.
    My last received D1 Minis has example program shows list of WiFi SSIDs in a loop



  • @deshipu
    I am new to this and i try my best to understand how it works so i did the following steps with 90% success

    1. erase flash with esptool.py --port COM5 --baud 115200 erase_flash

    2. check flash type esptool.py --port COM5 --baud 115200 flash_id

    Flash is 0x4016 0x16 = 22 decimal so the size is 2 ^ 22 = 4,194,304 = 4MB.

    Now my problems start

    i made an custom built against the dev branch and includes the following modules: adc, coap, file, gpio, http, i2c, net, node, pwm, tmr, u8g, uart, wifi.

    If i flash like this (esptool.py --port COM5 --baud 115200 write_flash -fm dio -fs 4m 0x00000 nodemcu-dev-13-modules-2017-03-02-11-35-08-integer.bin 0x3fc000 esp_init_data_default.bin) the wireless LED is flashing and that's it.

    I try with -fs 8m

    esptool.py v1.3
    Connecting....
    Running Cesanta flasher stub...
    Flash params set to 0x0220
    Wrote 520192 bytes at 0x0 in 45.1 seconds (92.3 kbit/s)...
    WARNING: Unlikely to work as data goes beyond end of flash. Hint: Use --flash_size
    Wrote 4096 bytes at 0x3fc000 in 0.4 seconds (89.5 kbit/s)...
    Leaving...

    and it works after restart the D1 everything looks normal I open the ESPlorer and connect to the D1

    i get the message cant Autodetect firmware.

    after a new reset i get a normal staus ModeMCU custom Build .......

    Then i upload the init.lua

    Init.lua i use a copy from an working Init.lua of an PS 01 board but it not work and give the message

    init.lua:9 address in use.

    Sorry i try to upload some Pictures but the upload not work!

    Id will be nice if somebody could advise what i made wrong THANKS



  • You specify the size in bits, not bytes, so for 4MB you should use -fs 32m,

    As the warning says, your firmware doesn't fit in the 1MB that you specified.



  • OK with fs 32m i could flash without any failure message. Great

    but still the problem that if i connect with ESPlorer i get :

    *PORT OPEN 115200

    Communication with MCU..Got answer! Communication with MCU established.
    AutoDetect firmware...

    Can't autodetect firmware, because proper answer not received (may be unknown firmware).
    Please, reset module or continue.*

    After i reset I get :

    „ cÄò'oß$g'œãäcpìÇdsdsd8ûgà ‚l   c 'ã|ÄŒŽ‡sÄc„ûgoî.....................

    NodeMCU custom build by frightanic.com
    branch: dev
    commit: f5652187a6beb3cd2ca7e802e706f65f4d8fdd30
    SSL: false
    modules: adc,coap,file,gpio,http,i2c,net,node,pwm,tmr,u8g,uart,wifi
    build built on: 2017-03-02 11:34
    powered by Lua 5.1.4 on SDK 2.0.0(656edbf)
    lua: cannot open init.lua

    any idea it looks to me that it was not 100% successful or still something is missing.



  • That message you get after the reset looks correct. No idea why ESPlorer doesn't like it. Do you also get a prompt? Can you type print("hello world") in it and get that text back?



  • !!!!administrators forum the for is one That ?script Chinese in contributing was I though as entry of word each by backwards written being comment English my is why And ..!one this on air mid in hanging us leave not do gentlemen Please ...discussion interesting this to conclusion the is where OK.


Log in to reply
 

Looks like your connection to WEMOS Forum was lost, please wait while we try to reconnect.