Hi everyone,
I found this script:
https://github.com/barbieri/barbieri-playground/tree/master/openwrt/wifi-disconnect-low-signal
Made by barbieri.
I edited the script that way:
function Device:disconnect_sta(sta)
local endpoint = "hostapd." .. self.ifname
conn:call(endpoint, "bss_transition_request", {
addr = sta.addr,
disassociation_imminent = false,
disassociation_timer = 0,
abridged = 1,
})
inf("%s: disconnected %s", self.ifname, tostring(sta))
end
And its working flawlessly with my OnePlus 9 Pro.
But,
with Redmi Note 7 for example, must add "neighbors" to the bss_transition_request .
if someone can make a code in lua to extract the
ubus call hostapd.wlan0 rrm_nr_list
and add it as array to the code, we could make PERFECT roaming solution for the openWRT community!
I dont know how to programming with lua, but it seems it should be an easy code..
Should be something like:
function Device:disconnect_sta(sta)
local endpoint = "hostapd." .. self.ifname
conn:call(endpoint, "bss_transition_request", {
addr = sta.addr,
disassociation_imminent = false,
disassociation_timer = 0,
validity_period = 30,
abridged = 1,
neighbors = 'Array',
})
inf("%s: disconnected %s", self.ifname, tostring(sta))
end