Good evening all, @MichaIng
After purchasing a Radxa Zero 3W board, I ran into trouble trying to enable the overlay included in the DietPi distribution.
The activation failed, and I didn’t know how to verify that the overlay had been successfully enabled.
Below is a small script that renames the overlay and copy it to the overlay-user folder to activate it via dietpiEnv.txt.
#!/bin/bash
# ==============================================================================
# SCRIPT DE RE-DÉPLOIEMENT PROPRE DE L'ANTENNE EXTERNE (DIETPI)
# ==============================================================================
echo "--- [1/3] Création du dossier et copie du fichier DTBO d'origine ---"
sudo mkdir -p /boot/overlay-user
sudo cp /boot/dtb/rockchip/overlay/rk35xx-radxa-zero-3w-ext-ant.dtbo /boot/overlay-user/radxa-ext-ant.dtbo
echo "--- [2/3] Configuration du fichier /boot/dietpiEnv.txt ---"
# Nettoyage des lignes existantes pour éviter les doublons
sudo sed -i '/user_overlays=/d' /boot/dietpiEnv.txt
# Injection de la configuration propre (conserve pcm5122_i2s et ajoute radxa-ext-ant)
sudo tee -a /boot/dietpiEnv.txt << 'LINE_EOF'
user_overlays=pcm5122_i2s radxa-ext-ant
LINE_EOF
echo "--- [3/3] Vérification visuelle du fichier modifié ---"
cat /boot/dietpiEnv.txt
echo "=============================================================================="
echo " Opération réussie ! Vous pouvez maintenant redémarrer avec : reboot"
echo "=============================================================================="
# L'exécuter
# bash deploy_antenna.sh
# Pour vérifier
# cat /sys/kernel/debug/gpio | grep -i antenna
# On doit trouver la réponse suivante
# gpio-26 ( |board-antenna ) out lo ACTIVE LOW
# Pour tester la force du signal
# iw dev wlan0 scan | grep -E 'SSID|signal'
At the end of the script, you’ll find the commands to verify successful activation.
With this command cat /sys/kernel/debug/gpio | grep -i antenna,
you should get
gpio-26 ( |board-antenna ) out lo ACTIVE LOW,
This works for me, and I hope it can help others.