Use the full power of the radios for your country

If the router is not connecting as far as you would expect, it might be the case that you are not using it in the right country code.

Country code defines how much power is the radio allowed to be used. It is based on the laws of each country.

From factory it comes configured with the most restrictive power country code, to make sure you don’t turn it on with too much power accidentally.

While the developers finish the functionality required to configure this over the UI, you can always go and configure it manually. We would recommend to do this config in the first node you set up, it will get spread over the network with each first boot wizard executed. If not, you will have to change it in each node.

In order to do this change, you need to use a terminal emulator and use the ssh command. It goes like this:

$ ssh root@thisnode.info
root@thisnode.info:~$ uci set lime-community.wifi.country='TZ'
root@thisnode.info:~$ lime-config
root@thisnode.info:~$ lime-apply
root@thisnode.info:~$ reboot

You can check which country code your device is by using:

$ ssh root@thisnode.info
root@thisnode.info:~$ iw reg get
country PT: ...

In the commands cited over there you need to replace TZ for the two letter country code of your country.
It might ask you for your password, that will be the one that you set up at the First Boot Wizard.

TODO: Where do we get the list of valid country codes?

Right now there is a bug that will be fixed soon. The full power of the radios is only available in the TZ country code, and there is no Licensed mode to use if you have authorization to use more power in your region.
So, if you want to use all the power of the LibreRouter, set the country code to TZ.

hi nico,

just an observation…
when lime-community.wifi.country was set to TZ, with iw dev i found that

phy#2
	Interface wlan2-mesh
		txpower 27.00 dBm
phy#1
	Interface wlan1-mesh
		txpower 26.00 dBm
phy#0
	Interface wlan0-apname
		txpower 26.00 dBm
	Interface wlan0-ap
		txpower 26.00 dBm

and when i changed country to IN, the results from iw dev are

phy#2
	Interface wlan2-mesh
		txpower 27.00 dBm
phy#1
	Interface wlan1-mesh
		txpower 26.00 dBm
phy#0
	Interface wlan0-apname
		txpower 20.00 dBm
	Interface wlan0-ap
		txpower 20.00 dBm

so changing the country changes the transmission power of 2.4GHz radio only.
and it has no effect on 5GHz radios. which is probably fine.

out of curiosity though, how de we change the power of 5GHz radios?

The country config defines the maximum allowed configurable power per band and channel.
So changing the country may impact on the current setting or not. If you don’t configure a specific out power then it is always at the maximum for that specific channel.

You can use the following config to change the power (in lime-node for example):

config wifi radio0
	option txpower '20'

to set the power for the phy0.