Controlling of connected station to softAP

ukrsms
Posts: 7
Joined: Tue Oct 17, 2017 6:01 pm

Controlling of connected station to softAP

Postby ukrsms » Tue Oct 17, 2017 6:04 pm

Hi, All
I'm using the ESP8266 module for WIFI communications but there is one thing caused a great problem for our device. We use Soft AP to set credentials for the ESP to connect it to a router. But the problem is that we use open WIFI net without security and sometimes all available channels become busy :x before I started to connect to AP. I looked through the documentation but haven't found any information how could ESP itself disconnect some station from its WIFi. Could someone help me to solve the problem?

blubb
Posts: 111
Joined: Mon Jun 22, 2015 5:35 am

Re: Controlling of connected station to softAP

Postby blubb » Wed Oct 18, 2017 9:09 pm

Maybe just use a default password? 12345678 or the like? That does not provide real security but prevents auto connections.

ukrsms
Posts: 7
Joined: Tue Oct 17, 2017 6:01 pm

Re: Controlling of connected station to softAP

Postby ukrsms » Fri Oct 20, 2017 8:37 pm

Of course, it could be done so, but is not convenient to enter a long password every time a user wants to connect to device's Net. It would be easier just to select open WIFI net and if the user is not authorized then the device could disconnect it.

blubb
Posts: 111
Joined: Mon Jun 22, 2015 5:35 am

Re: Controlling of connected station to softAP

Postby blubb » Sat Oct 21, 2017 1:49 am

AFAIK there is no API for this. I don't know why. I once read that you needed to send a "deauth" packet and this had to be generated manually. In any case there is no easy solution.
Maybe you should open a request here:
https://github.com/espressif/ESP8266_NONOS_SDK/issues

On the other hand even just a very short password should do the job for you...

blubb
Posts: 111
Joined: Mon Jun 22, 2015 5:35 am

Re: Controlling of connected station to softAP

Postby blubb » Sat Oct 28, 2017 5:13 am

Actually, in libmain there seems to be a wifi_softap_deauth function... but since it is not in any .h file, I am not sure how to use it.
Maybe Espressif could elaborate on this.

ukrsms
Posts: 7
Joined: Tue Oct 17, 2017 6:01 pm

Re: Controlling of connected station to softAP

Postby ukrsms » Sun Oct 29, 2017 4:59 pm

blubb wrote:Actually, in libmain there seems to be a wifi_softap_deauth function... .


Well done, blubb! It seems it is what I was looking for. I found the prototype for the function:

Code: Select all

bool wifi_softap_deauth(uint8 mac[6]);

I've just tried it - it works fine. So the function provides us a possibility to disconnection of some station from our AP if it is necessary.

Who is online

Users browsing this forum: No registered users and 8 guests