0

I know these kind of question already exists but it's from 2016 and doesn't work for me. I'm using the newest Kali version it's installed on my laptop.

So I wanted to "iw reg set BO" so I can increase the txpower. But I get this:

global country 00: DFS-UNSET (2402 - 2472 @ 40), (6, 20), (N/A) (2457 - 2482 @ 20), (6, 20), (N/A), AUTO-BW, PASSIVE-SCAN (2474 - 2494 @ 20), (6, 20), (N/A), NO-OFDM, PASSIVE-SCAN (5170 - 5250 @ 80), (6, 20), (N/A), AUTO-BW, PASSIVE-SCAN (5250 - 5330 @ 80), (6, 20), (0 ms), DFS, AUTO-BW, PASSIVE-SCAN (5490 - 5730 @ 160), (6, 20), (0 ms), DFS, PASSIVE-SCAN (5735 - 5835 @ 80), (6, 20), (N/A), PASSIVE-SCAN (57240 - 63720 @ 2160), (N/A, 0), (N/A)phy#1 country 99: DFS-UNSET (2402 - 2472 @ 40), (N/A, 20), (N/A) (2457 - 2482 @ 40), (N/A, 20), (N/A), PASSIVE-SCAN (5140 - 5860 @ 40), (N/A, 30), (N/A), PASSIVE-SCAN

So it didn't do anything.

1
  • Did you figure it out in the end? This guide worked for me with a few tweaks to make it 2023-friendly: askubuntu.com/questions/1165300/… I outlined the tweaks in a comment below the original post.
    – Dan
    Commented Oct 31, 2023 at 14:32

2 Answers 2

0

Firstly, the iw command is a new nl80211 based CLI configuration utility for wireless devices. It replaces older tools like iwconfig and iwlist. However, changing regulatory domain only makes sense if your WiFi adapter supports it.

Let's break down what's happening:

Your WiFi Adapter: Not all adapters play nicely with commands to change their regulatory domain. Check the manufacturer's specifications for your particular model to ensure it's capable of this.

CRDA and Your System: The Central Regulatory Domain Agent (CRDA) in your system might be overwriting your command based on the country code embedded in the system or the WiFi card.

Here's some troubleshooting wizardry you can try out:

Reconfigure crda: Reconfigure the crda package by running sudo dpkg-reconfigure crda and setting your country to BO there.

Check dmesg Logs: The command dmesg | grep cfg80211 will show you output logs where you can check if your command is being accepted or overridden.

Reboot Your System: A simple reboot after running iw reg set BO might help the changes take effect.

2
  • My adapter is the Alfa Awus1900 drivers installed. When I try dpkg-reconfigure, I get: "dpkg-query: package 'crda' is not installed and no information is available" rebooting didn't help.
    – jamail bot
    Commented Aug 2, 2023 at 7:25
  • and this is the output of dmesg | grep cfg80211: [ 3.827270] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 3.829504] cfg80211: loaded regulatory.db is malformed or signature is missing/invalid
    – jamail bot
    Commented Aug 2, 2023 at 7:31
0

In the comments, you showed two important dmesg log messages:

[    3.827270] cfg80211: Loading compiled-in X.509 certificates for regulatory database 
[    3.829504] cfg80211: loaded regulatory.db is malformed or signature is missing/invalid 

Debian (and distributions related to it, like Ubuntu and Kali) have moved away from the old crda system in favor of directly loading the wireless regulatory rules from /lib/firmware/regulatory.db using essentially the same mechanism that's used for loading firmware files.

But the regulatory data must be authenticated, and there are two possible sources for it: if you are using a distribution kernel, it may use the regulatory data files signed by the distribution itself, to avoid any third-party signing keys in the kernel as much as possible. But if you use a custom kernel, it will instead use the default upstream regulatory signing key.

So, in Debian at least, there are two versions of the regulatory data available: one for distribution kernels, and another to be used with custom kernels you might build yourself. The error message suggests you might be using the wrong version of the data, or if you have manually updated it, you may have missed the signature file associated with it.

If you have updated the current /lib/firmware/regulatory.db, you should also have updated the corresponding /lib/firmware/regulatory.db.p7s signature file to match.

If you are using a custom kernel, run update-alternatives --config regulatory.db and see what it says.

I'm using Debian with my own custom-configured kernel, so the output looks like this for me:

update-alternatives --config regulatory.db
There are 2 choices for the alternative regulatory.db (providing /lib/firmware/regulatory.db).

  Selection    Path                                  Priority   Status
------------------------------------------------------------
  0            /lib/firmware/regulatory.db-debian     100       auto mode
  1            /lib/firmware/regulatory.db-debian     100       manual mode
* 2            /lib/firmware/regulatory.db-upstream   50        manual mode

Press <enter> to keep the current choice[*], or type selection number:

In your case, the currently-selected version clearly does not work for you, so you might want to try the other version of the regulatory database.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .