ESP32 + LTE 5G ROUTER No Internet

Hi,

I have an ESP32 project where I am able to connect to wifi and access internet. However, if I hotspot to a Portable wifi router, it connects to the hotspot but no internet. I can connect a PC or a phone to that same hotspot and no issues.

The Portable wifi router is (LTE CAT6/Supersoftware H809pro) unlocked version. I bought it from Amazone.

And you're sure this is not a false-positive? On your phone you enabled airplane mode so that it can only go through WiFi, through that hotspot? On the PC you disconnected any other possible source of internet?

I couldn't even find a manual for that router. But, it does have a screen. When your ESP32 connects to the hotspot, do you see the number of connections increase?

Does your ESP32 get a proper IP address via DHCP? Does it get good DNS settings?

You can print that all of that with

 Serial.println("SSID: " + WiFi.SSID()); Serial.println("BSSID: " + WiFi.BSSIDstr()); Serial.println("Local IP: " + WiFi.localIP().toString()); Serial.println("DNS1: " + WiFi.dnsIP(0).toString()); Serial.println("DNS2: " + WiFi.dnsIP(1).toString()); 

Thanks. When I connect ESP32, I do get a local IP and all of the details. I tried the router with other devices, and I make sure it does not have any other connections at that time. And I have tried from multiple devices with the same result. It is just the ESP32 having issues.

I was assuming it is the mobile router having issues. So I ordered another one with a different model. But both are having the same issue. The first one could be because of the incorrect band. The first one never worked on any devices.

If I connect another device to that router and do a speed test, it will be slow (4G), compared to my home wifi or iPhone (5G). On the screen, it will also show the number of devices connected. So connecting the ESP32 and another device will show 2 connections.

If I connect ESP32 to my home wifi or my iPhone, then it works without any issues. Which means, no issues with ESP32 or code.

Connecting to JurasicHotspot
...
WiFi connected
SSID: JurasicHotspot
BSSID: 6C:93:08:C3:F1:03
Local IP: 192.168.1.200
DNS1: 192.168.1.1
DNS2: 0.0.0.0
Response: Request failed. Url:http://api.ipify.org httpCode: -1 
connection refused

Seems like nothing out of the ordinary.

Before you do the HTTP request, can you still do

 WiFi.setDNS(IPAddress(8,8,8,8), IPAddress(8,8,4,4)); 

to try out a different DNS server (Google's).

Also, try to put some delay like delay(5000); after connecting and before doing the HTTP request, it may need some settle time.

On the phone, do you have to go through a "Captive Portal" until internet access is enabled? Like a notification on your phone that you first need to go on a website to enable the access?

Another interesting thing would be to check whether you can ping an IP address when connected to that WiFi. You should install the "ESP32Ping" library and then upload this sketch (of course putting in your SSID and password too)

https://github.com/marian-craciunescu/ESP32Ping/blob/1.6/examples/SimplePing/SimplePing.ino

Change the to be pinged IP to

const IPAddress remote_ip(8, 8, 8, 8); 

you can also try pinging the router itself

const IPAddress remote_ip(192, 168, 1, 1); 

Pinging the router (192.168.1.1) was success. But no luck with 8.8.8.8 (with setDNS or without setDNS())

Did you check your routers settings if there's any isolation or mac filtering enabled?

No mac filtering enabled.
Does the Cellular Network Mode: LTE matter?
Most probably some, setting is affecting ESP32s only.

Try these basic steps. Set your router to 2.4ghz only and set manually channel (for example 6).
On esp32 code give static ip address, and manually set gateway, sub and dns.
(verify your gateway and subnet with another device that successfully connects).

IPAddress local_IP(192, 168, 1, 200); // use your router ip range out of dns IPAddress gateway(192, 168, 1, 1); // verified gateway IPAddress subnet(255, 255, 0, 0); //verified subnet IPAddress primaryDNS(8, 8, 8, 8); WiFi.config(local_IP, gateway, subnet, primaryDNS); 

That's so strange. It's like the router is blocking outside internet access to the ESP32.. until it sees something from the device? Maybe it's waiting for some sort of packet, that's usually sent by other devices / operating systems but not the ESP32?

I think only the manufacturer of the router can help you at this point. Looks like a firmware bug on their side to me.

That sounds challenging ... :wink:

Hi @tfamith ,

Welcome to the forum..

looks like your insecure connection was refused, maybe you need to try https..

good luck.. ~q

would look in this direction - What is the default packet length for TCP/IP?

Please go to menuconfig > Component config > LWIP > TCP > Maximum Segment Size (MSS) for the length.


It only comes with 2.4G
Setting the config did not work either.

Not sure where these options.

I tried both http and https, but still the same issue. Actually, we are also trying the ping with no luck.


This is what I get.

In the settings, I cannot see any settings which I can change the frequency to 2.4ghz. So I am assuming it supports only 2.4.

Read here what I'm talking about, but I don't know where this parameter is configured in ESP32. I had a similar problem, but not with ESP32. Configuring MTU solved it.

Thanks. As per my understanding, this has to be done through code, which I am not sure of.

The purpose of the Mobile Router is to provide internet access to my ESP32, on-the-go. It will send GPS coordinates to my API and receive commands from the API which is hosted in a server.

Anyone can suggest any other options other than a mobile router please? I am based in Australia, so the band should be compatible with Australia SIMs.

At the moment, I am connecting to my iPhone hotspot and it works perfectly. But looking for a permanent internet solution.