Closed jriquelmeit closed 5 years ago
hi, i using the example to documentation. i have following problem
GET Update Messages [BOT]Connecting to server [BOT]Conection error Received empty string in response! leer mensaje 0
The fragment code is:
#include <Arduino.h> #include <ESP8266WiFi.h> #include <WiFiClientSecure.h> #include <UniversalTelegramBot.h> * * * void loop() { if (millis() > Bot_lasttime + Bot_mtbs) { Serial.println("leer mensaje"); int numNewMessages = bot.getUpdates(bot.last_message_received + 1); Serial.println("leer mensaje"); Serial.println(numNewMessages); while(numNewMessages) { Serial.println("got response"); for (int i=0; i<numNewMessages; i++) { bot.sendMessage(bot.messages[i].chat_id, bot.messages[i].text, ""); } numNewMessages = bot.getUpdates(bot.last_message_received + 1); } Bot_lasttime = millis(); } }
I have solved the problem with following change replace WiFiClientSecure client with BearSSL::WiFiClientSecure client and add line client.setInsecure();
WiFiClientSecure client
BearSSL::WiFiClientSecure client
client.setInsecure();
hi, i using the example to documentation. i have following problem
GET Update Messages [BOT]Connecting to server [BOT]Conection error Received empty string in response! leer mensaje 0
The fragment code is: