The use of the ESP8266 in the world of IoT

User avatar
By cds333
#92851 You need a router that supports tethering to your mobile phone. I have not done this recently but a quick search yields a few results such as this: https://www.vpnuniversity.com/tutorial/ ... our-router

You then need to setup a dynamic DNS, because your phone most likely does not have a static WAN IP. (Simply put- "static IP" means it stays the same every day, vs "dynamic IP" which can change whenever the cellular company feels like it.) NoIP.com is a good one that gives you a completely free address.

So you would register esp8266forward.no-ip.net for exmaple and then forward whatever port you choose in your router (say 8080), so then by going to http://esp8266forward.no-ip.net:8080 you would get forwarded to your device.
User avatar
By Inq720
#92904
gegian wrote:Hi. I just tried out this project

https://randomnerdtutorials.com/esp8266-web-server/

with the esp8266. Now where i live i have not accessed to cable internet so i used my android hot spot as a source of internet. Everything was looking fine and it was working wonderfully when i tried to connect with my mobile (the one that was feeding internet the ESP through hot spot.) Unfortunately, i have noticed that only this mobile had access to the server. I tried to connect with couple of other mobiles to the server but the page could not get loaded. Any idea why this is happening and how it can be fixed ?

Thanks


I'm like you and don't have any "wired" solutions. My only real choice around here is a Verizon Hot Spot, so I'm familiar with what's going on.

Android phones when used as hot spots do not permit cross-talking between devices connected to them. Home routers default to allowing cross talking or you'd never be able to talk to your networked printer. Android phones default like a public hot-spot... they don't allow it for security reasons. I have one of these mobile cellular hot-spots like
Untitled.png
and they do permit cross-talking.

Another solution is a router that can connect to your hot-spot. I have one of these https://www.amazon.com/gp/product/B073TSK26W/ref=ppx_yo_dt_b_asin_title_o03_s01 and it allows ESP8266 server and other devices to connect and see your website and since this type of router can connect to your phone hot-spot, they could also have access to the Internet.

Another solution, while you're in the experimental stage... you can add a line of code to that program to make it expose what's called a Soft Access Point where the ESP8266 acts as a router. The web server can then serve pages to those connected directly to the ESP8266. The ESP8266 can support up to 4 connections in this way. The server can then serve pages to those connected directly AND those connected through any router connection.

I don't use that library that that sample uses, but the method call needed is
WiFi.mode(WIFI_AP_STA);
It will allow direct connections and still connect to your hot-spot.

Here's a thorough explanation for that library.
https://arduino-esp8266.readthedocs.io/en/3.0.1/esp8266wifi/readme.html

Good luck
You do not have the required permissions to view the files attached to this post.