Dawn: a decentralized wireless controller

Could some check my steps I have done to set dawn up?

Maybe someone will also be confused by those two different instructions in wiki and github readme.
Or someone from the wiki and github can add missing steps.

  1. Set up two Wireless Networks with same SSID and same Password. One in 5GHz and one in 2,4 GHz radio.
  2. Connect through SSH to OpenWrt
  3. Remove wpad completely
#opkg list-installed | grep wpad
wpad-basic-wolfssl
#opkg remove wpad-basic-wolfssl
  1. Install wpad-wolfssl (no need to install wpad alone if you have wpad-wolfssl)
    #opkg update & opkg install wpad-wolfssl
  2. Add settings to WiFi Networks (#new)
    #vi /etc/config/wireless
    New wireless config:
config wifi-device 'radio0'
        option type 'mac80211'
        option path 'pci0000:00/0000:00:00.0'
        option band '5g'
        option htmode 'VHT40'
        option channel '108'
        option cell_density '0'
        option country 'DE'

config wifi-device 'radio1'
        option type 'mac80211'
        option path 'platform/ahb/18100000.wmac'
        option band '2g'
        option htmode 'HT20'
        option channel '10'
        option cell_density '0'
        option country 'DE'

config wifi-iface 'wifinet0'
        option device 'radio0'
        option mode 'ap'
        option ssid 'MyWiFiSsid'
        option encryption 'psk-mixed'
        option key 'MyWifiPassword'
        option ft_psk_generate_local '1'
        option network 'lan'
      option bss_transition '1'		#new
      option wnm_sleep_mode '1'		#new
      option time_advertisement '2'	#new
      option time_zone 'GMT0'		#new
      option ieee80211k '1'			#new
      option rrm_neighbor_report '1'#new
      option rrm_beacon_report '1'	#new

config wifi-iface 'wifinet1'
        option device 'radio1'
        option mode 'ap'
        option ssid 'MyWiFiSsid'
        option encryption 'psk-mixed'
        option key 'MyWifiPassword'
        option ft_psk_generate_local '1'
        option network 'lan'	
      option bss_transition '1'		#new
      option wnm_sleep_mode '1'		#new
      option time_advertisement '2'	#new
      option time_zone 'GMT0'		#new
      option ieee80211k '1'			#new
      option rrm_neighbor_report '1'#new
      option rrm_beacon_report '1'	#new
  1. Install dawn
#opkg update && opkg install dawn
#/etc/init.d/umdns restart
  1. Config dawn:
#cp /etc/config/dawn /etc/config/dawn.old -p
#vi /etc/config/dawn

Changed option broadcast_ip the ip to my subnets IP (#change1) and option duration from 0 toi 100 (#change2)
and deleted all 'config metric' and 'config times' sections (#deleted).
New dawn config:

config local
        option loglevel '0'

config network
        option broadcast_ip '192.168.0.255' #change1
        option broadcast_port '1025'
        option tcp_port '1026'
        option network_option '2'
        option shared_key 'Niiiiiiiiiiiiick'
        option iv 'Niiiiiiiiiiiiick'
        option use_symm_enc '0'
        option collision_domain '-1'
        option bandwidth '-1'

config hostapd
        option hostapd_dir '/var/run/hostapd'

#deleted config times section 

config metric 'global'
        option min_probe_count '3'
        option bandwidth_threshold '6'
        option use_station_count '0'
        option max_station_diff '1'
        option eval_probe_req '0'
        option eval_auth_req '0'
        option eval_assoc_req '0'
        option kicking '3'
        option kicking_threshold '20'
        option deny_auth_reason '1'
        option deny_assoc_reason '17'
        option min_number_to_kick '3'
        option chan_util_avg_period '3'
        option set_hostapd_nr '0'
        option duration '100' #change2
        option rrm_mode 'pat'

#deleted config metric '802_11g' section
#deleted config metric '802_11a' section
  1. Restart dawn and install Dawn for Luci
#/etc/init.d/dawn restart
#opkg install luci-app-dawn
  1. Reboot
    #reboot

Please set to something non zero : 100 for example
otherwise bss_transition_request will not work

You mean in config metric 'global'?
That is original. Ok, I will change my configuration (and my post) to
option duration '100'

Thank you! Anything else?

Another Question. What about
option time_zone 'GMT0'
in WiFi Config? Must I change this to the TimeZone of my Router (which I have left on UTC as default) or to my Smartphone Device (Which is GMT+1)?

Hi @PolynomialDivision

Wondering if there’s a chance/any plans to show love/enhance to the luci-app?

Believe it or not it is probably the second most visited page on my setup (after summary). So quite useful.

The main things/wish lists:

  • Showing device names instead/in addition to MAC. This would be extremely useful.
  • Formatting/UI; Specifically on mobile as its currently really a mess there.
  • If possible, capabilities of the clients (eg 802.11r/v/etc)
1 Like

I'm curious why you removed the 802_11a/g sections in the dawn config?

This is the current settings that I'm using and they are working fairly well:

config metric '802_11g'
        option initial_score '10' #changed
        option ht_support '0' #changed
        option vht_support '0' #changed
        option no_ht_support '0'
        option no_vht_support '0'
        option rssi '0' #changed
        option rssi_val '-60'
        option low_rssi_val '-80'
        option low_rssi '-15'
        option chan_util '0'
        option chan_util_val '140'
        option max_chan_util '0'
        option max_chan_util_val '170'
        option rssi_weight '4' #changed
        option rssi_center '-70'

config metric '802_11a'
        option initial_score '100'
        option ht_support '0' #changed
        option vht_support '0' #changed
        option no_ht_support '0'
        option no_vht_support '0'
        option rssi '0' #changed
        option rssi_val '-60'
        option low_rssi_val '-80'
        option low_rssi '-15'
        option chan_util '0'
        option chan_util_val '140'
        option max_chan_util '0'
        option max_chan_util_val '170'
        option rssi_weight '4' #changed
        option rssi_center '-70'

My reasoning for each change:

  1. I removed the ht_support/vht_support from 5 to 0 because that is currently broken between access points
  2. I lowered the 2.4Ghz band starting score to 10, because I want the 5Ghz to be highly preferred
  3. I set the rssi additional score of 15 to 0 so that it would not give the 2.4Ghz band an extra boost in score
  4. I set the rssi weight to 4, so only an rssi difference of 5 will cause a move

That combined with bandwidth_threshold '200', set_hostapd_nr '2', min_number_to_kick '2', kicking '1' under global settings.

For the first time ever, OpenWRT roams all my devices at the drop of a hat! Occasionally I'll find after a device roams around 4 or 5 times, it will stop roaming for a few minutes.

It might also be worth noting that if you are using layer 2 security, such as DAI/DHCP snooping (dynamic arp inspection), you will have to disable 802.11r or it will roam and then not be able to communicate. I'm using DAWN with WiFi routers hooked to an active directory radius server on the backend with dynamic VLAN tagging, and it is working!

4 Likes

I removed it as it is written in the dawn read.me configuration instruction:

vi dawn # Delete all 'config metric' and 'config times' sections

Here to find:
https://github.com/berlin-open-wireless-lab/DAWN/blob/master/CONFIGURE.md#resetting-dawns-configuration

Thats why I was asking this community if the instructions are correct. Because there are two instructions and both have different missing steps.

But to be honest, it works pretty well for me without the metrics part. Never tried if with config metrics.

You are amazing. Tried you configuation and it works instantly! Why are the instructions mentioning to remove just the metrics part? It feels now stupid that I removed it, but the both different instruction are very confusing.

One more question, what do you mean by

How can that be broken? Should I keep it to 5? This is my actual dawn configuration:

config local
        option loglevel '0'

config network
        option broadcast_ip '192.168.11.255' #changed
        option broadcast_port '1025'
        option tcp_port '1026'
        option network_option '2'
        option shared_key 'Niiiiiiiiiiiiick'
        option iv 'Niiiiiiiiiiiiick'
        option use_symm_enc '0'
        option collision_domain '-1'
        option bandwidth '-1'

config hostapd
        option hostapd_dir '/var/run/hostapd'

config times
        option con_timeout '60'
        option update_client '10'
        option remove_client '15'
        option remove_probe '30'
        option remove_ap '460'
        option update_hostapd '10'
        option update_tcp_con '10'
        option update_chan_util '5'
        option update_beacon_reports '20'

config metric 'global'
        option min_probe_count '3'
        option bandwidth_threshold '200' #changed
        option use_station_count '0'
        option max_station_diff '1'
        option eval_probe_req '0'
        option eval_auth_req '0'
        option eval_assoc_req '0'
        option kicking '1' #changed
        option kicking_threshold '20'
        option deny_auth_reason '1'
        option deny_assoc_reason '17'
        option min_number_to_kick '2' #changed
        option chan_util_avg_period '3'
        option set_hostapd_nr '2' #changed
        option duration '0'
        option rrm_mode 'pat'

config metric '802_11g'
        option initial_score '10' #changed
        option ht_support '0' #changed
        option vht_support '0' #changed
        option no_ht_support '0'
        option no_vht_support '0'
        option rssi '0' #changed
        option rssi_val '-60'
        option low_rssi_val '-80'
        option low_rssi '-15'
        option chan_util '0'
        option chan_util_val '140'
        option max_chan_util '0'
        option max_chan_util_val '170'
        option rssi_weight '4' #changed
        option rssi_center '-70'

config metric '802_11a'
        option initial_score '100'
        option ht_support '0' #changed
        option vht_support '0' #changed
        option no_ht_support '0'
        option no_vht_support '0'
        option rssi '0' #changed
        option rssi_val '-60'
        option low_rssi_val '-80'
        option low_rssi '-15'
        option chan_util '0'
        option chan_util_val '140'
        option max_chan_util '0'
        option max_chan_util_val '170'
        option rssi_weight '4' #changed
        option rssi_center '-70'

Best topic ever
I hope Dawn will get more updates and not abandoned...

Few bugs I noticed:
Disappearing AP from Hearing Map
Signal is not correct

Thanks for the developers and all who have hand with this.

i have scoured this thread and have condensed the suggestions to the following uci commands:

uci set dawn.@network[0].broadcast_ip='192.168.1.255'  # modify for your wlan subnet
uci set dawn.802_11g.initial_score='10'
uci set dawn.802_11g.rssi_weight='4'
uci set dawn.802_11g.ht_support='0'
uci set dawn.802_11g.rssi='0'
uci set dawn.global.bandwidth_threshold='200'
uci set dawn.global.set_hostapd_nr='2'
uci set dawn.global.kicking='1'
uci set dawn.global.min_number_to_kick='2'
uci set dawn.global.duration='100'
uci commit dawn
 
/etc/init.d/dawn restart

please correct and amend these commands if i have misrepresented.
thx

Fast Roaming with DAWN is working very well here across 3 AX6S dumb APs and an AX3600 router all running snapshot - with log showing FT for devices that support it (Apple household).

My key wireless config:

Summary
        option dtim_period '1'
        option rsn_preauth '1'
        option max_inactivity '15'
        option encryption 'psk2+ccmp'
        option ieee80211r '1'
        option mobility_domain '1111'
        option reassociation_deadline '20000'
        option ft_over_ds '0'
        option ft_psk_generate_local '1'
        option pmk_r1_push '1'
        option ieee80211k '1'
        option time_advertisement '2'
        option time_zone 'EST5EDT,M3.2.0,M11.1.0'

I stumbled upon rsn_preauth in one specific post and noticed that most documentation seems to leave it out. I have also read that it may be a poor man's roaming for devices lacking support.. Not sure, but every bit helps.

And DAWN config:

Summary
config metric 'global'
        option min_probe_count '3'
        option bandwidth_threshold '6'
        option use_station_count '0'
        option max_station_diff '1'
        option eval_probe_req '0'
        option eval_auth_req '0'
        option eval_assoc_req '0'
        option kicking '1'
        option kicking_threshold '15'
        option deny_auth_reason '1'
        option deny_assoc_reason '17'
        option min_number_to_kick '3'
        option chan_util_avg_period '3'
        option set_hostapd_nr '2'
        option duration '0'
        option rrm_mode 'pat'

config metric '802_11g'
        option initial_score '80'
        option ht_support '5'
        option vht_support '5'
        option no_ht_support '0'
        option no_vht_support '0'
        option rssi '15'
        option rssi_val '-50'
        option low_rssi_val '-60'
        option low_rssi '-15'
        option chan_util '0'
        option chan_util_val '140'
        option max_chan_util '-15'
        option max_chan_util_val '170'
        option rssi_weight '0'
        option rssi_center '-55'

config metric '802_11a'
        option initial_score '100'
        option ht_support '5'
        option vht_support '5'
        option no_ht_support '0'
        option no_vht_support '0'
        option rssi '15'
        option rssi_val '-50'
        option low_rssi_val '-60'
        option low_rssi '-15'
        option chan_util '0'
        option chan_util_val '140'
        option max_chan_util '-15'
        option max_chan_util_val '170'
        option rssi_weight '0'
        option rssi_center '-55'

Given the number of APs, I'ver chosen to go more agressive with my DAWN settings.
In addition, I found that it's important to:

  • Drop the signal strength at each AP as much as possible to help the devices choose to roam
  • Turn off 2.4ghz on most APs except at the 2 furthest points. I did this to help devices choose to get on the 5.4ghz band instead of 2.4ghz which has longer range.
  • Each setup is different, so have to play with signal strength, rssi values in the DAWN config that best suits your case/needs.
4 Likes

Given your mention of being an Apple household, have you considered modifying dtim_period to 3? I believe this is still Apple's recommendation. More details here: https://www.sniffwifi.com/2016/05/go-to-sleep-go-to-sleep-go-to-sleep.html

Also, I have option mbo '1' set on my wifi-ifaces (multiple RT3200 'dumb APs'). I can't remember exactly where I read about enabling it, but the description of it is here: What exactly is MBO for?

Ah! Interesting about mbo…. Will read a bit and likely add that.

In terms of dtim, although most devices are apple, I have a few iot devices. If I recall correctly back when I was running an r7000 on tomato, a couple of the cheap iot devices started acting weird when I raised dtim…

It’s been a while so my memory is foggy on that…. Might try it again. :slight_smile:

Great point, though I can say confidently I have multiple IoT devices as well and haven’t considered the dtim interval with them to-date. Everything has been running smoothly here. But definitely a YMMV situation, no doubt.

Best of luck with any new settings!

Found this commit re mbo... Maybe best to leave as default (or at least turn on knowing) as of "today":

Fri Feb 24 02:39:19 2023 daemon.notice hostapd: wlan2g: BEACON-RESP-RX ac:d6:18:0d:47:4d:3e 04 0000000000000000000000008000000000000000000000000000
Fri Feb 24 02:39:19 2023 daemon.info dawn: Received NULL MAC! Client is strange!

Why it always occuring?

Hello,
I just setup Dawn and followed all the recommended changes to the config file.
I do seem to have a problem with Android devices that are in sleep mode. They are connected to the AP and show in the list of connected devices, however I do get these messages in the log every 5 seconds for each Android device:

Thu Mar  2 22:12:44 2023 daemon.notice hostapd: Beacon request: xx:xx:xx:xx:xx:xx is not connected
Thu Mar  2 22:12:44 2023 daemon.warn dawn: Client / BSSID = xx:xx:xx:xx:xx:xx / yy:yy:yy:yy:yy:yy: BEACON REQUEST failed

Any idea what's going on? I suspect the kicks are not actually sent because hostapd thinks the STA is not authenticated/connected for some reason.
This is on the latest stable with wpad-wolfssl.
Thanks!

My logs are also flooded with this and from what I gathered, this might not be directly related to DAWN but seems to be a bug in the cfg80211 kernel module (driver) related to 802.11r. Some forum threads suggest that it's a regression that happened after OpenWRT 19. Unfortunately, I can't downgrade to verify because my devices (TOTOLINK X5000R) only got support since OpenWRT 21. There's a patch online (not upstream, unfortunately) and rumor has it that it could mitigate the bug.

This is why I'm trying to figure out building OpenWRT from source. I haven't succeeded doing that but here's the details: Daemon.err hostapd: nl80211: kernel reports: key addition failed - is this a problem? - #45 by fodiator.

At least, that's my initial impression, at least. I've been googling so much that I don't remember how I came up with the connection to that forum thread, though. Maybe somebody like @PolynomialDivision would be able to give better pointers...

Note that https://github.com/openwrt/openwrt/issues/7907 (ex. https://bugs.openwrt.org/index.php?do=details&task_id=3159) suggests that it is recommended to set FT Protocol to FT over the air and Reassociation Deadline to 20000, specifically referencing this sleep mode case (though, mentioning iOS, not Android).

I've not really confirmed if this is related to Dawn or 802.11k/v in general, but after some time my (Android) devices just "supposedly" lose internet connectivity. They drop off of WiFi, and attempting to reconnect seems to throw "Connected, no internet access" and then they drop again.

What's odd is that in the short amount of time they are connected, they are able to be pinged, and also themselves seem to be able to ping (and use DNS) addresses.

I'm currently re-trying with 802.11k/v and Dawn disabled. There's nothing obvious in logs. Devices are the Xiaomi R3G and Redmi 2100, so both ramips/mt7621

I'm running self-compiled Snapshots from the same git HEAD on both devices.

I haven't seen anything super obvious on either my OpenWrt devices, nor my Android logs. Just basic auth, DHCP and then disassociation after a few seconds. Only restarting seems to reliably make it work for a bit again

I've been seeing something that feels similar. TOTOLINK X5000R also has ramips/mt7621. One example was an iPad that seemed to have stopped getting the packets through WiFi while still showing it as connected on the device. Also, some DNS-related queries seem to be stuck+timeout from time to time. I wasn't able to track this down. It is happening on 21.03 and I think on 22.03 too.

One of my issues was that the mt76 upstream sets the same mac address for the 5G radio: https://github.com/openwrt/openwrt/issues/8861. This is bad since I had 3 identical APs that advertised 5G network with the same BSSID — according to my googling, this usually causes a lot of problem with AP confusion where one AP authenticates an STA but others send deauth since they also hear traffic addressed to the same BSSID. It was an interesting experience since 2.4G radios with the same SSID have different BSSID, as they should. So I applied https://github.com/openwrt/openwrt/pull/4738 for now, as a workaround.
Still, I'm seeing the bug I described in the previous post too.

Note that I've tried the lastest OpenWRT snapshots while debugging my issues and WiFi seemed much less stable but I haven't checked why.

The logs I've seen don't reveal if the problems I'm seeing are DAWN-related on lower level too...

Doesn't seem to be an issue here - primary router's 2.4 GHz ends with :F2 and 5 GHz ends with :F3, and the AP's with 59 and 5A, so no duplicates

e hmmm: Fix mt76 crash issue, Resolves #763 by Brain2000 · Pull Request #764 · openwrt/mt76 (github.com)