🛠 Wi-Fi AP6212 : le piège de l'antenne U.FL non fournie
Objectives
The BPI-M2 Zero features an AP6212 module (BCM43430 class): 1×1 Wi-Fi 802.11 b/g/n over SDIO, exclusively on the 2.4 GHz band. The particularity that ruins the first few evenings: the board did not come with an antenna — only an RF U.FL pad next to the mini-HDMI port allows you to screw one on. Published measurements: without an antenna, speeds oscillate between 0.68 and 13 Mbit/s and the list of networks is ghostly; with a cheap antenna, approximately 26/34 Mbit/s and about twenty visible networks. You will equip the board and connect it properly.
Hardware
- BPI-M2 Zero running Armbian
- U.FL antenna (small 2.4 GHz antenna for a few euros) — essential
- 2.4 GHz access point (the AP6212 does NOT see 5 GHz)
- Console (CON3 or OTG gadget) for configuration
Complete Code
# 1) Visser l'antenne U.FL (contact franc, connecteur fragile)
ip -br link show wlan0
# 2) État des lieux AVANT / APRÈS antenne : la différence est édifiante
sudo iw dev wlan0 scan | grep -c SSID # relancer après avoir vissé l'antenne
# 3) Connexion en ligne de commande (NetworkManager)
sudo apt install -y network-manager
nmcli dev wifi connect "MON_SSID" password "MON_MDP" ifname wlan0
nmcli -f SSID,SIGNAL,CHAN dev wifi list | head
# 4) Vérifier le lien et le débit réel
iw dev wlan0 link
ping -c 3 9.9.9.9
iperf3 -c mon_serveur_lan
Expected Verification
With an antenna: about twenty SSIDs in the scan, iw dev wlan0 link shows a connected link, iperf3 approaches the published 26 to 34 Mbit/s. Without an antenna, the board often only "sees" the nearby hotspot with unstable speeds — this is the documented behavior, not a failure.
Common Errors
- Concluding that the Wi-Fi is broken when the U.FL antenna is simply missing (not included in the box).
- Targeting a 5 GHz network: the AP6212 is strictly 2.4 GHz.
- Assembling the metal case of a Zero W kit after successful tests: the case acts as a Faraday cage, move the antenna outside the case.
- Forgetting that Bluetooth shares the module: the BT tuner is a separate topic (see the Bluetooth tutorial).
- Leaving the antenna cable pressed against the mini-HDMI connector: performance degrades, keep the cable deployed.
Other tutorials for this board
- Flasher Armbian et premier boot du BPI-M2 Zero
- LED et bouton avec libgpiod sur le port 40 broches
- Console série sur USB-OTG : dépanner sans réseau ni câble UART
- Activer le bus SPI0 et piloter un petit écran TFT
- Survivre avec 512 Mo : zram, swap compressé et services légers
- Câbler l'Ethernet 10/100 EMAC avec le carrier Zero-EPHY
Code examples for this board
clignotante.pyPythonbouton-gpio.pyPythoncapteur-i2c.shBashsurveillance-temperature.shBashcapteur-dht11.pyPythonservo-pwm-sysfs.shBash