802.11k Neighbor report daemon

The 802.11k standard specifies how the neighboring BSS' could report each other to a STA. OpenWRT's hostapd supports this feature, but the synchronization has to be done in a separate daemon such as this one.

It is more lightweight than DAWN (many thanks to Polynomdivision), basically it is based on this script How does rrm work? - #60 by ParanoidZoid although it is improved a bit so the neighbor report would include the other band interface for the same AP and some more fixes.

Tested on 20.02rc2 with 22 different AC1750. Using 802.11r configured roam over the air, and disabled the bss transition bit on the network it works like a charm. Walking with my 2,4GHz only phone wifiman show roaming well. My Arch based dual band laptop works even better. Cannot even notice that walking along the corridor my BSS changes nearly every second step.

I've plans to make a package from it and make it published as an ipk. I'll also add a sample config file for /etc/config/wireless so the whole test setup could be reconstructed.

Update: I've missed the github link: https://github.com/simonyiszk/openwrt-rrm-nr-distributor

9 Likes

This is pretty awesome, thanks!

I have it running across 4 AP's and it seems to handle the transition pretty smoothly. I noticed your repo lacks a sample wireless config, so I'm pasting the relevant bits from mine should anyone else want to give this a go.

For starters, each AP is configured as a "Dumb AP" according to the docs. I have also installed the following:

wpad-wolfssl
umdns
libseccomp
scmp_sys_resolver
iwinfo

To get umdns working, I configured /etc/config/umdns for my network:

config umdns
  option jail 1
  list network lan

I also had to comment out the seccomp line in /etc/init.d/umdns as described here.

For /etc/config/wireless, I set up 802.11r by adding the below to the wifi-iface section for my SSID:

option ieee80311r ‘1’
option ft_over_ds ‘0'
option ft_psk_generate_local ‘1’

I then set up 802.11k and 802.11v (steering) as follows:

option ieee80211k '1'
option ieee80211v '1'
option wnm_sleep_mode '1'
option bss_transition '0'
option time_advertisement '2'
option time_zone 'CST+6CDT,M3.2.0/2,M11.1.0/2'

My time zone is explicitly specified so as to appear in the beacons although I've read in some threads this isn't necessary and would be handled automatically by hostapd. For that matter, I've read that 802.11v isn't required anymore either, but I've left it in anyway.

I've also disabled bss_transition and set FT to over-the-air as you indicated in your README.

Finally, I copied your rrm_nr scripts and started them up. This was running the latest rc4 of the 21.02 release.

This appears to be working, but aside from seeing FT skipping the handshake in the logs and my client roaming from one AP to the other as I walk about the space, I haven't done much else to prove it's working as designed.

2 Likes

Your seems to be right. I've updated the repo with my config file. (I've just recognized that the nasid is the same for the 2.4 GHz and the 5 GHz radio. I'm a bit uncertain if its good this way.)

Fixing umdns startap's seccomp section is also an issue in my devices.

As far as I know bss_transition should be disabled, since this package doesn't actively suggest roaming for the STAs.

For testing you can try ubus call hostapd.wlan0 rrm_nr_list. If it shows your other BSSes, than the daemon is working. You could try wifiman from Ubiquiti for eg. to test this on your android STA. Just connect to your AP at 2.4 GHz, and if the 5 GHz shows up immediately in the BSS list for the SSID, everything is okay. Getting the traffic with a laptop in monitoring mode and wireshark could also show what is in the air. The edge of this project is hostapd's nr_list. Capturing management traffic from the AP itself should also work.

1 Like

It's a pretty old post, but have to say it's working great on my latest SNAPSHOT !
Thanks

@kissadamfkut This is a really slick tool! Thanks for putting it out there for others :slight_smile:

I gave it a try yesterday and unfortunately hit an issue with the TXT record length given the number of SSIDs in my environment (details in the PR). So, I put together a PR with tested code that resolves this issue for me. Hopefully it can help others, too:

The updated format I'm proposing looks like this:

