-
Notifications
You must be signed in to change notification settings - Fork 66
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
datastorage/uci/msghandler/ubus: add steering with beacon reports #126
base: master
Are you sure you want to change the base?
Conversation
src/storage/datastorage.c
Outdated
@@ -426,8 +426,21 @@ int eval_probe_metric(struct probe_entry_s* probe_entry, ap* ap_entry) { | |||
// TODO: Should RCPI be used here as well? | |||
// TODO: Should this be more scaled? Should -63dB on current and -77dB on other both score 0 if low / high are -80db and -60dB? | |||
// TODO: That then lets device capabilites dominate score - making them more important than RSSI difference of 14dB. | |||
score += (probe_entry->signal >= dawn_metric.rssi_val) ? dawn_metric.rssi : 0; | |||
score += (probe_entry->signal <= dawn_metric.low_rssi_val) ? dawn_metric.low_rssi : 0; | |||
if (probe_entry->rsni != -1) // -1 currently magic number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you mean probe_entry->rcpi
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah thanks.
The AP periodically asks all clients in the environment with what signal strength they see the other APs. Instead of the RSSI, which can only be collected if the client scans, the 802.11k values are much more up-to-date. In the future it will no longer be necessary to exchange all probe request frames with all APs, which will significantly reduce the message overhead and complexity. Right now there is the issue that clients react very strangely to becaon requests or they do not react at all. The client will hopefully report back the RCPI or the RSNI. Theoretically the values can be converted into each other and so compared, but this did not work well in self-experiments. Therefore, we compare the values like the rssi. We introduce - rcpi: value that is added to the AP score if rcpi is above rcpi_val - rcpi_val: threshold that indicates a good rcpi value (between 0 and 255) - low_rcpi: value that is added to the AP score if rcpi is under low_rcpi_val (use a negative value) - low_rcpi_val: threshold that indicates a bad rcpi value (between 0 and 255) - rsni: value that is added to the AP score if rsni is above rsni_val - rsni_val: threshold that indicates a good rsni value (between 0 and 255) - low_rsni: value that is added to the AP score if rsni is under low_rsni_val (use a negative value) - low_rsni_val: threshold that indicates a bad rsni value (between 0 and 255) I have to find out values for each parameter myself. So please take a look at the dawn-hearingmap and if you have a good setting, you can send it to me.
dae4971
to
05565ae
Compare
On that note, I stumbled across this today while messing with an AX200... It sounds like a Technicolor engineer is having some problems with inverted RCPI values on some Intel clients? 🤔 So I tried some beacon reports from my AX200... Normal signal:
Antennas removed: (Well, can't exactly just move it further away, it's deployed in a desktop...)
RSNI is stuck at 255 as well, do we need to do something about that too? |
Could u give me a hearing map entry? |
Odd, can't get the Intel client to reply to a beacon request anymore. Maybe they disabled it in that driver update that went out recently... However, I found another client that would report 255 RSNI though, another router connected as a WDS client. (A Xiaomi MiWifi Mini w/ a MT7612E)
It's not all clients though (at least the ones that reply to beacon requests), as I can get my phone to return a proper RSNI value.
Every other client is -1/-1 because I don't have regular beacon reports enabled in DAWN. |
Ah, 255 RSNI isn't anything faulty it seems. The 802.11k spec dictates:
So yeah that'll need to be handled similar to -1 The question remains: What does one do when those broken Intel clients report inverted RCPI? Do a delta with the signal in the neighbour report or just assume that it's right and wait for the vendor to fix it? |
In case you need more datapoints. This is one of my clients:
APs are Archer C7 and Client is a Sony Experia phone. I have also seen this client report 4 or 5 APs. |
@cotequeiroz That some PR I did to compare RCPI, RSNI and RSSI. However, I'm unsure if that is a good option. |
I'll slowly get to it when able. |
I've encountered some troublesome data from the few clients that responded with RCPI/RSNI. For example:
These are from different clients. Apparently the meaning of what is a strong signal is vendor-dependent, which makes it hard to come up with what is considered a good or bad RCPI. Another problem is that a client may not have responded with RSNI/RCPI to one AP, but did with others, which, at least here, is most of the time. Then we better have a good metric correspondence between them. For this PR. to simplify the config options, I would rename and combine the high & low signal score variables into if (probe_entry->rcpi > 0)
{
score += probe_entry->rcpi >= dawn_metric.high_rcpi_val ? dawn_metric.strong_signal_score : 0;
score += probe_entry->rcpi <= dawn_metric.low_rcpi_val ? dawn_metric.weak_signal_score : 0;
}
else if (probe_entry->rsni > 0 && probe_entry->rsni != 255)
{
score += probe_entry->rsni >= dawn_metric.high_rcpi_val ? dawn_metric.strong_signal_score : 0;
score += probe_entry->rsni <= dawn_metric.low_rsni_val ? dawn_metric.weak_signal_score : 0;
}
else
{
score += probe_entry->signal >= dawn_metric.high_rssi_val ? dawn_metric.strong_signal_score : 0;
score += probe_entry->signal <= dawn_metric.low_rssi_val ? dawn_metric.weak_signal_score : 0;
} |
There is some formula that explains the relationship between all. I have to look into the 802.11 standard again. |
I'm not so sure the different manufacturers get that right. These are actual data I've just measured--and I won't get as many different devices for a while now. I've score them with the current defaults, including the ones recommended above (150 for RCPI & RSNI).
Notice that client Of course, the bad data may have come from the RSSI, not RCPI, I won't know. In any case, that's the data available at that moment, to make a decision. It illustrates the difficulty in finding a single appropriate value. |
Do your clients support
BUT, I have to look into my code again! I'm unsure what happens if now AP1 gets the beacon report back and is signaling the information back to AP2. I have to test this case, could be some failure case. |
Yep. Also think that different manufactures handle that differently...
I have only 1. But I'm working in some community mesh project and maybe I can also collect some information about client capabilities. I also wrote some lua exporter for this case.
Yep the algorithm is bullshit. I should only consider one metric. :D I won't merge the PR. I will also have a closer look into 802.11.k |
Those measurements I've sent were already using active scans, with |
I had some local work where I was looking at a more N-dimensional approach to selecting a better AP. For each thing that can be different give it a value where equal values are equally beneficial (which means some magic number weighting of various factors). Get the positive difference for all these values between current and candidate AP, square them, sum and square-root. Only use positive difference since the negativity of negative values disappers when squared / rooted. I was also looking at using just one of RCPI / RSSI which a client has told both AP to avoid any flaky conversions. Could fall back to conversion if it tells one AP only RSSI and the other only RCPI. I'm hoping to get a lot deeper into OpenWRT and DAWN over Christmas, so will see if I get to these topics. |
The AP periodically asks all clients in the environment with what signal strength they see the other APs. Instead of the RSSI, which can only be collected if the client scans, the 802.11k values are much more up-to-date.
In the future it will no longer be necessary to exchange all probe request frames with all APs, which will significantly reduce the message overhead and complexity.
Right now there is the issue that clients react very strangely to becaon requests or they do not react at all.
The client will hopefully report back the RCPI or the RSNI.
Theoretically the values can be converted into each other and so compared, but this did not work well in self-experiments. Therefore, we compare the values like the rssi.
We introduce
I have to find out values for each parameter myself. So please take a look at the dawn-hearingmap and if you have a good setting, you can send it to me.
It is necessary that u add those values to the config file!
Here is an example, but I have no idea if those values are okay!