- Thu Mar 07, 2019 1:05 pm
#80942
Well friends, I have it solved, I do not know if it is the best way but it works.
I also have to say that the information there is not clear.
I leave it in case someone can use it:
Code: Select all
// include plain C library
extern "C" {
#include "user_interface.h"
}
boolean clientewifisi=0; //global var
void clientesreales()
{
struct station_info *station_list = wifi_softap_get_station_info();
boolean haywifi = 0;
while (station_list != NULL)
{
clientewifisi = 1;
haywifi = 1;
station_list = STAILQ_NEXT(station_list, next);
}
if (haywifi == 0)
{
clientewifisi = 0;
}
}
Basically if it enters
while (station_list! = NULL)
{
.....
}
is that there are wifi clients authenticated.
This function gives client data such as ip, mac ect.
These data do not interest me, so I do not look at them.
If it does not enter there are no real client wifi.
That is all
Greetings and thanks to all.