root@AP:~# ubus call umdns browse '{ "service": "_rrm_nr._udp", "array": true }'
{
	"_rrm_nr._udp": {
		"AP-LivingRoom": {
			"iface": "br-lan.1",
			"ipv4": [
				"192.168.xx.xx"
			],
			"ipv6": [
				"fe80::ea9f:80ff:fef0:6886",
				"2600:1700:994::x"
			],
			"port": 5247,
			"txt": [
				"Z9_example=[ \"e8:9f:80:xx:yy:zz\", \"Z9_example\", \"e89f80xxyyzze.......................\" ]",
				"Z99_example=[ \"ea:9f:80:xx:yy:zz\", \"Z99_example\", \"ea9f80xxyyzze.......................\" ]",
				"Z7_3_example=[ \"ee:9f:80:xx:yy:zz\", \"Z7_3_example\", \"ee9f80xxyyzze.......................\" ]",
				"Z9_3_example=[ \"e2:9f:80:xx:yy:zz\", \"Z9_3_example\", \"e29f80xxyyzze.......................\" ]",
				"Z9_example=[ \"e8:9f:80:xx:yy:zz\", \"Z9_example\", \"e89f80xxyyzze.......................\" ]",
				"Z7_3_example=[ \"ea:9f:80:xx:yy:zz\", \"Z7_3_example\", \"ea9f80xxyyzze.......................\" ]",
				"Z9_3_example=[ \"ee:9f:80:xx:yy:zz\", \"Z9_3_example\", \"ee9f80xxyyzze.......................\" ]"
			]
		},
		"AP-Office": {
			"iface": "br-lan.1",
			"ipv4": [
				"192.168.xx.xx"
			],
			"ipv6": [
				"2600:1700:994::x",
				"fe80::ea9f:80ff:fe50:5ca8"
			],
			"port": 5247,
			"txt": [
				"Z7_example=[ \"e8:9f:80:xx:yy:zz\", \"Z7_example\", \"e89f80xxyyzze.......................\" ]",
				"Z9_example=[ \"ea:9f:80:xx:yy:zz\", \"Z9_example\", \"ea9f80xxyyzze.......................\" ]",
				"Z99_example=[ \"ee:9f:80:xx:yy:zz\", \"Z99_example\", \"ee9f80xxyyzze.......................\" ]",
				"Z9_3_example=[ \"e2:9f:80:xx:yy:zz\", \"Z9_3_example\", \"e29f80xxyyzze.......................\" ]",
				"Z7_example=[ \"e8:9f:80:xx:yy:zz\", \"Z7_example\", \"e89f80xxyyzze.......................\" ]",
				"Z9_example=[ \"ea:9f:80:xx:yy:zz\", \"Z9_example\", \"ea9f80xxyyzze.......................\" ]",
				"Z9_3_example=[ \"ee:9f:80:xx:yy:zz\", \"Z9_3_example\", \"ee9f80xxyyzze.......................\" ]"
			]
		}
	}
}

A secondary benefit to the proposed updates is that I switched to using a '+' as the delimiter instead of '|'. Therefore the previous known issue around not being able to use '|' in SSID names is resolved.

Thank you for the PR, just accepted it! Hope this daemon will serve well.

1 Like

Sure thing! I'm excited to have stumbled on this thread and your project because I have been trying to find a good way to dynamically populate my WAP neighbors without using Dawn or Usteer. Very nice work!

FYI, I started another thread around umDNS and the hope that the latest commits in the mdnsd project get pulled into the OpenWrt branches soon. For anybody interested: Query, Fetch, and Browse with umDNS

If the latest commits get pulled in soon, the patch I included in the PR can be dropped. :+1:t2:

1 Like

I created another PR and welcome your review and testing of it prior to acceptance. It's a concept that came to mind as I was reviewing the code originally. Feel free to decline it if you feel it's not the right direction for your tool :slight_smile:

UPDATE I am rethinking parts of this PR, so I have placed it in Draft for now.

This is a new PR that incorporates a few of the ready-to-go updates from PR#6. While I am mulling over that PR, I wanted to go ahead and bring forward some painless fixes:

So if i am correct, the current version does not work as umdns is not up to date in current snapshot?

Correct, you can either pull this commit and use the present version of umDNS or pull the latest commit and use the patch file to update umDNS to HEAD for a snapshot build.

Thanks for all the work :+1: Will try this soon on my AP's.

This is very useful information in the Readme when mentioning umdns. For new people reading this thread, this is the doc for umdns https://openwrt.org/docs/guide-developer/mdns

Is this still something we need to do in 2023?

And I saw that they have updated umdns to latest version in Main. So I believe we just need to copy bin and initscript, install and configure umdns?