-->
Page 1 of 1

WIFI_AP_STA controls question

PostPosted: Wed Nov 18, 2015 3:27 pm
by diffstorm
Hello,

I try to use WIFI_AP_STA mode with controlling both ways. I have some questions;
I'll be glad if anybody can answer.

1 - How to stop AP mode working? Only STA mode should stay, so I do not want to see any wifi names around.

2- How to understand AP mode is open? I mean checking is it working now

3- How to know if anybody connected thru AP mode? And their info?

4- How can I filter connected clients to my AP by MAC and can I kick anyone?

5- How to make login protection to guests connected to my network? is there any easy method than writing your own code which checks with flags etc..

Thanks in advance

Re: WIFI_AP_STA controls question

PostPosted: Wed Nov 18, 2015 3:44 pm
by martinayotte
1- You can force to be in AT mode only with Wifi.mode(WIFI_STA).
2- You can do a Wifi.getMode() to see if the mode is Ok.
3- you can enumerate connections with wifi_softap_get_station_info();
4- during above enumerate, you can get their MAC addresses. Unfortunately, I don't think you can disconnect them from AP if they got properly connected with proper password, but your server can avoid letting them do any calls.
5. Same as above, if clients have good password, the Wifi connect is done. Then, your server can have is own login.
(In other word, there is the Wifi login, and their application login)

Re: WIFI_AP_STA controls question

PostPosted: Thu Nov 19, 2015 11:09 am
by diffstorm
Hi

Thanks for answers.

1 - I just understood that if I clear config of ESP, it do not start an AP with WIFI_AP_STA. I just asked my question over this information.

2- I have asked my all questions according to WIFI_AP_STA only.

Please notice if you know a method to clear only AP config of ESP.

Thanks for other answers, they are useful.

BR

Re: WIFI_AP_STA controls question

PostPosted: Fri Nov 20, 2015 10:37 am
by martinayotte
I'm not sure to understand you.
If you clear configs, it is clearing the STA, but AP will still work.
The only way to stop AP mode is to switch mode to either WIFI_OFF or WIFI_STA.