Wifi MQTT Relay do not work after upgrade

Hi,

I upgraded the new firmware (oem_v2088.bin) and I think I have corrupted the bootloader.

I can load the firmware from windows and linux, but when off the bridge JP5 and food drive, never comes into AP mode.

It is dead.

Can your help me???

Thanks.

glyn.hudson's picture

Re: Wifi MQTT Relay do not work after upgrade

Very sorry for missing programmer, we have shipped you a replacement today.

How did you update the firmware on the relay? Did you use the web firmware updater as detailed

https://openenergymonitor.org/emon/modules/wifirelay#firmware.

What error did you receive on upload?

I think the unit is not showing AP since it's trying to connect to your existing wifi network. Have you tried pressing and holding the reset button for three seconds to clear the config? 

I have improved documentation on this: 

https://openenergymonitor.org/emon/modules/wifirelay#

pychu's picture

Re: Wifi MQTT Relay do not work after upgrade

Hi. thanks for answering.

Yes, I tried to upload the firmware as detailed.
esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x1000 oem_v2088.bin

Upload the firmware correctly, it does not give me any errors. Once uploaded, I remove the jumper J5.
The blue light is solid. I press the button for 5 seconds, but does not go into AP mode.

Do you just have to upload the file oem_2088.bin?

 

mharizanov's picture

Re: Wifi MQTT Relay do not work after upgrade

Hi,

You can re-flash the attached bootloader like this:

esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x00000 "boot_v1.5.bin" 

flashing the firmware itself:

esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x1000 oem.v2088.bin 

If you have modified other system areas of the flash, this may also cause trouble.. try resetting them and then re-eating the bootloader-firmware update again:

esptool.py  --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 \
    0x00000 blank.bin  \
    0x01000 blank.bin  \
    0x7C000 esp_init_data_default.bin \
    0x7D000 blank.bin  \
    0x7E000 blank.bin  \
    0x7F000 blank.bin  \
    0x80000 blank.bin  \
    0xFE000 blank.bin  \
    0x100000 blank.bin \
    0x101000 blank.bin \
    0x1FC000 esp_init_data_default.bin \
    0x1FD000 blank.bin \
    0x1FE000 blank.bin \
    0x1FF000 blank.bin \
    0x3FC000 esp_init_data_default.bin \
    0x3FD000 blank.bin \
    0x3FE000 blank.bin \

Note: flash address   0xFC000 contains board identification information. do not erase or modify it.

There is debug output, you can check it for further clues

Finally: I believe the easier, user-friendlier way to do firmware upgrade is via the user interface; Direct re-flashing should only be done as a last resort.

pychu's picture

Re: Wifi MQTT Relay do not work after upgrade

Hi, I've done the whole process. But AP mode does not enter.

i am sad.

Anything else?

Thank you for your time, and i am sorry.

 

juan@juan-HP-Pavilion-dv6-Notebook-PC:~/.local/bin$ sudo ./esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x00000 /home/juan/Documentos/bootloader/blank.bin
esptool.py v1.0.1
Connecting...
Erasing flash...
Took 0.13s to erase flash block
Wrote 4096 bytes at 0x00000000 in 0.1 seconds (273.3 kbit/s)...

Leaving...
juan@juan-HP-Pavilion-dv6-Notebook-PC:~/.local/bin$ sudo ./esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x01000 /home/juan/Documentos/bootloader/blank.bin
esptool.py v1.0.1
Connecting...
Erasing flash...
Took 0.13s to erase flash block
Wrote 4096 bytes at 0x00001000 in 0.1 seconds (273.4 kbit/s)...

Leaving...
juan@juan-HP-Pavilion-dv6-Notebook-PC:~/.local/bin$ sudo ./esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x7C000 /home/juan/Documentos/bootloader/esp_init_data_default.bin
esptool.py v1.0.1
Connecting...
Erasing flash...
Took 0.13s to erase flash block
Wrote 1024 bytes at 0x0007c000 in 0.0 seconds (274.0 kbit/s)...

