Jump to content

Change regulatory region: Difference between revisions

From postmarketOS Wiki
Anjanmomi (talk | contribs)
add $
Magdesign (talk | contribs)
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 28: Line 28:




{{note| These changes are not persistent after a reboot and you will have to run these commands again after a reboot. TODO: find a way to make these changes persistent and document here}}
{{note| These changes are not persistent after a reboot.}}
 
To make this persistent, we create a new service script: <pre>/etc/local.d/wifi-country.start</pre>
 
which contains:
<pre>
#!/bin/sh
iw reg set GB
</pre>
 
remember to make it executable:
<pre>
sudo chmod +x /etc/local.d/wifi-country.start
</pre>
 
thats it, reboot and check if your wifi country was set.

Latest revision as of 22:46, 14 November 2024

You can change the regulatory region by installing the iw and wireless-regdb packages.

To get current region run:

$ iw reg get

You can set the regulatory region to the UK with:

$ iw reg set GB

The list of country codes can be found here: https://content.cisco.com/chapter.sjs?uri=/searchable/chapter/www.cisco.com/content/en/us/td/docs/wireless/wcs/3-2/configuration/guide/wcscfg32/wcscod.html.xml


Finally, to apply your changes, restart the wifi modem. This can be done with the following commands:

$ rfkill block wlan
$ rfkill unblock wlan

Or, in Sxmo, you can use the wifi toggle from sxmo_appmenu.sh -> config menu.

Your wifi should work now!


Note These changes are not persistent after a reboot.

To make this persistent, we create a new service script:

/etc/local.d/wifi-country.start

which contains:

#!/bin/sh
iw reg set GB

remember to make it executable:

sudo chmod +x /etc/local.d/wifi-country.start

thats it, reboot and check if your wifi country was set.