ESP32 readout of some sort of WiFi clientID

Hi there!
I am right in the middle of coding a ESP32-based scoreboard for a leisure sport game. After having started off with just some buttons and an LCD display it has now grown to a main ESP controlling the logic itself and 2 "satellite" ESPs driving RGB matrix displays getting their data via MQTT.
My last idea now was adding a webserver to be able to alter the scores via smartphones from anywhere in the field. Async webserver is already setup and the main ESP is now working in AP+STA mode. STA is used for communication between the main ESP and the matrix satellites.
AP is reserved for client connections from the players' smartphones.

What came to my mind while giving the idea more thought was:
ESP is able to manage a max of 4 WiFi client connections at the same time. So in theory if you would have e.g. 4 players' smartphones connected all of them would be able to alter the scores via browser on their phone. So far no real prob.

Thing is, the further down the road the game is running the more beer is involved and users might even consider "secretely" altering the score to their team's advantage...
As so often, the more "leisure" a sport gets the more cheating is involved (with or without beer that is) :wink:

Long story short:
Is there a way to get the respective WiFi clientID of the phones connected to AP?
I would like to use these IDs to create some sort of master/slave scenario so that only 1 smartphone is actually able to control the scores and the others are only allowed to read the scores.
As soon as the master phone is logging out another phone should become master (randomly).

--edit--
might even work by reading out IP adresses. Are the DHCP adresses issued in AP mode always the same? e.g. 192.168.4.2-192.168.4.5
--edit--

I know, pretty much thought for a leisure game, but...

Any ideas much appreciated!

Greetings!
Tom

A browser usually doesn't have constantly an open connection to the server but during access it may open multiple connections to the same server.

In the web world this is usually done by cookies.

Does you web application has a login and logout functionality? Otherwise it's hard for the ESP to determine when the phone "logged out".

For a limited time frame this might work.

To counterfeit cheating commonly some sort of authentication is used on the Web.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.