• 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

Telegram: Request ESP32/ESP8266 Sensor Readings (Arduino IDE) sketch getting error: ‘X509List’ does not name a type” in

Q&A Forum › Category: ESP8266 › Telegram: Request ESP32/ESP8266 Sensor Readings (Arduino IDE) sketch getting error: ‘X509List’ does not name a type” in
0 Vote Up Vote Down
Konstantin asked 4 years ago

Hi All!
Did  anybody get this error  “X509List’ does not name a type”
while compiling  Telegram: Request ESP32/ESP8266 Sensor Readings (Arduino IDE) sketch?
I am trying to  connect ESP8266 to telegram bot,  it works fine with ESP32, but stuck with ESP8266
Can not find any solution on internet yet… Any help would be very appreciated.
Thanks, Konstantin

Question Tags: telegram
7 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi.

What is the code that you are using for the ESP8266?

In the library manager, update the Telegram Library to the latest version.

Regards,
Sara

0 Vote Up Vote Down
Konstantin answered 4 years ago

Hi Sara,
Thanks for your try to help.  I am stuck at the first step, as I just use your sketch without any modification and simply trying to compile it. Code is from this article https://randomnerdtutorials.com/telegram-group-esp32-esp8266/   Have you tried to compile it  yourself ?
Arduino is  updated to the latest release  1.8.15
 
Just tried it again and got  the following set of errors:
sketch_jun01a:30:3: error: ‘X509List’ does not name a type
X509List cert(TELEGRAM_CERTIFICATE_ROOT);
^
C:\Users\kosbo\Documents\Arduino\sketch_jun01a\sketch_jun01a.ino: In function ‘void setup()’:
sketch_jun01a:90:12: error: ‘class axTLS::WiFiClientSecure’ has no member named ‘setTrustAnchors’
client.setTrustAnchors(&cert); // Add root certificate for api.telegram.org
^
sketch_jun01a:90:29: error: ‘cert’ was not declared in this scope
client.setTrustAnchors(&cert); // Add root certificate for api.telegram.org
^
sketch_jun01a:100:47: error: no matching function for call to ‘axTLS::WiFiClientSecure::setCACert(const char [1369])’
client.setCACert(TELEGRAM_CERTIFICATE_ROOT); // Add root certificate for api.telegram.org
^
C:\Users\kosbo\Documents\Arduino\sketch_jun01a\sketch_jun01a.ino:100:47: note: candidate is:
In file included from C:\Users\kosbo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\ESP8266WiFi\src/WiFiClientSecure.h:23:0,
from C:\Users\kosbo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\ESP8266WiFi\src/ESP8266WiFi.h:42,
from C:\Users\kosbo\Documents\Arduino\sketch_jun01a\sketch_jun01a.ino:11:
C:\Users\kosbo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\ESP8266WiFi\src/WiFiClientSecureAxTLS.h:56:8: note: bool axTLS::WiFiClientSecure::setCACert(const uint8_t*, size_t)
bool setCACert(const uint8_t* pk, size_t size);
^
C:\Users\kosbo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\ESP8266WiFi\src/WiFiClientSecureAxTLS.h:56:8: note: candidate expects 2 arguments, 1 provided
exit status 1
‘X509List’ does not name a type

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi.
Yes, it is working fine for me.
You need to update the Telegram Bot Library.
Follow the next steps to install the latest release of the library.

  1. Click here to download the Universal Arduino Telegram Bot library.
  2. Go to Sketch > Include Library > Add.ZIP Library...
  3. Add the library you’ve just downloaded.

Then, check the library version. Go Sketch > Include Library > Manage Libraries and search for “universaltelegram”. Check that you have version 1.3.0 installed.
Restart your Arduino IDE. Then, it should compile just fine.
Regards,
Sara

0 Vote Up Vote Down
Konstantin answered 4 years ago

Hi,
Thanks a lot for your help. I have successfully compiled sketch on another PC, so something wrong on my main computer…

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

The let me know if you find the issue.
Regards,
Sara

0 Vote Up Vote Down
Konstantin answered 4 years ago

Hi,
Just in case if somebody gets similar problem,  most likely this error does not related to ArduinoJson or Telegram bot library releases, as I tried different releases  and it did not help.
As I am using  ESP8266 for a while, my  ESP8266  board release in Arduino was 2.4.2.
Just updating it to the current 3.0.0 ESP8266  board release  solved the problem.
All the best, Konstantin

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi again.
Thanks for sharing the solution.
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
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

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition 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.