Kann ein Pi Zero über seinen Mini-HDMI-Port (HEC) Ethernet für einen Sensorknoten bekommen?
Von English mit KI übersetzt ·
Laborprojekt: Ein Pi Zero (das einfache Modell ohne Wi-Fi) mit einem BME280 soll Temperatur, Luftfeuchtigkeit und Luftdruck jede Minute über MQTT an Hermetry senden. Im Labor gibt es überall verkabelte Netzwerkanschlüsse, aber kein Wi-Fi, in das wir Geräte einbinden dürfen.Beim Lesen über HDMI 1.4 bin ich auf den HDMI Ethernet Channel (HEC) gestoßen, und die Laborbildschirme und Kabel sind alle HDMI 1.4 oder neuer. Meine Idee war, über den Mini-HDMI-Port des Zero Netzwerkverbindung zu bekommen und so nichts kaufen zu müssen. Ich finde dafür aber keine Einstellung; ip link zeigt nur lo an. Fehlt mir ein Overlay oder ein Kernelmodul, oder unterstützt der Zero das einfach nicht?
Lab project: a Pi Zero (the plain one, no Wi-Fi) with a BME280 that should send temperature, humidity and pressure to Hermetry over MQTT every minute. The lab has wired network ports everywhere but no Wi-Fi we’re allowed to put devices on.
While reading about HDMI 1.4 I found the HDMI Ethernet Channel (HEC), and the lab monitors and cables are all HDMI 1.4 or newer. So my idea was to get networking over the Zero’s mini-HDMI and skip buying anything. I can’t find any setting for it though, ip link only shows lo. Is there an overlay or kernel module I’m missing, or does the Zero just not do this?
Von English mit KI übersetzt ·
Ich bin ziemlich sicher, dass der Pi die HEC-Pins gar nicht beschaltet, aber ich habe das nie richtig überprüft.
Pretty sure the Pi doesn’t wire up the HEC pins at all, but I’ve never checked properly.
Von English mit KI übersetzt ·
Mich interessiert das auch, wir haben im ganzen Gebäude HDMI-Leitungen, die niemand benutzt.
Curious about this too, we have HDMI runs all over our building that nobody uses.
Von English mit KI übersetzt ·
Ich bin Facility-Manager, kein Elektrotechniker, aber ich habe letztes Jahr genau diese Idee für ein Lobby-Display verfolgt und dabei einen ganzen Nachmittag verschwendet. Der Pi implementiert kein HEC. Bei HDMI sind das die Pins 14 und 19, und der Pi hat dahinter keinen Ethernet-PHY, es gibt also nichts, was man in der Software aktivieren könnte. Kein Overlay wird das beheben.Was ich schließlich gemacht habe und was ich in deiner Reihenfolge ausprobieren würde:
- Ein Micro-USB-zu-Ethernet-Adapter am USB-Port des Zero (nicht am PWR-Port). Adapter auf Basis des ASIX AX88772 funktionieren sofort, eth0 erscheint einfach. Meiner hat etwa zehn Dollar gekostet.
- USB-Gadget-Modus: Der Zero gibt sich über das USB-Kabel gegenüber einem Laptop als Netzwerkkarte aus. Füge
dtoverlay=dwc2in config.txt hinzu undmodules-load=dwc2,g_ethernach rootwait in cmdline.txt. Dann muss der Laptop seine Verbindung freigeben. - Auf einen Zero 2 W wechseln, falls WLAN irgendwann erlaubt wird.
Sobald eth0 läuft, ist die MQTT-Seite dieselbe wie bei jedem anderen Pi: TLS auf 8883 mit dem Geräte-Token.
I’m a facilities guy, not an EE, but I chased this exact idea for a lobby display last year and burned an afternoon on it. The Pi doesn’t implement HEC. On HDMI that’s pins 14 and 19, and the Pi has no Ethernet PHY behind them, so there’s nothing to switch on in software. No overlay will fix it.
What I ended up with, and what I’d try in your order:
- A micro-USB to Ethernet adapter on the Zero’s USB port (not the PWR one). ASIX AX88772 based ones work out of the box, eth0 just appears. Mine was about ten dollars.
- USB gadget mode: the Zero pretends to be a network card to a laptop over the USB cable. Add
dtoverlay=dwc2to config.txt andmodules-load=dwc2,g_etherafter rootwait in cmdline.txt. Then the laptop has to share its connection. - Swap for a Zero 2 W if Wi-Fi ever becomes allowed.
Once eth0 is up the MQTT side is the same as any other Pi, TLS on 8883 with the device token.
Von English mit KI übersetzt ·
Also sieht der Zero im Gadget-Modus für den Laptop wie eine Netzwerkkarte aus, und der Laptop routet für ihn? Das heißt, der Laptop muss ständig eingeschaltet bleiben?
so with gadget mode the Zero looks like a network card to the laptop and the laptop routes for it? that means the laptop has to stay on all the time
Von English mit KI übersetzt ·
Ja, der Laptop teilt seine Verbindung (NAT) und muss eingeschaltet bleiben. Deshalb habe ich mich für den Adapter entschieden.
Yep, laptop shares its connection (NAT) and has to stay on. That’s why I went with the adapter.
Von English mit KI übersetzt ·
Einen AX88772-Adapter in der Labor-Schublade gefunden, eth0 kam beim ersten Start hoch, Messwerte kommen jede Minute an. Die HEC-Idee ist offiziell tot, danke, dass du mir den Nachmittag erspart hast.
Found an AX88772 adapter in the lab drawer, eth0 came up on first boot, readings arriving every minute. The HEC idea is officially dead, thanks for saving me the afternoon.
- Du musst angemeldet sein, um auf dieses Thema antworten zu können.
Mitdiskutieren
Melde dich an, um Fragen zu stellen und zu beantworten, hilfreiche Beiträge mit „Gefällt mir“ zu markieren und die Antwort zu kennzeichnen, die dein Problem gelöst hat. Jeder Beitrag bringt Punkte und Stufen.

