Enable the UBNT Compliance Test ( Working Method )

M
Madan KC β€” ISP Network Engineer
Working with Ubiquiti airMAX devices daily as an ISP professional since 2017
ISP Professional UBNT Field Experience Updated 2026
⚑ Quick Answer

To enable Compliance Test on UBNT devices: connect via PuTTY SSH to your device β†’ run enable_ct β†’ then touch /etc/persistent/ct β†’ save β†’ reboot. For devices where enable_ct doesn’t work (like PowerBeam 5AC), use the persistent script method below.

⚠️ Legal Disclaimer: Compliance Test mode unlocks frequencies beyond your country’s regulatory limits. This guide is for licensed ISP operators and network engineers who hold the required spectrum licences. Using unlicensed frequencies is illegal in most countries. Proceed only if you are legally permitted. Use at your own risk β€” the author takes no responsibility for misuse.

Ubiquiti removed the Compliance Test option from airOS starting with firmware 5.5.8, following FCC and other regulatory body requirements. This locked many ISP operators out of licensed frequencies they had the legal right to use. This guide covers every working method to re-enable it β€” from the simple one-line SSH command to the full persistent script for newer firmwares.


What Is UBNT Compliance Test Mode?

Compliance Test (also called Country Code 511 or “Licensed” mode) is a special country code setting in Ubiquiti airOS that unlocks all available frequencies supported by the radio hardware β€” including those outside the standard unlicensed bands (2.4 GHz and 5 GHz).

ModeFrequencies AvailableWho Uses It
Normal (Country-locked)Limited to your country’s regulationsRegular home/office users
Compliance Test (Code 511)All hardware-supported frequenciesLicensed ISP operators, engineers

When you set the country code to 511, the Wireless tab shows a “Compliance Test” or “Licensed” country option and the frequency scan list expands to include all channels the hardware supports β€” including licensed bands used by ISPs for point-to-point links.

πŸ“‘
ISP Field Note

In my work as an ISP network engineer, we use Compliance Test mode on licensed 5 GHz point-to-point links where regulatory congestion on standard channels makes the connection unreliable. The licensed spectrum is cleaner and gives significantly better performance for our WISP backbone links.


What You Need Before Starting

  • PuTTY (free SSH client) β€” Download from putty.org
  • Your UBNT device’s IP address (default: 192.168.1.20)
  • SSH credentials β€” default username: ubnt / password: ubnt
  • Your computer connected to the same network as the UBNT device
  • SSH service enabled on the device (enabled by default in airOS)
πŸ“Œ How to find your UBNT device IP: Open your browser and navigate to the device’s web interface. The IP shown in the address bar is what you’ll use in PuTTY. Default is 192.168.1.20 for most airMAX devices.

πŸ” Which Method Do You Need? Click Your Device

Different UBNT devices and firmware versions require different approaches. Click your situation:

⚑
Quick Method
Rocket M5, NanoStation M series
πŸ“œ
Script Method
PowerBeam 5AC, newer devices
🌐
Web Config Method
No SSH β€” use browser only
πŸ’Ύ
Firmware Issue
Above 5.5.6, can’t downgrade
βœ…
Verify It Worked
Check if mode is active
↩️
Undo / Revert
Remove compliance test mode

Method


All Methods β€” Step by Step

Works on: Rocket M2, Rocket M5, NanoStation M series, most older airMAX M devices

Does NOT work on: PowerBeam 5AC, newer AC-series devices (use Method 2 instead)

Step 1 β€” Connect via PuTTY

  • Open PuTTY
  • Enter your device IP in Host Name (e.g. 192.168.1.20)
  • Port: 22 | Connection type: SSH
  • Click Open
  • Login: ubnt | Password: ubnt (or your custom credentials)

Step 2 β€” Run These Commands

Enter the following commands one at a time, pressing Enter after each:

