ESP32-CAM and mega-20230409

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
mackowiakp
Normal user
Posts: 531
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

ESP32-CAM and mega-20230409

#1 Post by mackowiakp » 10 Apr 2023, 08:33

I have ESP32-CAM module, used without camera module.
One I2C sensor and relay are connected to it.
Currently, custom_ESP32_4M316 based on ESP32_mega-20211224 FW is installed on the module.
Can I install a new FW based on mega-20230409 (bin file) directly on it via OTA without first installing the factory FW bin?
I am asking because this is a problem for me because I have to dismantle some already soldered connections and I would like to avoid it.

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

Re: ESP32-CAM and mega-20230409

#2 Post by Ath » 10 Apr 2023, 09:17

Depending on wether you have a real Custom build with your personal plugin selection (you need to update your local repo and rebuild), or the standard Custom build included in the release, you should be able to just OTA-update the unit. This release includes some improvements in the WiFi handling, and the feedback sofar has only been positive :)

If you don't want to challenge Murphy, then only update if you have the time & resources available to resolve anything that Murphy might throw at you :lol:
/Ton (PayPal.me)

mackowiakp
Normal user
Posts: 531
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: ESP32-CAM and mega-20230409

#3 Post by mackowiakp » 10 Apr 2023, 10:01

I have a real Custom.h because it was necessary to add MPU-6050 sensor (acceleration/giro).

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

Re: ESP32-CAM and mega-20230409

#4 Post by TD-er » 10 Apr 2023, 10:23

Maybe you can test it by flashing the exact build (or one made by us from roughly that date) on another ESP32 module.
Then try to OTA update it.

The reason I'm suggesting this is because the bootloader has changed since we moved to IDF 4.4
And really taking every precaution possible, I also suggest to see if both modules use the same flash chip (or at least same brand)
You can see the "brand" (vendor) on the sysinfo page as a single byte HEX number.

One of the changes in the bootloader, which may cause issues when updating is that the initialization of flash has changed.
To prevent almost all possible issues, I lowered the configured flash speed. But on some nodes with flash sizes > 4 MB you may still end up in bootloops until you also update the bootloader (thus flashing factory bin via serial)

mackowiakp
Normal user
Posts: 531
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: ESP32-CAM and mega-20230409

#5 Post by mackowiakp » 10 Apr 2023, 10:55

In addition, from what I noticed, the size of the bin files decreased a lot (the same Custom.h)
For old FW:

Code: Select all

-rw-r--r--  1 maciek maciek 1502608 gru 25  2021 ESP_Easy_mega_20211225_custom_ESP32_4M316k.bin
-rw-r--r--  1 maciek maciek 1568144 gru 25  2021 ESP_Easy_mega_20211225_custom_ESP32_4M316k-factory.bin
For new FW:

Code: Select all

-rw-r--r-- 1 maciek maciek 1170096 kwi 10 01:00 ESP_Easy_mega_20230410_custom_ESP32_4M316k.bin
-rw-r--r-- 1 maciek maciek 1235632 kwi 10 01:00 ESP_Easy_mega_20230410_custom_ESP32_4M316k.factory.bin

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

Re: ESP32-CAM and mega-20230409

#6 Post by TD-er » 10 Apr 2023, 11:06

I did optimize a lot to reduce the bin size, but this seems more than I expected.
So I wonder if some things are now left out for some reason.
Maybe best to try it on some other ESP32 first to see if there are some plugins missing?

mackowiakp
Normal user
Posts: 531
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: ESP32-CAM and mega-20230409

#7 Post by mackowiakp » 10 Apr 2023, 11:14

Will try and will send feadback

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

Re: ESP32-CAM and mega-20230409

#8 Post by Ath » 10 Apr 2023, 13:42

TD-er wrote: 10 Apr 2023, 11:06 I did optimize a lot to reduce the bin size, but this seems more than I expected.
So I wonder if some things are now left out for some reason.
Maybe best to try it on some other ESP32 first to see if there are some plugins missing?
One of the advantages of the newer IDF framework version was the substantially reduced .bin size, AFAIR. ;)
/Ton (PayPal.me)

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

Re: ESP32-CAM and mega-20230409

#9 Post by TD-er » 10 Apr 2023, 14:33

yep, could be also due to the latest IDF and build toolchain.

mackowiakp
Normal user
Posts: 531
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: ESP32-CAM and mega-20230409

#10 Post by mackowiakp » 20 Apr 2023, 00:41

I think I will have to disassemble the device and program it via UART custom_ESP32_4M316k.factory.bin.
Poorly.... :(
Below is a screenshot after flashing the only bin via OTA.
Screenshot_20230420_003211.png
Screenshot_20230420_003211.png (76.9 KiB) Viewed 2148 times

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

Re: ESP32-CAM and mega-20230409

#11 Post by Ath » 20 Apr 2023, 08:50

That's just the css missing from your browser, hard-refreshing the page should improve that, or flushing the browser cache if the refresh doesn't improve enough
/Ton (PayPal.me)

mackowiakp
Normal user
Posts: 531
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: ESP32-CAM and mega-20230409

#12 Post by mackowiakp » 21 Apr 2023, 00:45

Not exactly. Different browser, clear cache etc. The result is the same.
Screenshot_20230421_004259.png
Screenshot_20230421_004259.png (38.5 KiB) Viewed 2125 times

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

Re: ESP32-CAM and mega-20230409

#13 Post by Ath » 21 Apr 2023, 08:28

Can you test with a .bin from the Releases page, to exclude possible causes in your local build-setup?
/Ton (PayPal.me)

mackowiakp
Normal user
Posts: 531
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: ESP32-CAM and mega-20230409

#14 Post by mackowiakp » 21 Apr 2023, 09:22

The same...
Screenshot_20230421_091934.png
Screenshot_20230421_091934.png (35.97 KiB) Viewed 2109 times

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

Re: ESP32-CAM and mega-20230409

#15 Post by Ath » 21 Apr 2023, 09:58

Then still 2 possible causes:
- The ESP unit is bad, f.e. poor quality flash memory
- How did you upload, via USB or via OTA? If via OTA, then uploading the factory.bin via USB, and at a max speed of 115200 baud might change things.
/Ton (PayPal.me)

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

Re: ESP32-CAM and mega-20230409

#16 Post by TD-er » 21 Apr 2023, 10:03

I am thinking the flash may be running at the wrong speed.
This can happen if you OTA updated a recent build from a very old (pre IDF 4.4) build.

Flashing via serial will also update the bootloader to overcome these issues with flash speed.

I think storing settings may also corrupt things if the flash is working at the wrong speed.

Can you check the sysinfo page to see how the flash is configured?

mackowiakp
Normal user
Posts: 531
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: ESP32-CAM and mega-20230409

#17 Post by mackowiakp » 21 Apr 2023, 10:16

No. Sysinfo page is corrupted too

mackowiakp
Normal user
Posts: 531
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: ESP32-CAM and mega-20230409

#18 Post by mackowiakp » 23 Apr 2023, 11:05

I loaded via UART ESP_Easy_mega_20230409_collection_A_ESP32_4M316k.factory.bin from a set of ready-made bins.
I did a few soft reboots to load the configuration files.
It worked fine, but it was very strange that even after 10-15 minutes the CPU load was 100%.
However, when I did the power off/on, the WEB page is again as in the image below.
I currently have FW loaded ESP_Easy_mega_20230409_collection_A_ESP32_4M316k.factory.bin and my previous custom bin via OTA (ESP_Easy_mega_20211225_custom_ESP32_4M316k.bin).
Works fine.
There is a problem with the new bin version both in FW taken from ready-made bins and my custom one based on mega_20230409.

Content of info page of my chip:

Code: Select all

Unit Number:	1
Local Time:	2023-04-23 11:03:06
Time Source:	NTP
Time Wander:	-0.028 [msec/sec]
Uptime:	0 days 1 hours 5 minutes
Load:	63.34% (LC=150)
CPU Eco Mode:	false
Boot:	Soft Reboot (0)
Reset Reason:	CPU0: Software reset CPU CPU1: Software reset CPU
Last Action before Reboot:	Background Task
SW WD count:	0
Memory
Heap Size:	294996
Heap Min Free:	170884
Free RAM:	184000 (176552 - sendContentBlocking)
Heap Max Free Block:	113792
Free Stack:	7460 (4356 - sendContentBlocking)
Network
IP Config:	Static
IP / Subnet:	192.168.0.23 / 255.255.255.0
Gateway:	192.168.0.1
Client IP:	192.168.0.2
DNS:	192.168.0.201 / 0.0.0.0
Allowed IP Range:	192.168.0.0 - 192.168.0.255
Connected:	1h05m
Number Reconnects:	-1
WiFi ❔
WiFi Connection:	802.11n (RSSI -56 dBm)
SSID:	kuchnia (08:96:D7:F1:DF:1E)
Channel:	12
Encryption Type:	open
Last Disconnect Reason:	(1) Unspecified
Configured SSID1:	kuchnia
Configured SSID2:	maciek24
STA MAC:	7C:9E:BD:38:70:18
AP MAC:	7C:9E:BD:38:70:19
WiFi Settings
Force WiFi B/G:	false
Restart WiFi Lost Conn:	true
Periodical send Gratuitous ARP:	true
Connection Failure Threshold:	0
Max WiFi TX Power:	17.50
Current WiFi TX Power:	7.00
WiFi Sensitivity Margin:	3
Send With Max TX Power:	false
Extra WiFi scan loops:	0
Use Last Connected AP from RTC:	false
Firmware
Build:⋄	20116 - Mega32
System Libraries:⋄	ESP32 SDK v3.3.5-1-g85c43024c
Git Build:⋄	Skrzypowa: Dec 25 2021 09:48:17
Plugin Count:⋄	25
Build Origin:	Self built
Build Time:⋄	Dec 25 2021 09:48:11
Binary Filename:⋄	ESP_Easy_mega_20211225_custom_ESP32_4M316k
Build Platform:⋄	Linux-5.15.10-desktop-1.mga8-x86_64-with-glibc2.2.5
Git HEAD:⋄	pygit2_not_installed
System Status
Syslog Log Level:	None
Serial Log Level:	Info
Web Log Level:	None
I2C Bus State:	OK
I2C bus cleared count:	0
Network Services
Network Connected:	✔
NTP Initialized:	✔
ESP Board
ESP Chip ID:	3698712 (0x387018)
ESP Chip Frequency:	240 MHz
ESP Chip Model:	ESP32-D0WDQ6
ESP Chip Revision:	1
ESP Chip Cores:	2
ESP Board Name:	Espressif ESP32 Dev Module
Storage
Flash Chip Real Size:	4096 kB
Flash IDE Size:	4096 kB
Flash Writes:	1 daily / 2 boot
Sketch Size:	1467 kB (1856 kB free)
Max. OTA Sketch Size:	1856 kB (1900544 bytes)
SPIFFS Size:	283 kB (135 kB free)
Page size:	256
Block size:	8192
Number of blocks:	35
Partitions ❔
Data Partition Table:	
20k
nvs
NVS
8k
otadata
OTA selection
4k
eeprom
Unknown(153)
316k
spiffs
SPIFFS
App Partition Table:	
1.81M
app0
OTA partition 0
1.81M
app1
OTA partition 1
Screenshot_20230423_095135.png
Screenshot_20230423_095135.png (71.23 KiB) Viewed 2051 times

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests