witnessmenow / Universal-Arduino-Telegram-Bot

Use Telegram on your Arduino (ESP8266 or Wifi-101 boards)
MIT License
1.12k stars 311 forks source link

Conection error #100

Open Roman1820 opened 5 years ago

Roman1820 commented 5 years ago

V1.1.0 While connecting I receive the following: GET Update Messages [BOT]Connecting to server [BOT]Conection error Received empty string in response!

BOT token is OK and checked by sending request with https://api.telegram.org/bot.... Why can't I connect to telegram server?

pcosta0 commented 5 years ago

Hi I had the same problem with Arduino IDE 1.8.8 and ESP8266 2.5.5-beta2 libraries. A possible fix that works for me was adding the following lines to the sketch setup

//api.telegram.org fingerprint client.setFingerprint("BB DC 45 2A 07 E3 4A 71 33 40 32 DA BE 81 F7 72 6F 4A 2B 6B");

I hope that helps

igorelterrible commented 5 years ago

Hi, i´ve got the same problem with Arduino IDE 1.8.8 and ESP8266 2.5.5-beta2 & -beta3 libraries.. your solution (client.setFingerprint(":..) does not work for me -> it does not compile error -> 'client' does not name a type and i can´t find any setFingerprint in the lib`s

and BOT token is also OK -> sendin request work´s How can i make a work around...?

witnessmenow commented 5 years ago

Where are you putting it? It should be in the setup of your sketch

On Sat, 26 Jan 2019, 22:39 igorelterrible <notifications@github.com wrote:

Hi, i´ve got the same problem with Arduino IDE 1.8.8 and ESP8266 2.5.5-beta2 & -beta3 libraries.. your solution (client.setFingerprint(":..) does not work for me -> it does not compile error -> 'client' does not name a type and i can´t find any setFingerprint in the lib`s

and BOT token is also OK -> sendin request work´s How can i make a work around...?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/witnessmenow/Universal-Arduino-Telegram-Bot/issues/100#issuecomment-457872008, or mute the thread https://github.com/notifications/unsubscribe-auth/ABfXwpP9T3mvDc7IEnaBWoXm2qXPnldVks5vHNkogaJpZM4ZgnWR .

igorelterrible commented 5 years ago

thank´s a lot... now it compiles fine.... & it work´s === thank´s a lot

igorelterrible commented 5 years ago

hi - otra vez...

when i try to use WiFi.config with the lib i don´t get any message... commenting out only this line in the code

//WiFi.config...,

it work´s fine. you´ve got a idea who to get a fix tcp/ip another way?

thanks.

(yes i´ve found & read - an other / closed issue, but :-| )

gshimansky commented 5 years ago

Thank @PCosta10 for solution, it worked for me. I think it should be added to project start page.

addiemuz94 commented 5 years ago

@PCosta10 Hai..may i know how did you manage to get the fingerprint?

It does help to solve my problem.

Thank you very much...

pcosta0 commented 5 years ago

Hi @addiemuz94 In firefox enter your bot address (https://api.telegram.org/botXXXXXX.....) then right-click on an empty area of the web page and select "View Page Info" from the context menu, in the next Info Window go to the last tab "Security", click on "View certificate" and a new window will appear. In the bottom there is a group "Fingerprints". Use SHA1 Fingerprint

addiemuz94 commented 5 years ago

Thanks..

joguit commented 4 years ago

Hi Thanks for the reply. For years I have programmed with telegrambot without problems, but now it failed me. (Arduino ide 1.8.5 linux, 1.8.3 win xp,) It has helped me to use client.setFingerprint (). Now it works. Attention: client.setFingerprint must be inside setup (). My question is: (Please correct me if I'm wrong): Certificates have an expiration date. -Should the sketch be reprogrammed once the certificate expires? -Why it wasn't necessary before and now it is. -Is it due to incompatibility between libraries (package_esp8266, arduinoJson, universalTelegrambot? (Thank you)

Mukhar commented 3 years ago

This is working at present the previous one does not work for me. client.setFingerprint("f2 ad 29 9c 34 48 dd 8d f4 cf 52 32 f6 57 33 68 2e 81 c1 90");