Wyze WLPP1CFH ESP32 ?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
uxhamby
Normal user
Posts: 132
Joined: 29 Dec 2016, 18:13
Location: Toronto Canada

Wyze WLPP1CFH ESP32 ?

#1 Post by uxhamby » 08 Apr 2022, 21:28

Hi,

I am trying to flash ESP_Easy_mega_20220328_normal_ESP32_4M316k.bin to an ESP32 based commercial device, branded as 'Wyze Plug' model #WLPP1CFH.

I have visual confirmation that an ESP32 is installed on the board I am working with.

I have made the usual hardware connections Vcc, Gnd, Tx, Rx and IO0 between the device and my trusty USB serial interface module.

I have used this Tasmota page: as a reference, for encouragement that what I am doing is possible.

Link to generic pictures of the device in question, thanks to the Tasmota page.

So far I have tried the Windows based NodeMCU flash utility that is my habitual goto. I get no reaction when I say 'go' to the flash operation however, it just hangs.

So I switched over to esptool on a linux box where I get better signs of life:

Code: Select all

esptool.py --chip esp32 --port /dev/ttyUSB0 erase_flash
esptool.py v2.8
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32D0WDQ5 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c4:dd:57:a7:c1:0c
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 14.7s
Hard resetting via RTS pin...
and

Code: Select all

esptool.py --port /dev/ttyUSB0 write_flash 0x1000 /home/pi/Downloads/ESPeasyMega/ESP32/ESP_Easy_mega_20220328_normal_ESP32_4M316k.bin
esptool.py v2.8
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP32
Chip is ESP32D0WDQ5 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c4:dd:57:a7:c1:0c
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 1705824 bytes to 966825...
Wrote 1705824 bytes (966825 compressed) at 0x00001000 in 87.7 seconds (effective 155.5 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
Note, I have tried loading the firmware at both 0x0 and 0x1000 but neither gives me any sign that the esp32 has put up its AP for a connection via 192.168.4.1 as I am accustomed, after a power cycle.

I have also tried a serial connection to the device since flashing it but no response is obvious.

FWIW, I don't see any new / unfamiliar Bluetooth devices listed in the area either.

Thoughts / advice?

Thanks.

Brian H.

TD-er
Core team member
Posts: 8754
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Wyze WLPP1CFH ESP32 ?

#2 Post by TD-er » 08 Apr 2022, 22:45

You know you have to flash the "factory" bin file via serial, right?

User avatar
Ath
Normal user
Posts: 3519
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Wyze WLPP1CFH ESP32 ?

#3 Post by Ath » 08 Apr 2022, 22:56

For an initial flash of ESP32, you must use the factory.bin, to get a proper partitioning on the device. It has to go at address 0x0.

When later, as an update, flashing a non-factory .bin file, it should go at address 0x10000, not at 0x1000 :) but the OTA feature of the firmware takes care of that ;)
/Ton (PayPal.me)

User avatar
uxhamby
Normal user
Posts: 132
Joined: 29 Dec 2016, 18:13
Location: Toronto Canada

Re: Wyze WLPP1CFH ESP32 ?

#4 Post by uxhamby » 09 Apr 2022, 02:48

Well, that's why I come here for advice.

factory.bin file is news to me.

I'll give that a try.

Thanks!

Brian H.

User avatar
Ath
Normal user
Posts: 3519
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Wyze WLPP1CFH ESP32 ?

#5 Post by Ath » 09 Apr 2022, 10:01

For every ESP32 build configuration, there is also a factory.bin included, that in addition has a partitioning and bootloader included, as that's how it is specified by Espressif.
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8754
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Wyze WLPP1CFH ESP32 ?

#6 Post by TD-er » 09 Apr 2022, 12:32

Well then glad we could help.
My question was more to check if you didn't forget/overlook it, as you've been an active member for quite some time :)

User avatar
uxhamby
Normal user
Posts: 132
Joined: 29 Dec 2016, 18:13
Location: Toronto Canada

Re: Wyze WLPP1CFH ESP32 ?

#7 Post by uxhamby » 09 Apr 2022, 17:07

to check if you didn't forget/overlook it, as you've been an active member for quite some time
Yes, I was blind sided by this requirement. Long standing active member here I may be, but ESPeasy/ESP32 is just a spare time facet of a multi faceted life here among 21 century men.
For every ESP32 build configuration, there is also a factory.bin included, that in addition has a partitioning and bootloader included
Ok, so I have been to espressif's site at:

https://docs.espressif.com/projects/esp ... aries.html

and identified the .bin file within the v2.1.0.0 ESP32-WROOM-32_AT_Bin_V2.1.0.0.zip archive, as a likely candidate, given that the esptool identified my device as 'ESP32D0WDQ5 (revision 3)'.

Am I misunderstanding or over simplifying this?

Thanks,

Brian H.

TD-er
Core team member
Posts: 8754
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Wyze WLPP1CFH ESP32 ?

#8 Post by TD-er » 09 Apr 2022, 17:11

Please have a look at the binaries in the prebuilt ZIP file.
There you can see some binaries have almost the same name, but differing only in the word "factory" in the name.

If flashing via serial, you must use the "factory" bin file and if you later would like to update via the web interface you can use the bin file without "factory" in the name.

Or just use the web flasher (serving a slightly older build, still need to update the files there) I made here: https://td-er.nl/ESPEasy/
Then you can at least get started as it will only serve the correct bin file without troubling you what file to pick (except for "normal" "testing" and flash size of course)

User avatar
uxhamby
Normal user
Posts: 132
Joined: 29 Dec 2016, 18:13
Location: Toronto Canada

Re: Wyze WLPP1CFH ESP32 ?

#9 Post by uxhamby » 09 Apr 2022, 22:02

Or just use the web flasher (serving a slightly older build, still need to update the files there) I made here: https://td-er.nl/ESPEasy/
Having trouble finding the serial port with this method.

Code: Select all

~/Downloads/ESPeasy/EasyBin$ dmesg | grep ttyUSB
[163615.235409] usb 2-1: ch341-uart converter now attached to ttyUSB0
. . . . but selecting ttyUSB0 from the drop down list that appears, when I press the INSTALL button, doesn't seem to do anything.

?

Thanks,

Brian H.

TD-er
Core team member
Posts: 8754
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Wyze WLPP1CFH ESP32 ?

#10 Post by TD-er » 09 Apr 2022, 22:11

OK, let's focus on one thing at a time as it is clear all options mentioned here may become very confusing.

The web flasher only works on Chrome and I have not tested whether it will work on a non-Windows OS.

You managed to get the esptool.py flasher to work though, so please just use the file with "factory" in the name instead of the one you mentioned in your previous attempts.
The starting address needs to be 0 when flashing via serial.

Code: Select all

esptool.py --port /dev/ttyUSB0 write_flash 0x1000 /home/pi/Downloads/ESPeasyMega/ESP32/ESP_Easy_mega_20220328_normal_ESP32_4M316k.bin
Thus instead of ESP_Easy_mega_20220328_normal_ESP32_4M316k.bin, you need to have the file with a very similar name but "factory" in the name.

User avatar
uxhamby
Normal user
Posts: 132
Joined: 29 Dec 2016, 18:13
Location: Toronto Canada

Re: Wyze WLPP1CFH ESP32 ?

#11 Post by uxhamby » 10 Apr 2022, 19:10

Hi,
You managed to get the esptool.py flasher to work though, so please just use the file with "factory" in the name instead of the one you mentioned in your previous attempts.
The starting address needs to be 0 when flashing via serial.
Yes, success here:

Code: Select all

esptool.py --port /dev/ttyUSB0 write_flash 0x0 /home/pi/Downloads/ESPeasyMega/ESP32/ESP_Easy_mega_20220328_normal_ESP32_4M316k-factory.bin
esptool.py v2.8
Serial port /dev/ttyUSB0
Connecting.....
Detecting chip type... ESP32
Chip is ESP32D0WDQ5 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c4:dd:57:a7:c1:0c
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 1771360 bytes to 979394...
Wrote 1771360 bytes (979394 compressed) at 0x00000000 in 88.7 seconds (effective 159.8 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
I had a couple of false starts where the esptool connection to the ESP32 failed but with some perserverance, I got it to load.


Still couldn't see the AP of the unit under test (UUT), after a power cycle however.

I guessed that perhaps inadequacy of the power supply to the UUT from a USB port might be the issue, so I disconnected my programmer and plugged the UUT into the mains so it could use its own power supply. That brought up the AP and it has been clear sailing from then on.

My first ESP32 ESPeasy unit BTW, all other ESP32's currently on my lan have MicroPython on them.

Thanks for your help, advice and patience.

Cheers

Brian H.
Uxbridge Ont Canada

User avatar
Ath
Normal user
Posts: 3519
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Wyze WLPP1CFH ESP32 ?

#12 Post by Ath » 10 Apr 2022, 19:54

Great!
You're welcome ;)
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8754
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Wyze WLPP1CFH ESP32 ?

#13 Post by TD-er » 10 Apr 2022, 20:40

Ah great to know you succeeded :)
And glad you made this mistake... so you will not make it again, or at least know immediately why it isn't working as I have had countless of times myself ;)

Post Reply

Who is online

Users browsing this forum: No registered users and 129 guests