Universal-Arduino-Telegram-Bot icon indicating copy to clipboard operation
Universal-Arduino-Telegram-Bot copied to clipboard

Bot does not receive any message

Open Firemann112 opened this issue 3 years ago • 15 comments

Hey, the bot is not receiving any messages from me, I've tried everything but it doesn't work. Can someone help me please? I am using the FlashLED example. My ArduinoJson version is 6.18.5 and the UniversalTelegramBot version 1.3.0. I use a Wemos D1 mini V3 and have installed version 3.0.2 of the esp8266 board in the board manager. I use the Arduino IDE 1.8.15.

Firemann112 avatar Oct 24 '21 10:10 Firemann112

Its the same for me. I try it the first time to connect ESP32 with telegram and nothing works.

Ap1965 avatar Oct 27 '21 04:10 Ap1965

Hey, I just encountered the same problem. No messages were received. I updated Universaltelegrambot and ArduinoJson to the latest version (1.3.0 and 6.18.5) and now it works again on my Adafruit Huzzah 32. Hope this helps.

Znarfomat avatar Nov 01 '21 15:11 Znarfomat

After initializing wifi, add the line: secured_client.setCACert(TELEGRAM_CERTIFICATE_ROOT); // Add root certificate for api.telegram.org

workpage2 avatar Nov 02 '21 07:11 workpage2

Same problem

RosmanAndrey avatar Nov 12 '21 07:11 RosmanAndrey

Disabling connection security helped client.setInsecure();

RosmanAndrey avatar Nov 12 '21 07:11 RosmanAndrey

I'm having the same issue with a SAMD21 board. Already tried different hardware. Neither older versions nor the latest version of this library is working for me ☹️. Flashing the SSL certificate on the WiFi chip did not help and using BearSSL also has no effect.

felixerdy avatar Nov 24 '21 14:11 felixerdy

I'm having the same issue with a SAMD21 board. Already tried different hardware. Neither older versions nor the latest version of this library is working for me ☹️. Flashing the SSL certificate on the WiFi chip did not help and using BearSSL also has no effect.

What network interface are you using? TLS v1.2 requirement might be the issue?

witnessmenow avatar Nov 24 '21 14:11 witnessmenow

I'm having the same issue with a SAMD21 board. Already tried different hardware. Neither older versions nor the latest version of this library is working for me ☹️. Flashing the SSL certificate on the WiFi chip did not help and using BearSSL also has no effect.

What network interface are you using? TLS v1.2 requirement might be the issue?

I'm using a WINC1500 based module and flashed the latest firmware (19.6.1) using the Arduino Firmware / Certificates Updater. That should have TLS v1.2 included or am I wrong?

Just enabled the debug flags with the following serial output:

16:05:27.137 -> GET Update Messages
16:05:27.137 -> [BOT]Connecting to server
16:05:47.147 -> [BOT]Conection error
16:05:47.147 -> Received empty string in response!

felixerdy avatar Nov 24 '21 15:11 felixerdy

I have no idea , I don't see the version it supports mentioned in the documentation I looked at. I've never used the chip before so I can't really comment on it. I think it would be best to raise a separate issue for this in case someone else has knowledge on it

witnessmenow avatar Nov 24 '21 15:11 witnessmenow

Hi, I have to initialize the secured_client manually to make it works. Something like this.

const char fingerprint[] PROGMEM = "F2 AD 29 9C 34 48 DD 8D F4 CF 52 32 F6 57 33 68 2E 81 C1 90";

WiFiClientSecure https_client;
UniversalTelegramBot bot(BOT_TOKEN, https_client);

void setup() {
  // manual setup https related
  https_client.setFingerprint(fingerprint);
  https_client.setTimeout(15000)
}

The fingerprint var is telegram fingerprint for certificate, can retrieve it from lock badge beside url on your browser.

albadrun avatar Nov 25 '21 11:11 albadrun

Hi, the same thing, wemos esp8266, tried different ESP versions, doesn't get a response, works on other libraries, maybe something with the certificate?

AndreyUshak avatar May 11 '22 14:05 AndreyUshak

Doesn't work for me when using WiFi101 library and using AT WINC1500 wifi board. I can connect to WiFi, but can't connect to the Telegram servers.

I'm guessing either the ssl certificate is not correctly sent or an error with the local time.

tglaria avatar May 30 '22 22:05 tglaria

I faced this error after I restarted my project after 2 years again. I connected my wemos d1 mini via Wlan with my cell phone hotspot. (Samsung S23). I was not able to get my bot online until I went home and I connected the chip directly with my router. The bot came online. So it seems that the Phone blocked something. Maybe this helps.

orimate avatar Nov 24 '23 10:11 orimate

Same here.If I get trough mobile data then Bot Connection error but some times works. If its someone who understand why???

danielPaggio avatar Dec 08 '23 15:12 danielPaggio

Yesterday I travelled to my Mom. I wanted to get my bot online. This sketch was completely good at home. I tried with a "normal" (not via phone hotspot) internet connection. I got the same error as earlier via hotspot. I don't have any idea why the bot works at home and why not hier (Mom) and not with my hotspot. (I tried with Samsung S23 and Xiaomi Redmi 11S)

[BOT]Connecting to server<\r><\n> [BOT]Conection error<\r><\n> Received empty string in response!<\r><\n>

orimate avatar Dec 23 '23 17:12 orimate