Skip to content

gluon-core: distribute dualband radios #1606

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

Merged
merged 1 commit into from
Dec 29, 2018

Conversation

blocktrron
Copy link
Member

@blocktrron blocktrron commented Dec 27, 2018

This commit distributes dualband radios evenly on 2.4 GHz and 5GHz with 2.4 GHz being prioritised higher than 5 GHz.

This means in case a device has only a single radio and this radio supports operation in both bands, it will be set to 2.4 GHz.

#1604 depends on this PR

  • Tested on a single-radio dualband device (AVM FRITZ!WLAN Repeater 300E)
  • Tested on a dual-radio dualband device (OCEDO Panda)
  • Tested on a single-radio singleband device (vocore2)
  • Tested on a dual-radio singleband device (OCEDO Koala)

@rotanid rotanid added the 0. type: enhancement The changeset is an enhancement label Dec 27, 2018
@rotanid
Copy link
Member

rotanid commented Dec 27, 2018

i just tested a single-band 2.4GHz device (vocore2) and your changes didn't have any effect (so like it should be)
i did a clean flash and the wifi worked like before.

@blocktrron blocktrron force-pushed the pr-dualband-wifi branch 3 times, most recently from 8153e22 to 43b6d64 Compare December 28, 2018 14:17
@blocktrron
Copy link
Member Author

blocktrron commented Dec 28, 2018

I moved the band distribution to the initial setup. This way, the band selection is only done on first bootup, allowing a user to change the frequency band of the radio themselves afterwards.

Also fixed a bug which caused ac radios not to be detected as 5GHz.

This commit distributes dualband radios evenly on 2.4 GHz and 5GHz with
2.4 GHz being prioritised higher than 5 GHz. This means in case a device
has only a single radio and this radio supports operation in both bands,
it will be set to 2.4 GHz.

Tested-by: Martin Weinelt <martin@darmstadt.freifunk.net>
Signed-off-by: David Bauer <mail@david-bauer.net>
-- Dualband - do nothing in this step
elseif hwmodes.g then
-- 2.4 GHz
radio_band_count["band24"] = radio_band_count["band24"] + 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, we could use this code and clean up legacy hwmode values '11ng' and '11na' (that we have to handle in multiple places otherwise). How about using the strings '11n' and '11a' as map keys in radio_band_count - the increment + uci:set could be refactored into a local function that way, where only radio_name and one of these two strings need to be passed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, or not. At least when guarded by if not sysconfig.gluon_version then, this will obviously not help with upgrading legacy configurations...

@rotanid rotanid merged commit 888cddb into freifunk-gluon:master Dec 29, 2018
@blocktrron blocktrron deleted the pr-dualband-wifi branch December 29, 2018 21:58
blocktrron added a commit to blocktrron/gluon that referenced this pull request Jan 18, 2019
This commit distributes dualband radios evenly on 2.4 GHz and 5GHz with
2.4 GHz being prioritised higher than 5 GHz. This means in case a device
has only a single radio and this radio supports operation in both bands,
it will be set to 2.4 GHz.

Tested-by: Martin Weinelt <martin@darmstadt.freifunk.net>
Signed-off-by: David Bauer <mail@david-bauer.net>
mweinelt pushed a commit that referenced this pull request Feb 4, 2019
This commit distributes dualband radios evenly on 2.4 GHz and 5GHz with
2.4 GHz being prioritised higher than 5 GHz. This means in case a device
has only a single radio and this radio supports operation in both bands,
it will be set to 2.4 GHz.

Tested-by: Martin Weinelt <martin@darmstadt.freifunk.net>
Signed-off-by: David Bauer <mail@david-bauer.net>
christf pushed a commit to christf/gluon that referenced this pull request May 23, 2019
This commit distributes dualband radios evenly on 2.4 GHz and 5GHz with
2.4 GHz being prioritised higher than 5 GHz. This means in case a device
has only a single radio and this radio supports operation in both bands,
it will be set to 2.4 GHz.

Tested-by: Martin Weinelt <martin@darmstadt.freifunk.net>
Signed-off-by: David Bauer <mail@david-bauer.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. type: enhancement The changeset is an enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants