Von English mit KI übersetzt ·
Beides funktioniert, ich habe beides im Feld im Einsatz. Auf Bookworm ist es deutlich weniger umständlich, NetworkManager übernimmt AP und NAT in einem Schritt:
sudo nmcli dev wifi hotspot ifname wlan0 ssid shed-iot password 'long-passphrase-here'
sudo nmcli con mod Hotspot connection.autoconnect yes ipv4.method shared
ipv4.method shared verteilt DHCP an die ESP32s und routet sie per NAT über das, was die Standardroute hat, also Ihren 4G-Stick. Das integrierte Wi-Fi des Pi reicht für 8 Clients auf kurze Distanz.Bei Hitze und SD-Karten würde ich zweimal überlegen, außerdem kommt niemand an den Pi heran, wenn er hängt. Wenn Sie den Pi nehmen: Metallgehäuse als Kühlkörper, eine gute industrietaugliche SD-Karte oder eine USB-SSD, wenn möglich Root-Dateisystem nur lesbar, und den Hardware-Watchdog aktiviert.Was ein lizenzierter Router auf Hermetry für das Geld bietet: Sie beanspruchen ihn mit dem Code auf seiner lokalen Cloud-Seite, er meldet sich mit seinem eigenen Zertifikat an, Sie können seine Einstellungen ändern und seine Firmware über Hermetry aktualisieren, und Sie können sein Web-Panel von seiner Geräteseite aus öffnen, ohne feste IP, die Sie über eine 4G-Verbindung nicht haben. Es ist ein Gerät in Ihrer eigenen Organisation und zählt einmal gegen das Geräte-Limit. Remote-Zugriffssitzungen sind zeitlich begrenzt und werden protokolliert.Meine Regel: Ein Standort, zu dem ich fahren kann, Pi. Standorte, die einen Pick-up und einen Tag Aufwand brauchen, lizenzierter Router. Details: Licensed gateways and Hermetry Edge.
Both work, I have both in the field. On Bookworm it’s much less fiddly, NetworkManager does the AP and the NAT in one go:
sudo nmcli dev wifi hotspot ifname wlan0 ssid shed-iot password 'long-passphrase-here'
sudo nmcli con mod Hotspot connection.autoconnect yes ipv4.method shared
ipv4.method shared hands out DHCP to the ESP32s and NATs them out of whatever has the default route, your 4G dongle. The Pi’s onboard Wi-Fi is fine for 8 clients at short range.
Where I’d think twice is heat and SD cards, plus nobody can reach the Pi when it hangs. If you go Pi: metal case as heatsink, a decent industrial SD or USB SSD, read-only root if you can, and the hardware watchdog enabled.
What a licensed router gives you on Hermetry for the money: you claim it with the code on its local Cloud page, it logs in with its own certificate, you can change its settings and update its firmware from Hermetry, and you can open its web panel from its device page without a fixed IP, which on a 4G link you won’t have. It’s a device in your org itself and counts once against the device limit. Remote access sessions are time-limited and audited.
My rule: one site I can drive to, Pi. Sites that need a ute and a day, licensed router. Details: Licensed gateways and Hermetry Edge.

