update README AP RPI5

This commit is contained in:
Denis Defolie
2026-10-06 18:47:36 +02:00
parent ec88de1b3c
commit 79d45587ba
2 changed files with 62 additions and 0 deletions
+30
View File
@@ -140,6 +140,36 @@ make fw-upload SERIAL_PORT=/dev/ttyUSB0
NVS takes priority over `secrets.h`. To start from scratch, force the portal
with the PTT button (or erase the NVS with `esptool.py erase_flash`).
**Raspberry Pi 5 Wi-Fi access point: WPA2 required**
If the board connects to the Pi's access point (NetworkManager, here `RPI5-AP`),
it must use **WPA2**. By default the ESP32 refuses any network below WPA2, and
an access point created by NetworkManager may be WPA1. Recommended fix, on the Pi:
```bash
nmcli -t -f NAME,TYPE con show --active # name of the access point connection
sudo nmcli con modify "RPI5-AP" wifi-sec.key-mgmt wpa-psk wifi-sec.proto rsn \
wifi-sec.pairwise ccmp wifi-sec.group ccmp \
802-11-wireless.band bg 802-11-wireless.channel 6
sudo nmcli con down "RPI5-AP" && sudo nmcli con up "RPI5-AP"
```
`proto rsn` enforces WPA2; channel 6 avoids channels 12 and 13, which the ESP32
handles poorly. The Wi-Fi password does not change. On this network the Pi is
`10.42.0.1`: that is the broker address to enter in the portal.
Diagnosis on the serial monitor (`make fw-monitor`, or minicom at **921600 baud**):
| Board message | Cause | Fix |
|---|---|---|
| `Reason: 211` | access point uses WPA1 | switch it to WPA2 (above) |
| `Reason: 15 - 4WAY_HANDSHAKE_TIMEOUT` | wrong Wi-Fi password stored in the board | re-enter it in the portal; the Pi confirms it: `sudo journalctl -u wpa_supplicant \| grep PSK-MISMATCH` |
| `# mqtt : echec (code 5)` | MQTT account missing on the broker, or different password | `make mqtt-user NAME=esp32-01` on the Pi |
| unreadable bytes when the button is pressed | MQTT not connected: the session goes over the serial cable | check the `# wifi` and `# mqtt` lines at boot |
> In the portal, both password fields (Wi-Fi and MQTT) are always shown empty:
> retype them on every save, a field left empty erases the stored password.
---
### 4.2 Python server
+32
View File
@@ -140,6 +140,38 @@ make fw-upload SERIAL_PORT=/dev/ttyUSB0
La NVS reste prioritaire sur `secrets.h`. Pour repartir de zéro, forcez le
portail avec le bouton PTT (ou effacez la NVS avec `esptool.py erase_flash`).
**Point d'accès Wi-Fi du Raspberry Pi 5 : WPA2 obligatoire**
Si la carte se connecte au point d'accès du Pi (NetworkManager, ici `RPI5-AP`),
celui-ci doit être en **WPA2**. L'ESP32 refuse par défaut tout réseau en dessous
de WPA2, et un point d'accès créé par NetworkManager peut être en WPA1.
Correction recommandée, sur le Pi :
```bash
nmcli -t -f NAME,TYPE con show --active # nom de la connexion du point d'accès
sudo nmcli con modify "RPI5-AP" wifi-sec.key-mgmt wpa-psk wifi-sec.proto rsn \
wifi-sec.pairwise ccmp wifi-sec.group ccmp \
802-11-wireless.band bg 802-11-wireless.channel 6
sudo nmcli con down "RPI5-AP" && sudo nmcli con up "RPI5-AP"
```
`proto rsn` impose WPA2 ; le canal 6 évite les canaux 12 et 13, mal gérés par
l'ESP32. Le mot de passe du Wi-Fi ne change pas. Sur ce réseau, le Pi a
l'adresse `10.42.0.1` : c'est l'adresse du broker à saisir dans le portail.
Diagnostic au moniteur série (`make fw-monitor`, ou minicom à **921600 bauds**) :
| Message de la carte | Cause | Correctif |
|---|---|---|
| `Reason: 211` | point d'accès en WPA1 | le passer en WPA2 (ci-dessus) |
| `Reason: 15 - 4WAY_HANDSHAKE_TIMEOUT` | mot de passe Wi-Fi enregistré dans la carte faux | le ressaisir dans le portail ; le Pi le confirme : `sudo journalctl -u wpa_supplicant \| grep PSK-MISMATCH` |
| `# mqtt : echec (code 5)` | compte MQTT absent du broker, ou mot de passe différent | `make mqtt-user NAME=esp32-01` sur le Pi |
| des octets illisibles à l'appui du bouton | MQTT non connecté : la session part par le câble série | voir les lignes `# wifi` et `# mqtt` au démarrage |
> Dans le portail, les deux champs de mot de passe (Wi-Fi et MQTT) s'affichent
> toujours vides : retapez-les à chaque enregistrement, un champ laissé vide
> efface le mot de passe enregistré.
---
### 4.2 Serveur Python