Leaving...
juan@juan-HP-Pavilion-dv6-Notebook-PC:~/.local/bin$ sudo ./esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x7D000 /home/juan/Documentos/bootloader/blank.bin
esptool.py v1.0.1
Connecting...
Erasing flash...
Took 0.08s to erase flash block
Wrote 4096 bytes at 0x0007d000 in 0.1 seconds (273.4 kbit/s)...

Leaving...
juan@juan-HP-Pavilion-dv6-Notebook-PC:~/.local/bin$ sudo ./esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x7000 /home/juan/Documentos/bootloader/blank.bin
esptool.py v1.0.1
Connecting...

A fatal error occurred: Failed to connect to ESP8266
juan@juan-HP-Pavilion-dv6-Notebook-PC:~/.local/bin$ sudo ./esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x7E000 /home/juan/Documentos/bootloader/blank.bin
esptool.py v1.0.1
Connecting...
Erasing flash...
Took 0.13s to erase flash block
Wrote 4096 bytes at 0x0007e000 in 0.1 seconds (273.4 kbit/s)...

Leaving...
juan@juan-HP-Pavilion-dv6-Notebook-PC:~/.local/bin$ sudo ./esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x7F000 /home/juan/Documentos/bootloader/blank.bin
esptool.py v1.0.1
Connecting...
Erasing flash...
Took 0.08s to erase flash block
Wrote 4096 bytes at 0x0007f000 in 0.1 seconds (273.4 kbit/s)...

Leaving...
juan@juan-HP-Pavilion-dv6-Notebook-PC:~/.local/bin$ sudo ./esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x80000 /home/juan/Documentos/bootloader/blank.bin
esptool.py v1.0.1
Connecting...
Erasing flash...
Took 0.08s to erase flash block
Wrote 4096 bytes at 0x00080000 in 0.1 seconds (273.4 kbit/s)...

Leaving...
juan@juan-HP-Pavilion-dv6-Notebook-PC:~/.local/bin$ sudo ./esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0xFE000 /home/juan/Documentos/bootloader/blank.bin
esptool.py v1.0.1
Connecting...
Erasing flash...
Took 0.08s to erase flash block
Wrote 4096 bytes at 0x000fe000 in 0.1 seconds (273.4 kbit/s)...

Leaving...
juan@juan-HP-Pavilion-dv6-Notebook-PC:~/.local/bin$ sudo ./esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x100000 /home/juan/Documentos/bootloader/blank.bin
esptool.py v1.0.1
Connecting...
Erasing flash...
Took 0.10s to erase flash block
Wrote 4096 bytes at 0x00100000 in 0.1 seconds (273.4 kbit/s)...

Leaving...
juan@juan-HP-Pavilion-dv6-Notebook-PC:~/.local/bin$ sudo ./esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x101000 /home/juan/Documentos/bootloader/blank.bin
esptool.py v1.0.1
Connecting...
Erasing flash...
Took 0.13s to erase flash block
Wrote 4096 bytes at 0x00101000 in 0.1 seconds (275.9 kbit/s)...

Leaving...
juan@juan-HP-Pavilion-dv6-Notebook-PC:~/.local/bin$ sudo ./esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x1FC000 /home/juan/Documentos/bootloader/esp_init_data_default.bin
esptool.py v1.0.1
Connecting...
Erasing flash...
Took 0.07s to erase flash block
Wrote 1024 bytes at 0x001fc000 in 0.0 seconds (274.0 kbit/s)...

Leaving...
juan@juan-HP-Pavilion-dv6-Notebook-PC:~/.local/bin$ sudo ./esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x1FD000 /home/juan/Documentos/bootloader/blank.bin
esptool.py v1.0.1
Connecting...
Erasing flash...
Took 0.07s to erase flash block
Wrote 4096 bytes at 0x001fd000 in 0.1 seconds (273.4 kbit/s)...