enable_ct
touch /etc/persistent/ct
save
reboot
βœ… What happens: After reboot, go to Wireless tab β†’ Country in the airOS web interface. You should now see “Compliance Test” or “Licensed” as a country option.
⚠️ If enable_ct returns “command not found” β€” your device firmware does not support this shortcut. Use Method 2 (Script Method) instead.

Works on: PowerBeam 5AC, PowerBeam M5, any device where enable_ct fails, firmware 5.6.x+

This method creates a persistent startup script that sets country code 511 every time the device boots.

Step 1 β€” Connect via PuTTY (same as Method 1)

Step 2 β€” Create the Script

Copy and paste this entire block into PuTTY (right-click to paste):

cat > /etc/persistent/rc.poststart << 'EOF'
#!/bin/sh
insmod /lib/modules/2.6.32.71/ubnt_spectral.ko
iwpriv wifi0 setCountry Ub
ifconfig ath0 down
ifconfig wifi0 down
sleep 5
rmmod /lib/modules/2.6.32.71/ubnt_spectral.ko
ifconfig ath0 up
ifconfig wifi0 up
echo "countrycode=511" > /var/etc/atheros.conf
sed -i 's/840/511/g' /tmp/system.cfg
echo '<option value="511">Compliance Test</option>' >> /var/etc/ccodes.inc
EOF

Step 3 β€” Make it Executable & Save

chmod +x /etc/persistent/rc.poststart
save
reboot
βœ… After reboot: The script runs automatically at startup. Go to Wireless β†’ Country and select Compliance Test. This setting survives future reboots.
ℹ️ Note on firmware version: The script above uses the module path for firmware v6.3.0 (/lib/modules/2.6.32.71/). If you’re on a different firmware version, this path may differ. Verify with: ls /lib/modules/

Works on: All airMAX devices | No SSH required β€” everything done through the web browser

This method edits the backup configuration file to change the country code to 511, then re-uploads it via the web interface.

  1. Log into your UBNT device web interface in your browser
  2. Go to System tab β†’ Download the backup configuration file (.cfg)
  3. Open the downloaded .cfg file in Notepad (Windows) or any text editor
  4. Press Ctrl+F and search for countrycode
  5. Find the lines: radio.countrycode=XXX and radio.1.countrycode=XXX
  6. Change both values to 511:
    radio.countrycode=511
    radio.1.countrycode=511
  7. Save the file (Ctrl+S)
  8. Go back to the UBNT web interface β†’ System tab β†’ Upload Configuration
  9. Upload the edited .cfg file and wait for the device to apply it
  10. Reboot the device
βœ… Result: After reboot, go to Wireless tab β†’ Country. You should see Compliance Test available and selectable. No SSH required.
⚠️ Do NOT change any other values in the config file. Only change the countrycode lines. Modifying other settings may break your device configuration.

Device & Firmware Compatibility

DeviceMethod 1 (enable_ct)Method 2 (Script)Method 3 (Web)
Rocket M2 / M5βœ… Worksβœ… Worksβœ… Works
NanoStation M2 / M5βœ… Worksβœ… Worksβœ… Works
NanoBeam M5βœ… Worksβœ… Worksβœ… Works
PowerBeam M5 (XM board)βœ… Worksβœ… Worksβœ… Works
PowerBeam 5AC (XW board)❌ Failsβœ… Worksβœ… Works
AirGrid M5 HPβœ… Worksβœ… Worksβœ… Works
Rocket 5AC Lite/Prism❌ Failsβœ… Worksβœ… Works
LiteBeam 5AC❌ Failsβœ… Worksβœ… Works
Firmware below 5.5.6βœ… Built-in optionNot neededNot needed
Firmware 5.5.8 – 5.6.xβœ… Works (most)βœ… Worksβœ… Works
πŸ“Œ Quick rule: If your device uses an XM board (older M-series), Method 1 works. If it uses an XW or TI board (AC-series), skip to Method 2 or 3.

How to Verify Compliance Test Is Active

After rebooting, confirm Compliance Test mode is working using either of these methods:

