I was trying to connect my ESP32 with Jio Air Fiber, but I encountered an issue because the 2.4GHz and 5GHz Wi-Fi channels cannot have separate SSIDs in this router, so the ESP32 could not connect to the Wi-Fi.
To solve this, I connected a netis router to the Air Fiber Router using Ethernet as a LAN-to-LAN connection, and then connected the ESP32 to the netis router using 2.4GHz Wi-Fi.
Now, when I make an HTTP request from the ESP32, it returns a -1 HTTP code. However, when I connect the ESP32 to an Android phone's hotspot, the HTTP requests work fine.
Notes: I have both GET and POST requests, and both returns -1. When I connect my phone with the netis router, I can serf the web fine. I did no additional coding, I have used the default wifi and http client lib comes with platform io esp32 dev kit.
Any suggestions on how to resolve this issue?
#include <WiFi.h>
#include <HTTPClient.h>
HTTPClient client;
for example i have made a GET request to https://worldtimeapi.org/api/timezone/Asia/Kolkata
. I think it has to do something with my router setup which I'm unaware of. My router is in access point mode.
I solved this issue by setting the router to access point mode and disabling dhcp server mode. these settings were not available in the netis router so i had to use a tp-link router.