OTA does not work on AI Thinker ESP32-CAM board

sailaway
Posts: 4
Joined: Thu Mar 12, 2020 12:32 pm

OTA does not work on AI Thinker ESP32-CAM board

Postby sailaway » Thu Mar 12, 2020 4:37 pm

Hi,
I am new in this Forum an hope to find someone who runs successfully OTA on AI Thinker ESP32-CAM board.

My code should not be wrong: I use "BasicOTA" of the examples in Arduino-IDE.
With that code OTA works perfect on "WEMOS Lolin 32" board.
But NOT on "AI Thinker ESP32-CAM" board.

Compiling via Arduino-IDE ist ok, but upload gives error "sending invitation to ..."
Obviously the board does not answer via WiFi (but does via serial port).
Cannot be a problem of my WLAN, because WEMOS works.

Anyone with an idea?

dwienie
Posts: 2
Joined: Sun Mar 15, 2020 4:12 pm

Re: OTA does not work on AI Thinker ESP32-CAM board

Postby dwienie » Sun Mar 15, 2020 4:17 pm

I have the same problem. Already searched like crazy on the internet for a solution. But till now , no solution ...
I would be very thankful if someone has found a solution for this.

sailaway
Posts: 4
Joined: Thu Mar 12, 2020 12:32 pm

Re: OTA does not work on AI Thinker ESP32-CAM board

Postby sailaway » Wed Mar 18, 2020 9:22 am

It seems to be that the problem is not the board itself but the WiFi-component that is soldered to the board:
The "Espressif ESP32-WROOM-32" works fine with OTA, while the "ESP32-S AI-Thinker" does NOT.
Does anybody know about a difference between the 2 components?
The OTA upload is not interrupted by an error, it does NOT start, while compilation is ok.

Erkiman
Posts: 1
Joined: Wed Mar 25, 2020 7:47 am

Re: OTA does not work on AI Thinker ESP32-CAM board

Postby Erkiman » Wed Mar 25, 2020 7:53 am

I got the normal "ArduinoOTA / BasicOTA" to work with a Ai Thinker ESP32-CAM module.
Instead of selecting "Ai Thinker ESP32-CAM module" under Tools/Board in the Arduino IDE i selected Nano32.

I had to edit the "boards.txt" and add the line "nano32.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue" to the definition for nano32 to get full functionallity.

sailaway
Posts: 4
Joined: Thu Mar 12, 2020 12:32 pm

Re: OTA does not work on AI Thinker ESP32-CAM board

Postby sailaway » Wed Mar 25, 2020 2:45 pm

Thank You, Erkiman!
I did exactly what You proposed and now BasicOTA works perfect on Ai Thinker ESP32-CAM board !
Because I always like to understand what I´m doing: could You explain that new line in "boards.txt" or give a link to the source of that information?

dzanis
Posts: 1
Joined: Thu Sep 10, 2020 6:31 am

Re: OTA does not work on AI Thinker ESP32-CAM board

Postby dzanis » Thu Sep 10, 2020 7:06 am

sailaway pos wrote:
Wed Mar 25, 2020 2:45 pm
Because I always like to understand what I´m doing: could You explain that new line in "boards.txt" or give a link to the source of that information?
I had the same problem with OTA on ESP32 Cam, only the error was abort () was called at PC 0x4013fb01 on core 1
I found out that for this board there is only one partition for firmware 3MB size .But for OTA you need at least two partition.
It is better not to change configs board.txt,you can change the partition scheme from the Tools > of Arduino IDE.
Board: "ESP32 Dev Module" ,
Partition Scheme: "Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)"
And you need to put PSRAM: "Enabled" ( that's what it is defines -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue)

alanesq
Posts: 86
Joined: Thu Dec 14, 2017 8:38 pm

Re: OTA does not work on AI Thinker ESP32-CAM board

Postby alanesq » Sat Sep 26, 2020 6:37 am

I have used OTA on an esp32cam board but found that for it to work I have to select "ESP32 dev module" instead of "AI Thinker ESP32-Cam" in the Arduino IDE.
also make sure "Partition Scheme" is set to "default 4mb with spiffs" and PSRam is enabled.

d0ublei
Posts: 2
Joined: Thu Nov 05, 2020 11:42 pm

Re: OTA does not work on AI Thinker ESP32-CAM board

Postby d0ublei » Thu Nov 05, 2020 11:57 pm

I am having an issue here as well. I have several of these boards and somehow got one of them to work using the suggestion above (ESP32 DevModule board with the recommended settings). Here is the strange thing: Other boards that I have previously used with the standard ESP32-CAM upload do not work with this. You can flash them fine, but whenever the board tries to read a file from the SPIFFS it crashes.

Upon flashing the board back to the original ESP32-CAM board, the files are able to be read again. Also, I can upload with the ESP32 Dev module with the same HugeApp No OTA settings and it will work fine (but no OTA).

This tells me there is some strange association with the way the files were originally written to the partition. Flashing the board does not overwrite the partition scheme. I am wondering if there is any type of way i can completely wipe this board and start from scratch so the disk is just as it would be from the factory?

Putting the serial monitor in debug mode I can see the SPIFFS mount fine. I can reproduce this by using any test sketch that calls SPIFFS which I know 100% work - so its not code related.

d0ublei
Posts: 2
Joined: Thu Nov 05, 2020 11:42 pm

Re: OTA does not work on AI Thinker ESP32-CAM board

Postby d0ublei » Fri Nov 06, 2020 3:52 am

I was able to fix my own issue. I simply formatted the board by using the esptool tool like so:
esptool.py erase_flash

I was then presented with a clean disk, was able to upload my sketch using the method described above, and have OTA + SPIFFS.

gosha500502
Posts: 1
Joined: Thu Mar 11, 2021 6:03 pm

Re: OTA does not work on AI Thinker ESP32-CAM board

Postby gosha500502 » Thu Mar 11, 2021 6:08 pm

In "boards.txt" "esp32cam.build.partitions=huge_app" -> "esp32cam.build.partitions=default"

Who is online

Users browsing this forum: No registered users and 44 guests