ESP32CAM & BLE: Error: The program size is greater than maximum allowed

trying to compile ESP32CAM with BLE tracker, I got the following error:

Error: The program size (1690998 bytes) is greater than maximum allowed (1638400 bytes)

Could I alter the partitions on ESP32 with esphome? Where?

Thx

Cut some components. Do you have web server? It takes a lot of space.

smaller without webserver but not small enough :frowning:

Error: The program size (1648930 bytes) is greater than maximum allowed (1638400 bytes)

there is not a lot more which I could spare…

esp32 should have 4MB flash… how to increase space for programs?

Hi,

I was able to load BLE and ESP Cam and didn’t have this issue although my config was minimalistic (and I was @94% of space used)

Anyway regardless of space I was never able to have BLE and camera working on the same module: I guess it is too much of esp32?

Did anyone had luck with it?
…also note currently BLE implementation on ESPHOME is not really stable and cause wifi connection issue as far as I understand

I just tried to flash the firmware with BLE and CAM. flashing works without a problem but I cant connect to my wifi…

log says:
E][WiFiGeneric.cpp:117] wifiLowLevelInit(): esp_wifi_init 257
[W][wifi_esp32:051]: Setting WiFi mode failed!
[C][wifi:160]: Setting up AP…
[C][wifi:162]: AP SSID: ‘esp_cam01’
[C][wifi:163]: AP Password: ‘xxxxx’
[D][esp-idf:000]: E (88328) wifi: wifi nvs cfg alloc out of memory
[E][WiFiGeneric.cpp:117] wifiLowLevelInit(): esp_wifi_init 257
[W][wifi_esp32:051]: Setting WiFi mode failed!
[C][wifi:172]: IP Address: 192.168.4.1
[I][wifi:115]: Starting fallback AP!
[D][esp-idf:000]: E (88354) wifi: wifi nvs cfg alloc out of memory

… and so on and so forth…

any clue how to solve this? thx

Hey all,
I have finnaly got my esp32cam working with cam and ble.
Found out you need the resolution of the cam on 400x296 or below.
Else you can 't connect the esp32cam anymore.
Is this a know limitation of the esp32cam or am i still doing something wrong.

nice… but with that ultra-low resolution of 400x296 the cam is of use anymore… Any change this might get fixed in the future?

You need to be aware that the design of the esp32 is such that ble and wifi interfere with each other, Not only are they both competing in the airwaves for 2.4Ghz spectrum, but I believe they share circuitry on the chipset. I am not sure if they share the antenna, but I guess they must as I haven’t seen an esp32 board with 2 antennae.

When you use the camera, there is a high demand on wifi throughput, which exarcerbates the problem. Missing a low bandwidth message like a temperature change is of little concern. Skipping part of an image stream is fatal.

Be aware that every esp32 cam board I have seen is wired to the external antenna connection. If you don’t have an antenna connected, the performance will be poor.

TL;DR don’t expect cam + ble to work well together.