Any idea how to interpret the data returned by the beacon reports? I have no idea how to pull some sort of RSSI out of there and force a roam via bss-tm to the best AP.
I got pretty much everything working, except for that.
I am using hostapd_cli for what its worth, but when i specify multiple neighbor= parameters the client will always just roam to the first one I provide. Even if its clearly a weaker signal.
I'd like to just know if it does the job automatically once I set beacon_requests=1 or do I need to do something else like the umdns script in the previous posts in this thread.
For ath10k-ct-htt, it was key that I set duration to 100 and mode to 0 for the report to be generated.
EDIT2:
My iPhone 11 Pro creates more detailed beacon reports and supports active/passive beacons. I don't want to post the hex output since using a Hex2ASCII converter shows my SSID and RegDomain settings.
Yes, the AP sends an action rame to the client to initiate the beacon report request. Currently you have to manually specify a client that you'll receive reports from.
It responds with a hex string. Depending on the distance from the router, the hex string may or may not get cut off. When the SNR is low, the client produces a long hex string, which when converted to ASCII contains details on SSID and regdomain. However the rest of the message is garbled.
But you have to subscribe to notifications! Then the hex string will be automatically formated into a json object that gives you all information you need.
@ParanoidZoid, @kaputorwon: Please indicate on Github, that you tested the PR.
I have yet to test your patch since my build is not ready yet. It's very interesting. I appreciate your great work!
I would like to know how AP collects neighboring AP prior to sending neighboring report down to client. Where does AP keep the AP lists?
My intention is to exercise 11k protocol by itself. We have two RM capabilities in the beacon to enable through ubus call hostapd.wlan0 bss_mgmt_enable '{"neighbor_report":True, "beacon_report":True}'. I just wanted to find out how an AP collects neighbor AP list. My query is if AP collects neighbor ap list by scanning or by sending action frame to client and client responds with it's scan results. I am not attempting to do client guided roaming. Thanks.
I have no plan to do any coding at the moment as regards to rrm feature. I'm just curious to see whether there is any of 802.11k feature/protocol in place in the OpenWrt. Anyway I appreciate your contribution!
#!/bin/sh /etc/rc.common
START=90
USE_PROCD=1
radios=$(ubus list | grep hostapd.wlan)
start_service() {
local rrm_own
OIFS=$IFS
IFS=$'\n'
for value in ${radios}
do
rrm_own=${rrm_own}",$(ubus call ${value} rrm_nr_get_own | jsonfilter -e '$.value')"
done
IFS=$OIFS
procd_open_instance
procd_set_param command /bin/sh "/usr/bin/rrm"
procd_add_mdns "rrm" "udp" "" "${rrm_own:1}"
procd_close_instance
}
service_triggers()
{
procd_add_reload_trigger wireless
}
In /usr/bin/rrm
#!/bin/sh
radios=$(ubus list | grep hostapd.wlan)
_discover_neighbors() {
local rrm_neighbors
ubus call umdns update
sleep 2
rrm_neighbors=$(ubus call umdns browse | jsonfilter -e '@["_rrm._udp"][*].txt')
for value in ${rrm_neighbors}
do
rrm_nr_lists=${rrm_nr_lists}",${value}"
done
}
_append_own() {
for value in ${radios}
do
rrm_nr_lists=${rrm_nr_lists}",$(ubus call ${value} rrm_nr_get_own | jsonfilter -e '$.value')"
done
}
while true
do
OIFS=$IFS
IFS=$'\n'
rrm_nr_lists=""
_discover_neighbors
_append_own
for value in ${radios}
do
ubus call ${value} bss_mgmt_enable '{"neighbor_report": true}'
eval "ubus call ${value} rrm_nr_set '{ \"list\": [ ${rrm_nr_lists:1} ] }'"
done
sleep 60
IFS=$OIFS
done
exit 0
These scripts would probably fare better if they were (1) integrated as easily as 802.11r is now enabled via mac80211.sh and (2) lives as a hotplud.d script watching the wlan0/wlan1 interface(s). Right now, I don't really have the time to figure this out myself and this script from @sotux and @muddyfeet does what it needs to do albeit a few caveats if something is shut down/rebooted.
I'm playing with the ubus commands to see how my devices respond to manual instructions. I'm finding that one of the APs is missing the wnm_disassoc_imminent method from ubus -v list hostapd.wlan0-1.
/tmp/run/hostapd-phy0.conf look very similar on each device, and both have disassoc_low_ack=1
Can anyone give me a clue if that is a hardware, driver, configuration or perhaps package snag?
In case it helps, the one without the method is running ath79/tiny DTS style, the one with it is ar71xx/nand.
EDIT: Looks like this may depend on hostapd and / or other things being compiled with CONFIG_WNM_AP defined...