7

Enable the external antenna connector on the Raspberry Pi Compute Module 4

 2 years ago
source link: https://www.jeffgeerling.com/blog/2022/enable-external-antenna-connector-on-raspberry-pi-compute-module-4
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Enable the external antenna connector on the Raspberry Pi Compute Module 4

February 4, 2022

Raspberry Pi Compute Module 4 external U.FL antenna

The internal WiFi module on the Compute Module 4 (that's the bit under the metal shield in the picture above) routes its antenna signal via software. You can route the signal to either:

  1. The built-in PCB triangle antenna (this is the default).
  2. The external U.FL connector (which has an external antenna plugged into it in the picture above)

To switch the signal to the U.FL connector (for example, if you're installing your CM4 in a metal box where the PCB antenna would be useless), you need to edit the boot config file (sudo nano /boot/config.txt, and add the following at the bottom:

# Switch to external antenna.
dtparam=ant2

Then reboot the Pi.

To switch back, comment out or delete the dtparam line above. Note that you can actually disable the WiFi antenna route entirely (even without disabling the WiFi chip); here are the docs straight from the firmware repository:

Params:
        ant1                    Select antenna 1 (default). CM4 only.

        ant2                    Select antenna 2. CM4 only.

        noant                   Disable both antennas. CM4 only.

See my original review of the Compute Module 4 for more information about antenna performance, and a recommendation of an external antenna to buy (though you can't go wrong with the one from Raspberry Pi themselves!).


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK