Crect
November 9, 2022, 2:07pm
34
@blocktrron @blogic Is it maybe just missing disassociation_timer
here ?
I tried to send the bss_transition_request
directly from the cli on ubus and found that none of my devices will switch to another ap / band if it is 0 (the default), they basically won't do anything at all, while all of them will if it is greater than 0.
In DAWN there is a default value for it so that could explain why DAWN is working better (or at all) as some users also reported here.
.set_hostapd_nr = 0,
// CONFIG-G: disassoc_nr_length|Number of entries to include in a 802.11v DISASSOCIATE Neighbor Report|[6] (Documented for use by iOS)
.disassoc_nr_length = 6,
// CONFIG-G: max_station_diff|Number of connected stations to consider "better" for use_station_count|[1]
.max_station_diff = 1,
// CONFIG-G: bandwidth_threshold|Maximum reported AP-client bandwidth permitted when kicking. Set to zero to disable the check.|[6] (Mbits/s)
.bandwidth_threshold = 6,
// CONFIG-G: chan_util_avg_period|Number of sampling periods to average channel utilization values over|[3]
.chan_util_avg_period = 3,
// CONFIG-G: duration|802.11k BEACON request DURATION parameter|[0]
.duration = 150,
// CONFIG-G: rrm_mode|Preferred order for using Passive, Active or Table 802.11k BEACON information|[PAT] String of 'P', 'A' and / or 'T'
.rrm_mode_mask = WLAN_RRM_CAPS_BEACON_REPORT_PASSIVE |
WLAN_RRM_CAPS_BEACON_REPORT_ACTIVE |
WLAN_RRM_CAPS_BEACON_REPORT_TABLE,
.rrm_mode_order = { WLAN_RRM_CAPS_BEACON_REPORT_PASSIVE,
WLAN_RRM_CAPS_BEACON_REPORT_ACTIVE,
WLAN_RRM_CAPS_BEACON_REPORT_TABLE },
// CONFIG-B: ap_weight|Per AP weighting|[0] (Deprecated)
.ap_weight = { 0, 0 },
// CONFIG-B: ht_support|Score increment if HT is supported|[5]
int bss_transition_request(uint32_t id, const struct dawn_mac client_addr, struct kicking_nr* neighbor_list, uint32_t duration) {
struct hostapd_sock_entry* sub;
struct blob_buf b = { 0 };
dawnlog_debug_func("Entering...");
blob_buf_init(&b, 0);
dawn_regmem(&b);
blobmsg_add_macaddr(&b, "addr", client_addr);
blobmsg_add_u32(&b, "disassociation_timer", duration);
blobmsg_add_u32(&b, "validity_period", duration);
blobmsg_add_u8(&b, "abridged", 1); // prefer aps in neighborlist
blobmsg_add_u8(&b, "disassociation_imminent", 0); // Just a friendly request - no disassociation
void* nbs = blobmsg_open_array(&b, "neighbors");
// Add the first N AP
int neighbors_added = 0;
while (neighbors_added < dawn_metric.disassoc_nr_length && neighbor_list != NULL) {
dawnlog_info("BSS TRANSITION NEIGHBOR " NR_MACSTR "\n", NR_MAC2STR(neighbor_list->nr_ap->neighbor_report));
3 Likes