Asked

Firmware Update Compilation Error

I just downloaded the newest firmware 1/25/2025 from today and I get the following error on compiling:

C:\Users\User\Downloads\EZ-ESP32-CAM (1)\EZ-ESP32-CAM\EZ-ESP32-CAM.ino: In function 'void doEZProtocol()': C:\Users\User\Downloads\EZ-ESP32-CAM (1)\EZ-ESP32-CAM\EZ-ESP32-CAM.ino:820:15: error: 'class HardwareSerial' has no member named 'setRxBuffer'; did you mean 'setRxBufferSize'? 820 | Serial2.setRxBuffer(8000); | ^~~~~~~~~~~ | setRxBufferSize exit status 1

Compilation error: 'class HardwareSerial' has no member named 'setRxBuffer'; did you mean 'setRxBufferSize'?


Related Hardware ESP32 Cam
Related Controls ArduinoComs ESP32_MPU6050

ARC Pro

Upgrade to ARC Pro

Join the ARC Pro community and gain access to a wealth of resources and support, ensuring your robot's success.

Author Avatar
PRO
USA
#1  

i tried to post this in the relevant firmware section of the EZB 32 CAM and it created a new thread?!

Author Avatar
PRO
USA
#2  

I changed it to "setRxBufferSize" and recompiled, uploaded ok. Need to change the firmware.

Author Avatar
PRO
Canada
#3  

Good catch - that error is caused by a mismatch between the ESP32 Arduino core version and the firmware source. Newer cores use Serial2.setRxBufferSize(...) while older code (or older cores) used Serial2.setRxBuffer(...). Since you already changed it to setRxBufferSize and could compile/upload, that is the correct quick fix for modern ESP32 Arduino cores.

Here’s a safe, simple summary and recommended next steps.

What happened

  • The firmware source calls Serial2.setRxBuffer(...), but your ESP32 Arduino core does not have that member, so compilation fails.
  • Replacing the call with Serial2.setRxBufferSize(...) resolves the compile error with current cores.

Quick patch (what you already did)

  • Open EZ-ESP32-CAM.ino
  • Find the line around doEZProtocol() (your error pointed at line ~820):
Serial2.setRxBuffer(8000);
  • Replace it with:
Serial2.setRxBufferSize(8000);
  • Recompile and upload - this worked for you.

Better/safer options

  1. Keep your local change and continue using the firmware (recommended if you need it working now).
  2. If you want the official firmware updated so others don’t run into this:
    • Post the exact error and your change on the Synthiam ESP32-Cam firmware support page: https://synthiam.com/Support/Hardware/ESP32-Cam (Include firmware version/date, Arduino IDE/ESP32 core version you’re using, and the exact one-line fix.)
    • If you prefer, paste the change into the thread you already created and request that the firmware repo be updated - include the fix line above.

If you’d like a more robust source that supports multiple core versions

  • A compile-time conditional would be ideal, but the ESP32 core doesn’t provide a single reliable macro that maps cleanly across all releases for "which method exists." Because of that, the simplest reliable approach is to standardize on the current API (setRxBufferSize) in the firmware source. If you need, I can draft a short conditional using a core-version macro - tell me which ESP32 Arduino core version you (and anyone else using the project) are targeting.

Notes & tips

  • Before editing upstream firmware, make a backup copy of the original file.
  • Keep a note of the ESP32 Arduino core version you used for successful compile/upload - that helps when reporting the fix so maintainers can reproduce and update the repo.
  • If you need, I can prepare a small patch text (diff) you can paste into your thread or attach to the firmware page.

Was your new thread created in the ESP32 CAM firmware support area or somewhere else? If it wasn’t in the correct support page, tell me the URL of the thread and I’ll guide you on how to move/duplicate the content to the ESP32-Cam firmware page so the maintainers will see it.

Want me to:

  • produce a one-line patch/diff you can paste into the firmware thread? or
  • draft a short post you can copy into the ESP32-Cam support page with the error + fix + build details?

Also, do you know which ESP32 Arduino core version you compiled with (Board Manager version)? That will help if we create a conditional or recommend an official commit.


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
#4  

I have disabled Athena on this thread because I advise creating a new thread and repost additional content for Athena to better assist. The error message without code is impossible for a human or AI to diagnose. When interacting with an AI, it's best to assume speaking to a human by providing the same information. An AI may generate its response from a vast amount of information, it is unable to imagine code that it can't see.

LLM Prompting is slowly becoming a skill, and there's a bit of information here: https://synthiam.com/Support/website-features/How-To-Ask-Robot-Building-Questions

  1. Define the outcome
  2. Paste the error in a formatted code block
  3. Paste the firmware code in a formatted code block

Athena will rewrite the code in a new thread for you.