LEDE/OpenWRT — Changing Beacon Interval
While the changing the beacon interval is not something recommended for all setups, there are some good specific use cases.
In this guide we are going to show you how changing the beacon intervals can help direct clients to a specific interface over another (e.g 5GHz over 2.4GHz), however the steps can be applied to any use case you want.
By increasing the beacon interval for the 2.4GHz interface, we are making it more likely that a device will see the 5GHz beacon and connect to it.
SSH to your LEDE/OpenWRT device
If you are using Windows then start PuTTY and click Session on the left side, select SSH from the options, and then enter in the IP Address of your LEDE/OpenWRT box into the Host Name field.
Once you’ve done this just click on Open to start up the SSH connection.
If you are connecting via terminal, then just SSH to your LEDE/OpenWRT device using the following command, where 192.168.1.1 is your LEDE/OpenWRT device’s IP address.
ssh root@192.168.1.1
Configuration
First we need to access the wireless config file to make changes. So run the following command:
vi /etc/config/wireless
Once this is open, we can find the network you want to change the beacon for. This is relatively simple, just look for the SSID of your network.
In our case, as this is a dual radio device and the network is set to broadcast on both radios, we have two interfaces with our SSID showing.
config 'wifi-iface'
option 'device' 'radio0'
option 'network' 'lan'
option 'mode' 'ap'
option 'ssid' 'StreakyBeacon'
option 'encryption' 'psk2'
option 'key' 'RubSomeBeaconOnIt'config 'wifi-iface'
option 'device' 'radio1'
option 'network' 'lan'
option 'mode' 'ap'
option 'ssid' 'StreakyBeacon'
option 'encryption' 'psk2'
option 'key' 'RubSomeBeaconOnIt'
We can see that the devices in use are radio0
and radio1
so we need to look for the devices by these names. You should find something similar to the below:
config wifi-device 'radio0'
option type 'mac80211'
option channel 'auto'
option country 'GB'
option phy 'phy0'
option hwmode '11g'
option htmode 'HT20'
option txpower '20'
option beacon_int 100
config wifi-device 'radio1'
option type 'mac80211'
option channel 'auto'
option country 'GB'
option phy 'phy1'
option hwmode '11a'
option htmode 'HT20'
option txpower '20'
option beacon_int 100
To tell which one is the 2.4GHz and 5GHz devices, we can compare the hwmode
to the following:
11g
— 2.4GHz11a
— 5GHz
Once you have found the 2.4GHz, we need to add/edit in the following:
option beacon_int 200
For this we are doubling the beacon interval from the default of 100.
Once you’ve adjusted your beacon interval, you should be left with something similar to the below:
config wifi-device 'radio0'
option type 'mac80211'
option channel 'auto'
option country 'GB'
option phy 'phy0'
option hwmode '11g'
option htmode 'HT20'
option txpower '20'
option beacon_int 200
config wifi-device 'radio1'
option type 'mac80211'
option channel 'auto'
option country 'GB'
option phy 'phy1'
option hwmode '11a'
option htmode 'HT20'
option txpower '20'
option beacon_int 100
When you are happy you will need to reboot your device or restart the wireless.
To restart your wireless, run the following:
wifi down
wifi up
Or if you want to reboot the whole device, run this instead:
reboot
If you found this post helpful please let us know by clicking the ♥ below.
This blog was brought to you by Cucumber WiFi. Cucumber helps you run a more efficient WiFi network. Check it out here.
Cucumber WiFi — control any (WiFi) device from the cloud.