Hi, I'll summarize what I got working so far:
Working:
-
Populate the 802.11k neighbor list with possible roam locations (both 2.4 and 5ghz bands). Note: So on a single router, dual adapter setup each adapter should have a neighbor list that contains 2 neighbors. It self, and the opposite band.
-
Be close enough to the AP where a connection to the 5ghz band will be possible.
-
Use the hostapd_cli command in the original post to tell the client to roam to "any AP in the 802.11k neighbor list EXCEPT FOR ____ (notice the minus in front of the neighbor= mac)".
This way the device will roam from 2.4 to 5. Works the other way too, 5 to 2.4.
Working:
- For 5 to 2.4ghz, use the hostapd_cli command to specify a specific AP (neighbor=MAC,OP_CLASS,CHANNEL,PHY_TYPE) to roam to. Note, so in this case you will be specifying a 2.4ghz AP (OP_CLASS=81, PHY_TYPE=7).
Not Working:
- For 5ghz, use the hostapd_cli command to specify a specific AP (neighbor=MAC,OP_CLASS,CHANNEL,PHY_TYPE) to roam to. Note, this is probably because there is an issue wit the OP_CLASS / PHY_TYPE. I pulled those from a post here:
(OP_CLASS=122, PHY_TYPE=9).
But in my case, the client device does not respond to the roam beacon at all when doing 2.4 to 5. I checked this by running hostapd with the -dd flags and watching the output. When done successfully hostapd will report (among the huge stream of debug info) that the roam request was successful. When I try it with 2.4 to 5ghz, the client doesn't respond to the roam request at all. Silence. Stays connected as is.
Things I have noticed
I got my script banged out for the most part last night, and I noticed a few things.
a) RSSI is a so-so indicator to determine how far the device is from the AP. When the device is in sleep mode (my S7 Edge for example), after a few seconds the wifi will sleep for 10-15 seconds so the RSSI will remain static (for example, -50, right next to my router) even though I have walked away from the AP. Once again, not a wifi internals expert here but I believe there is a way to send a beacon via hostapd and get the client to update their state. ( req_beacon [req_mode=] = send a Beacon report request to a station ). I will look into this later on.
b) The client device (once again, S7 edge in my case) does not like being asked to roam TOO often. Running the hostapd_cli command too many times in sequence causes my S7 to disconnect and switch to LTE.
c) Important, both of the above ONLY APPLY to a sleeping (screen off) device. Screen on? RSSI is updated every second and I can fire off as many roam requests as I wish and the device remains connected.
d) For now what I have up and running... And I understand people want to steer 2.4 to 5ghz, so its not quite that... But what I have setup and running via 2 scripts (one running on the OpenWRT in the living room, one running on my Hytsou H5 mini PC upstairs) is basically when RSSI reaches 70 or less, trigger a roam. For my use case this is perfect. I am able to watch my baby monitor now without any hicups. I get to the bottom of the stairs and RSSI will hit over 70, it'll trigger a roam, and connect to our living room AP. All transparently, without any stop in video or having to restart the (slightly buggy) baby monitor app.
I'm going to figure out the syntax for the "steer to a specific neighbor" and will post here... Thats pretty much the missing piece...
If anyone knows this please post
Also if anyone knows how to use hostapd_cli to send a beacon to the client device (and get an updated RSSI in return) please post