• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Why can’t I see the web server on ESP8266 by my smartphone browser?

Q&A Forum › Category: ESP8266 › Why can’t I see the web server on ESP8266 by my smartphone browser?
0 Vote Up Vote Down
Enzo Pontone asked 5 years ago

It works all fine if I interact with my ESP8266 via my pc browsers. But when I open Chrome on my wifi connected  smartphone it can’t connect to the web server.

My phone and the ESP8266 are on the same network. What am I doing wrong?

Thanks for any hint!

Enzo

Question Tags: browser, connection, server, smartphone
15 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi Enzo.
What web server are you running?
What browser are you using on your smartphone?
Do you have the web server opened on both browsers at the same time?
Regards,
Sara
 

0 Vote Up Vote Down
Enzo Pontone answered 5 years ago

Hi Sara,
I’m running the one showed in “MicroPython_Programming_with_ESP32_and_ESP8266_V1_2” starting from page 144.
I’m using Chrome on my smartphone.
I tried with both browser clients at the same time and with my smartphone browser only. The pc browser (Firefox and Chrome, it’s the same) always works fine, the smartphone browser (Firefox and Chrome) are always “unable to connect”. Of course the same smartphone browsers are ok for every other internet site connection.
Thanks for your help!
Enzo

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi Enzo.
I’ve tested the example and what is happening is that Google Chrome opens an additional connection that remains open. Which makes it impossible to make another connection to the web server while it is not closed.
To solve that, we need to add some lines to close any connection after 3 seconds, so that sockets are free for another connection.
Here’s the new main.py code.
https://gist.github.com/RuiSantosdotme/c1175b82ca14cae77a666456e75e7025 
Can you try it and see if that solves the problem?
We’ll update that issue in the next eBook update.
Regards,
Sara
 
 

0 Vote Up Vote Down
Enzo Pontone answered 5 years ago

Hi Sara,
I’ll try it now but I don’t think this works: the smartphone doesn’t connect at first try (after resetting the ESP) so it can’t be blocked from anything else previously. I forgot to tell you I tried with different smartphones, too and the result is always the same. It seems the smartphones can’t reach the web servers: Thonny’s console doesn’t show anything while at every try with pc browsers (wired to the LAN) it shows the connection.

0 Vote Up Vote Down
Enzo Pontone answered 5 years ago

Hi Sara, just an update: I tried with your updated version but nothing changes.
As I told you the problem seems to be the connection itself.
Have a nice day.
Enzo

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi Enzo.
That’s very weird.
I can access the web server from computer and smartphone and both at the same time.
I don’t know why you’re having that issue.
Are you sure you are really connected to the same network that the ESP32?
What is exactly the error message that you get?
Regards,
Sara

0 Vote Up Vote Down
Enzo Pontone answered 5 years ago

Hi Sara,
It seems so strange to me, too! The error is a classic “This site can’t be reached” (ERR_ADDRESS_UNREACHABLE). I guessed it could be something in my network but what?
The same smartphones which can’t connect to ESP8266 are usually connected, e.g, to a Xiomi robot for floor cleaning. Yes I checked the IP address of the smartphone wifi and it’s in the same net. It couldn’t be otherwise: I’ve a single DHCP server distributing the addresses.
The last 2 IP in the connection answer of the ESP8266 (after the subnet mask) what represent? DNS? Default gateway?
Regards,
Enzo

0 Vote Up Vote Down
Enzo Pontone answered 5 years ago

Update: checking the nets on my smartphone I notice a net “MicroPython-ea8efc” protected by a password: shouldn’t my ESp8266 act as a client only? Why do I see it as if it were a hot spot?!?
And btw how can I know the AMC address of the ESP8266?
Thanks!
Enzo

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi Enzo.
It’s ok to have the MicroPython “access point”. I have that too and it works fine.
You can use the following lines to get the mac address

import network
import ubinascii
mac = ubinascii.hexlify(network.WLAN().config('mac'),':').decode()
print (mac)
0 Vote Up Vote Down
Enzo Pontone answered 5 years ago

Hi Sara,
sorry for this very late answer. I wish to share with you that now I can see the ESP 8266 web server on my wireless connect smartphones! It was not an ESP issue: a flag in my router set the separation among wireless devices connected to it. It had to be unchecked for devices to communicate each other but it was deeply “hidden” in others menu. Thanks for your hints.
Nice regards 🙂
Enzo

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi Enzo.
I’m glad it is solved now. Many times it can be really difficult to figure out what is causing those issues.
I’ll mark this question as resolved.
If you need further help, you just need to open a new question in our forum.
Regards,
Sara

0 Vote Up Vote Down
David Brown answered 4 years ago

I would like to know what flag was checked in your router.  I am having a similar issue where my ESP8266 is connected to my SSID but I can not get to the web server with any browser.  Sara, you are familiar with this issue from my post at my own thread.   I have not been able to resolve.  It looks as thought there is something blocking me from connecting to more than one ESP 8266 Web server( I already have one running at another IP address on the same network)

0 Vote Up Vote Down
Enzo Pontone answered 4 years ago

Hi David,
in my Fritz router it was a setting in the config file: “user_isolation = 1”, when I set it to “user_isolation = 0” my smartphone was able to see the ESP.

0 Vote Up Vote Down
David Brown answered 4 years ago

Enzo,
Thanks for your response, I am not familiar with that router setting?  Ironically I have one ESP8266 board that works with every platform, and two that don’t work with any?
I will do some more research and report what I am able to find.
 
Dave

0 Vote Up Vote Down
Enzo Pontone answered 4 years ago

Did you check if you had any access list or other security active on your router? Maybe you inserted the working ESP in an Access Control List but didn’t insert the other two, for instance. I had similar problem with my wifi network when I forgot to insert the MAC address of my ESPs in my router’s ACL.
 

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.