cotestatnt / AsyncTelegram2

Powerful, flexible and secure Arduino Telegram BOT library. Hardware independent, it can be used with any MCU capable of handling an SSL connection.
MIT License
83 stars 25 forks source link

Bot not working on certain network #124

Closed navdeepssidhu closed 9 months ago

navdeepssidhu commented 10 months ago

Hi, First of all, thanks for the great library. The library is working very nicely, but i am facing an issue which i do not think is because of this library and i need help/guidance to resolve it. Description: Board: ESP32 cam Example sketch: esp32 cam I have two mobile phone as hot spots with different networks, i connected the same esp32 cam with same sketch to both hot spots with the following results

Hot spot "A" - Did not send or receive message. To check telegram, i sent http request from browser which was also not successful.

Hot spot "B" - Sending and receiving messages successfully. Also checked telegram by sending http request from browser which was also successful.

I spent good amount of time to google and tried few different things and changed the dns settings of Hot spot "A" to private dns (dns.google). Then i was able to send http request to esp32 cam from browser, but example sketch is still not sending or receiving the messages. any help would be much appreciated. Thanks

cotestatnt commented 9 months ago

Hi @navdeepssidhu Sorry fot late reply.

You can set dns settings also for ESP32 board and it should work.

IPAddress local_IP(192.168.xxx.xxx);   // ESP32 IP address
IPAddress gateway(192.168.xxx.xxx);  // Your router IP address
IPAddress subnet(255, 255, 255, 0);
IPAddress primaryDNS(8, 8, 8, 8);   // Public DNS1
IPAddress secondaryDNS(8, 8, 4, 4); // Public DNS2
WiFi.config(local_IP, gateway, subnet, primaryDNS, secondaryDNS)
navdeepssidhu commented 9 months ago

Thanks for taking time and reply. I will give it a try. Thanks again