Leaving...
juan@juan-HP-Pavilion-dv6-Notebook-PC:~/.local/bin$ sudo ./esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x1FE000 /home/juan/Documentos/bootloader/blank.bin
esptool.py v1.0.1
Connecting...
Erasing flash...
Took 0.08s to erase flash block
Wrote 4096 bytes at 0x001fe000 in 0.1 seconds (273.4 kbit/s)...

Leaving...
juan@juan-HP-Pavilion-dv6-Notebook-PC:~/.local/bin$ sudo ./esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x1FF000 /home/juan/Documentos/bootloader/blank.bin
esptool.py v1.0.1
Connecting...
Erasing flash...
Took 0.08s to erase flash block
Wrote 4096 bytes at 0x001ff000 in 0.1 seconds (272.5 kbit/s)...

Leaving...
juan@juan-HP-Pavilion-dv6-Notebook-PC:~/.local/bin$ sudo ./esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x3FC000 /home/juan/Documentos/bootloader/esp_init_data_default.bin
esptool.py v1.0.1
Connecting...
Erasing flash...
Took 0.08s to erase flash block
Wrote 1024 bytes at 0x003fc000 in 0.0 seconds (273.6 kbit/s)...

Leaving...
juan@juan-HP-Pavilion-dv6-Notebook-PC:~/.local/bin$ sudo ./esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x3FD000 /home/juan/Documentos/bootloader/blank.bin
esptool.py v1.0.1
Connecting...
Erasing flash...
Took 0.07s to erase flash block
Wrote 4096 bytes at 0x003fd000 in 0.1 seconds (273.4 kbit/s)...

Leaving...
juan@juan-HP-Pavilion-dv6-Notebook-PC:~/.local/bin$ sudo ./esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x3FE000 /home/juan/Documentos/bootloader/blank.bin
esptool.py v1.0.1
Connecting...
Erasing flash...
Took 0.08s to erase flash block
Wrote 4096 bytes at 0x003fe000 in 0.1 seconds (273.4 kbit/s)...

Leaving...
juan@juan-HP-Pavilion-dv6-Notebook-PC:~/.local/bin$ sudo ./esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x00000 /home/juan/Documentos/bootloader/boot_v1.5.bin
esptool.py v1.0.1
Connecting...
Erasing flash...
Took 0.14s to erase flash block
Wrote 4096 bytes at 0x00000000 in 0.1 seconds (260.3 kbit/s)...

Leaving...
juan@juan-HP-Pavilion-dv6-Notebook-PC:~/.local/bin$ sudo ./esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 16m-c1 0x1000 /home/juan/Documentos/bootloader/oem.v2088.bin
esptool.py v1.0.1
Connecting...
Erasing flash...
Took 1.67s to erase flash block
Wrote 391168 bytes at 0x00001000 in 12.0 seconds (260.8 kbit/s)...

Leaving...

 

pychu's picture

Re: Wifi MQTT Relay do not work after upgrade

I'm trying to compile the other firmware (1ch relay) github.
I get the following error.

juan@juan-HP-Pavilion-dv6-Notebook-PC:/opt/Espressif/1ch_relay$ sudo make
[sudo] password for juan:
CC user/broadcastd.c
user/broadcastd.c: In function 'broadcastReading':
user/broadcastd.c:46:39: error: 'currGPIO13State' undeclared (first use in this function)
   os_sprintf(buf,buf2,currGPIO12State,currGPIO13State,currGPIO15State,"N/A",t2,t3);
                                       ^
user/broadcastd.c:46:39: note: each undeclared identifier is reported only once for each function it appears in
user/broadcastd.c:46:55: error: 'currGPIO15State' undeclared (first use in this function)
   os_sprintf(buf,buf2,currGPIO12State,currGPIO13State,currGPIO15State,"N/A",t2,t3);
                                                       ^
Makefile:197: fallo en las instrucciones para el objetivo 'build/user/broadcastd.o'
make: *** [build/user/broadcastd.o] Error 1

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.