I have a raspberry pi compute module 4 and the wifi range is too weak so I decided to install an external passive antenna using the Hirose U.FL connector. Installing this antenna changed noise signal from -75dBm to -97dBm but the range is still poor.
The output from iw phy is:
You could measure the control voltages going to the antenna switch chip. It looks like a standard 6-pin PIN diode switch. The two pins on the sides on the radio side control the diodes inside. One of the control pins will be high and the other low depending on the setting. It's probably from a GPIO port but if the bootloader sets it correctly OpenWrt need not change it later.
Realize that the wifi chip in these was intended for low-end smartphones. It's not going to have great performance.
One simple thing you could try is get a metal biscuit tin, put the the PI inside with the external antenna poking out then switch between antennas, the internal antenna setting should now give a much lower signal.
So I did a test using a metal biscuit tin and I got the same readings between the internal antenna and the external antenna from RPI. Clearly this external antenna it's not enable. I tried with a different antenna (to check if the first external antenna is broken) and the results were the same.
Does anyone knows if adding "dtparam=ant2" to boot/config.txt is enough to enable an external antenna on OpenWRT?
Hi!
Here's the result when I do cat /sys/kernel/debug/gpio
gpiochip1: GPIOs 504-511, parent: platform/soc:firmware:gpio, raspberrypi-exp-gpio, can sleep:
gpio-504 (BT_ON )
gpio-505 (WL_ON )
gpio-506 (PWR_LED_OFF |led1 ) out lo ACTIVE LOW
gpio-507 (ANT1 |ant1 ) out lo
gpio-508 (VDD_SD_IO_SEL |vdd-sd-io ) out lo
gpio-509 (CAM_GPIO )
gpio-510 (SD_PWR_ON |sd_vcc_reg ) out hi
gpio-511 (ANT2 |ant2 ) out hi
I have dtparam=ant2 on boot/config.txt so I believe the antenna is enabled right?
Yes, I believe that is the expected output with dtparam=ant2. So the external antenna connector should be active. Better check the connection and cable if it still doesn't work as expected.