I would like to know if it is possible to stop broadcasting the SSID for a gl.inet ar750 without restarting the wireless. (wifi down/wifi up). The reason is that it would disconnect clients.
I want to prevent a flood of users connecting to this small device to download something from its sd-card. so I had this crazy idea to hide the SSID if there is lets say more than 35 users connected. If there is less than 25 users I would like to start broadcasting again.
Not that I'm aware of.
uci set wireless.@wifi-iface.hidden=1; uci commit wireless; wifi
The first two commands will change it to hidden and write it to the file, but you would still need the third to put that in effect.
Having said that, this doesn't have to "kick" the clients out. The WiFi connection will drop yes, but if it's set to "connect automatically" or whatever term your OS uses, and there are no other saved WiFi in the area, it will likely reconnect without the user even noticing the brief drop.
For applications that matter, users will have to set keep-alive (time out) to accommodate such drop.
Why not use the
maxassoc setting? This will prevent any more clients from connecting once the certain number is reached.
The AP will send an "AP Too Busy" reason code to someone who tries to connect in that situation, but no OS seems to actually use that feature to present information to the user.
Isn't that particular to Broadcom drivers, as per https://oldwiki.archive.openwrt.org/doc/uci/wireless?
Why not just restrict access to the file and only provide access to those that you wish to allow?
Accomplishing the hiding of the SSID won't necessarily accomplish your desired goal of dropping currently associated clients.
I think he isn't trying to do that; he is just trying to prevent more users form joining until some users disconnect. I don't know where the deice is installed or how soon are clients likely to disconnect (e.g. leave the place) but that's what I infer from the OP:
It won't prevent this either. I hide some SSIDs all the time - immediately after I setup a new user in those cases. They can connect, and others aren't tempted to try connecting merely because they see the SSID.
It will prevent new users, though.
That's what I meant. Well, unless some of existing users volunteers to give out the SSID
Yes, this is exactly what I am trying to establish. Prevent new users, I am also working on kicking off inactive users.
The application would be that I have several boxes with unique SSID's, users would automatically distribute themselves over the "visisble" SSIDs.. so a poormans loadbalancing so to say.
Perhaps I used the wrong terms, this won't work on all devices just by hiding SSID.
It prevents a new user from associating a new device, since they don't know the SSID to manually add it to the client. It may not prevent a re-association of a device that already has the SSID and key saved into it.
Good news: I tried it with the GL.Inet boxes and it works!