New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SOLVED] Disconnecting is not working anymore #19
Comments
hi @Rosentine, as you can see in other comments in this project, I'm not using openwrt anymore (moved to UniFi access points and UDM as gateway), so I cannot test... It used to be So maybe just get the older version? |
You went to the dark side! I needed a WAP network for my home automation devices (around 80-100 units), and I found that historically the regular WAP config, was a mess, because many of these devices were connecting with -80dB and even worse, when there was a another dumb AP better and nearer, just because many of these little gadgets were dumber than the dumb AP (many Chinese products with low quality componentes) So I was planning to move to Omada (instead of Unify, that is way more expensive), but then I found all these things and I've set up all the OpenWRT routers I had in my storage room to work for me. I got to say that wmn_disassoc_imminet is way better for those that use Roaming services for Wireless devices but terrible for static devices (even when blacklisting). They still kept appearing and disappearing. I'm testing @Rosentine proposal, and seem to be working better still need more testing. EDIT: Still not working well My wifi-iface config:
Then I see
That is blacklisted, but connected in LuCI So this hack has not solved the issue I've seen that also in the OpenWRT forums someone else reported this |
I have some iot devices (sonoff switches), the best solution is to add a wifi AP near them. It can be a cheap, 2.4Ghz only, you can lower the power to minimum level they "pair", but that's it. I have some with openwrt that I used before moving to UniFi, like in the kitchen and in a shaft... Note: the blacklist is to avoid sending the disconnect, not to avoid it to be connected, see my docs:
|
also, I'm not following the forums and all, but since people seems to have interest in this code and I'm not using it anymore, shall people want to move it to somewhere else, I can join in there to help with code review and stay in touch, then I delete it here an refer to the new repo where more people can contribute. If there is no standard "openwrt repo", I can spin off a new repo and add contributors there... this one is like a "catch all my stuff that I do not bother to create a repo", thus the "playground" name. |
Hi,
i found out that method used to disconnect STA i not valid anymore (don't know when was it changed).
Method that is used in script is wnm_disassoc_imminent and has to be changed to del_client
To make script work again, I had to modify this function:
function Device:disconnect_sta(sta)
local endpoint = "hostapd." .. self.ifname
conn:call(endpoint, "wnm_disassoc_imminent", {
addr = sta.addr,
duration = 120,
abridged = true,
})
inf("%s: disconnected %s", self.ifname, tostring(sta))
end
TO THIS:
function Device:disconnect_sta(sta)
local endpoint = "hostapd." .. self.ifname
conn:call(endpoint, "del_client", {
addr = sta.addr,
reason = 1,
deauth = true,
ban_time = 120000,
})
inf("%s: disconnected %s", self.ifname, tostring(sta))
end
The text was updated successfully, but these errors were encountered: