Skip to content

Restoring bricked WiFi module

Vladimir Savchenko edited this page Apr 2, 2017 · 4 revisions

If the WiFi module was bricked during update, it is possible to fix it.

What needs to be done is

  1. Flash using XLoader the sketch https://github.com/vlast3k/simple-co2-monitor-fw/raw/master/fw/ATMega328_2_ESP8266_FlashProxy.ino.hex (for more details on flashing, here: https://github.com/vlast3k/simple-co2-monitor-fw/wiki/Version-History)

  2. Leave the micro usb connected, but disconnect the usb from the computer

  3. Download the latest vESPrino firmware from here: http://anker-bg.com/vlast3k/vair/latest.bin

  4. Download the flashing tool for your OS from here https://github.com/igrr/esptool-ck/releases/tag/0.4.9

  5. on a command prompt/terminal prepare but do not run the following command esptool -vv -cd none -cb 19200 -cp COM1 -cf latest.bin replacing COM1 with the com port where the device is connected, and latest.bin, with the name of the firmware as you downloaded it

  6. Open the case and using some conductive needle, hairpin, jumper wire, connect the GPIO0 pin to the shielding This is the pin And this is what i mean to connect it to the shielding

  7. While still holding the pin connected to the shielding - now connect the USB cable to the computer. In 2-3 seconds the ESP8266 module will switch to Flash mode (with no indication on LEDs / Display, etc

  8. Now run the command from the command prompt you prepared. It will try to connect to the ESP via the Atmega mcu as proxy. It may fail a couple of times, but eventually it will latch and the flashing will start. In this mode the flashing is 10x slower than usually so it may take a couple of minutes. See below how it looks like like. You see how the first few times it did not connect and then it started. Once it starts, you can stop connecting the pin to the shielding. If it doesn't connect and start the flashing process, then disconnect the USB cable, short the pin again, connect the USB cable, wait 3-4 seconds, execute the command again

  9. Once it is done, using XLoader flash again the latest firmware for the vair monitor as described here: https://github.com/vlast3k/simple-co2-monitor-fw/wiki/Version-History

C:\develop\arduino\vThingCO2>"C:\Users\vladi\.platformio\packages\tool-esptool\
esptool v0.4.9 - (c) 2014 Ch. Klippel <[email protected]>
        setting board to none
        setting baudrate from 115200 to 19200
        setting port from COM1 to com15
        espcomm_upload_file
        espcomm_upload_mem
        setting serial port timeouts to 1000 ms
opening bootloader
resetting board
trying to connect
        flush start
        setting serial port timeouts to 1 ms
        setting serial port timeouts to 1000 ms
        flush complete
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
        serialport_receive_C0: 62 instead of C0
trying to connect
        flush start
        setting serial port timeouts to 1 ms
        setting serial port timeouts to 1000 ms
        flush complete
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
        read 0, requested 1
trying to connect
        flush start
        setting serial port timeouts to 1 ms
        setting serial port timeouts to 1000 ms
        flush complete
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
        espcomm_send_command: receiving 2 bytes of data
        espcomm_send_command: receiving 2 bytes of data
        espcomm_send_command: receiving 2 bytes of data
        espcomm_send_command: receiving 2 bytes of data
        espcomm_send_command: receiving 2 bytes of data
        espcomm_send_command: receiving 2 bytes of data
        espcomm_send_command: receiving 2 bytes of data
        espcomm_send_command: receiving 2 bytes of data
Uploading 456288 bytes from latest.bin to flash at 0x00000000
        erasing flash
        size: 06f660 address: 000000
        first_sector_index: 0
        total_sector_count: 112
        head_sector_count: 16
        adjusted_sector_count: 96
        erase_size: 060000
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
        setting serial port timeouts to 15000 ms
        setting serial port timeouts to 1000 ms
        espcomm_send_command: receiving 2 bytes of data
        writing flash
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
..............................................
starting app without reboot
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
        espcomm_send_command: receiving 2 bytes of data
closing bootloader
        flush start
        setting serial port timeouts to 1 ms
        setting serial port timeouts to 1000 ms
        flush complete