Method A β€” Check via Web Interface:

  1. Log into airOS web interface
  2. Go to Wireless tab β†’ Country
  3. Look for “Compliance Test” or “Licensed” in the dropdown
  4. If visible and selectable β€” it’s working βœ…

Method B β€” Verify via SSH:

iwpriv wifi0 getCountry
# Expected output: wifi0 getCountry:UB
iwpriv wifi0 getCountryID
# Expected output: wifi0 getCountryID:511
βœ… Success: If getCountryID returns 511 and getCountry returns UB (Ubiquiti), Compliance Test mode is active and working correctly.

Firmware Issue? Device Above 5.5.6 That Won’t Downgrade

Some devices β€” particularly the AirMAX PowerBeam M5 shipped with firmware 5.6.2 β€” cannot be downgraded via the web interface. In these cases:

  1. Use TFTP firmware recovery to flash firmware version 5.6.3 (or the latest available for your board type)
  2. After TFTP flash completes and device reboots β€” do not touch the web interface yet
  3. Immediately connect via SSH and apply Method 2 (Script) above
  4. Run save and reboot
⚠️ Critical: After TFTP firmware flash, if you log into the web interface first and change any settings, you may need to repeat the process. Apply the SSH script before making any web interface changes.

Related ISP Guides


Frequently Asked Questions

Compliance Test (country code 511) is a special mode in Ubiquiti airOS that unlocks all hardware-supported frequencies beyond country-specific regulatory limits. It was built-in as a country option in older firmware versions but was removed in airOS 5.5.8 following FCC and international regulatory requirements. It is used by licensed ISP operators who have legal rights to operate on specific frequency bands outside the standard unlicensed 2.4 GHz and 5 GHz ranges.
Ubiquiti removed Compliance Test mode in firmware version 5.5.8 in response to pressure from the FCC (USA) and equivalent regulatory bodies in other countries. The concern was that many users were abusing the mode to operate on frequencies illegally β€” causing interference with licensed operators. The feature was removed from the user interface but the underlying hardware capability remains, which is why it can be re-enabled via SSH commands.
No β€” the enable_ct command does not work on the PowerBeam 5AC and other AC-series devices (XW and TI board variants). These devices use a different hardware architecture. For the PowerBeam 5AC, you must use Method 2 (the persistent script method) or Method 3 (the web configuration file edit method).
Country code 511 is the Ubiquiti-assigned code for “Compliance Test” or “Licensed” mode β€” it corresponds to the internal country identifier “UB” (Ubiquiti). When this code is active, the device treats itself as if it has no country-specific frequency restrictions, making all hardware-supported channels available. You can verify it’s active by running iwpriv wifi0 getCountryID via SSH β€” it should return 511.
The script itself (/etc/persistent/rc.poststart) survives reboots because it’s stored in persistent storage. However, the script runs every time the device boots to re-apply the country code setting. The country code selection you make in the Wireless tab (after setting it to Compliance Test) also survives reboots β€” it’s saved in the system configuration. So once set up correctly, you won’t need to touch it again after reboots.
Download PuTTY from putty.org. Open it and enter your device’s IP address in the Host Name field (default is 192.168.1.20 for most airMAX devices). Set Port to 22 and Connection Type to SSH. Click Open. When prompted, enter username ubnt and password ubnt (these are the default credentials). If you changed the credentials, use your custom ones. If the connection is refused, make sure SSH is enabled in the airOS System tab.
The script uses the module path /lib/modules/2.6.32.71/ which corresponds to firmware v6.3.0. If you’re on a different firmware version, check your exact path by running ls /lib/modules/ via SSH. Update the two insmod and rmmod lines in the script with the correct path for your firmware version. The rest of the script remains the same.
It depends entirely on your country’s regulations and whether you hold the appropriate spectrum licence. In many countries, ISPs and wireless operators can legally obtain licences to operate on specific frequency bands that are otherwise restricted. If you have such a licence, using Compliance Test to access those frequencies is legal. Using it without a licence to operate on restricted frequencies is illegal in virtually every jurisdiction. Always consult your country’s telecommunications authority before operating outside standard bands.