-->
Page 1 of 3

Who's connected?

PostPosted: Thu Jul 02, 2020 5:56 am
by Hairyloon
Is there a way to identify the devices that are connected to an ESP?
Is there a command to have it return the MAC address or something?

Re: Who's connected?

PostPosted: Thu Jul 02, 2020 9:46 am
by eriksl
struct station_info * wifi_softap_get_station_info(void);

Re: Who's connected?

PostPosted: Mon Jul 06, 2020 9:39 am
by Hairyloon
eriksl wrote:struct station_info * wifi_softap_get_station_info(void);


Thank you.
If there is more than one client connected, can we tell which one has put some data onto the server?
Sorry if these are silly questions, I'm a bit new to this game.

Re: Who's connected?

PostPosted: Mon Jul 06, 2020 10:38 am
by eriksl
In that case you will have to keep tabs yourself. Whenever you receive data, request for the sender IP. For UDP you can do that on a received packet base, for TCP you will have to inquire the incoming socket (as the other side is always known during a connection).