Quantcast
Channel: Arduino Forum - Latest topics
Viewing all articles
Browse latest Browse all 15374

Distinguishing clients between AP and STA webservers?

$
0
0

Hi -- programming an ESP32... I can start an APwebserver, or a STAwebserver which respond on the soft AP or STA interfaces, respectively. Or I can start a WebServer and it responds on both.

If I start a WebServer, how can I tell which interface a client request is coming in on?

I believe I can do:

bool isViaSoftAP()
{
    return(WiFi.softAPIP() == webserver->client().localIP())
}

...but it isn't it theoretically possible, however unlikely, that the soft AP IP could be the same as the STA IP that DHCP generates?

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 15374

Trending Articles