Chat freely about anything...

User avatar
By Beagle
#10753 I've worked with other Wi-Fi adapters and what I've noticed is they generally don't hand out a gateway when they are acting as a DHCP server. This prevents the client device from mistakenly thinking that this device has a link to the internet.

When connected, the client ends up with intermittent connectivity issues because it thinks it can route through 192.168.1.4

Has anyone else experienced this?
User avatar
By kolban
#24334 Howdy Beagle,
I'm afraid I'm not understanding ... and it is most likely my error. I assume that when an ESP8266 acts as an access point, then stations that connect to it will use the ESP8266 as a gateway to other TCP/IP networks. If the ESP8266 is not connected to any other networks then, obviously, there is no need for a gateway ... unless some other station connects and it itself is available to be a gateway.

Can you elaborate on your comments to help me understand the issue?
User avatar
By lethe
#24340
kolban wrote:I assume that when an ESP8266 acts as an access point, then stations that connect to it will use the ESP8266 as a gateway to other TCP/IP networks.

The ESP can not act as gateway, since it does not have support for IP routing or masquerading. And a station that connects to an ESP may have more than one network interface, so the ESP may overwrite a previously set default route.

@Beagle: according to the documentation you can prevent the ESP from announcing a route with
Code: Select alluint8 mode = 0;
wifi_softap_set_dhcps_offer_option(OFFER_ROUTER, &mode);


See "2C-ESP8266__SDK__Programming Guide__EN_v1.2.0.pdf" pg. 61
User avatar
By kolban
#24344 Thanks Lethe, your information is like gold to me.

If one disables the offering of a gateway from an ESP acting as an access point, what then does a station see as a "gateway" when it connects to the ESP?

Neil