• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

ESP32-CAM Resolution using Telegram

Q&A Forum › Category: ESP32 › ESP32-CAM Resolution using Telegram
0 Vote Up Vote Down
Peter Kern asked 1 year ago

Hello Sara,
I have the problem, that I can’t get UXGA resolution with the telegram bot.
I loaded the ESP32-CAM_WebServer.ino and have UXGA resolution.
With Module 3 Unit 4 no problem with SVGA (s->set_framesize(s, FRAMESIZE_SVGA);)
Changing to (s->set_framesize(s, FRAMESIZE_UVGA);) I get the following errors using “/photo”:

Date: Fri, 15 Mar 2024 15:00:44 GMT
Content-Type: text/html
Content-Length: 157
Connection: close
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Content-Length,Content-Type,Date,Server,Connection
<html>
<head><title>400 Bad Request</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/1.18.0</center>
</body>
</html>

What do I wrong?
Thanks, Peter

Question Tags: ESP32-Cam
3 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

Hi.
I’m not sure. But I think it’s related to the size of the picture.
A picture with UVGA format will occupy more space. But, I’m not sure how that interferes with the request. Maybe the ESP32 cannot handle sending a big image?? I’m not sure…
 
Regards,
Sara

0 Vote Up Vote Down
Peter Kern answered 1 year ago

Hello Sara,
if I replace

//if (c == ‘\n’)
//{
// if (getAll.length()==0) state=true;
// getAll = “”;
//}
//else if (c != ‘\r’)
// getAll += String(c);
//if (state==true) getBody += String(c);
//startTimer = millis();

 
with (from https://github.com/halfstudents/Sharing-ESP32S3-CAM-Pictures-On-Telegram/blob/main/ESP32_cam_telegram.zip)
 

if(state==true) getBody += String(c);
if(c == ‘\n’)
{
if(getAll.length()==0) state=true;
getAll = “”;
}
elseif(c != ‘\r’)
getAll += String(c);
startTimer = millis();

I get UXVA Resolution, but only with  config.jpeg_quality = 44; // or lower

The size is 64KB.
 
I read, that with Telegram free, you can transmit pictures up to 2MB.

 
Greetings, Peter 

0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

Yes. Telegram can handle the picture, but maybe the request you’re making with the ESP32 doesn’t….
This kind of issue is very tricky to debug…. I’m not sure how to change the code to send bigger pictures…
 
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.