Skip to the content
2 layers65 × 56 mmMeshgw hat, the printed circuit board in 3D

Wired Pi + 1W SX1262 LoRa gateway (meshtasticd) bridging the Empire12 / Techtaria mesh to the internet. PRIVATE: contains home coordinates.

Size
65 × 56 mm
Copper layers
2
Thickness
1.6 mm
Parts
9
Nets
12
Pads
72
Tracks, vias
0, 0
Pours
7
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
11 Aug 2026
Updated
9 Sep 2026

Overview

Meshgw hat is an open-source printed circuit board by d3athstr, from the d3athstr/mesh-internet-gateway repository on GitHub. It is a 2-layer board of 65 × 56 mm with 9 parts on 12 nets.

It is built around the E22-900M30S. Its parts include 3 capacitors, 1 IC and 1 connector. It belongs with the radio and wireless boards of this library.

Main components

1

README

README.md

Mesh Internet Gateway (meshgw)

Wired-Ethernet Raspberry Pi + 1 W SX1262 LoRa gateway running meshtasticd. Bridges the Empire12 / Techtaria LoRa mesh to the internet over MQTT, and publishes E12-owned nodes only to the public Meshtastic map directories.

PartsBin project [18]. Status: DEPLOYED AND LIVE 2026-09-09. The HAT is populated, the Pi is wired and provisioned, and the node is on the mesh with the MQTT bridge connected.

The E22 land pattern is VERIFIED. meshtasticd reported sx1262 init success on first start with the module soldered to a rev A board — so the boards fabbed on the recorded GEOMETRY_OVERRIDE are good, and that override is now cleared in fab_gate.py.

Projected cost ~$81.81, of which $35.00 is the Raspberry Pi itself — check the shelf first, a spare 3B/3B+/4 makes that line $0. The next largest is the E22 at $17.10, which is what was actually paid on a single-item AliExpress order; LCSC lists the bare module at ~$7.19, so the difference is probably bundled shipping and worth checking before buying a second one. The custom HAT is ~$0.80 ($4 for 5 boards) and the printed enclosure ~$1.20 of filament — between them under 3 % of the build.


Why this exists

Today the mesh's only internet-adjacent node is the Heltec V4 gateway !f66ae684, a WiFi-attached node on the IoT VLAN. It is a poor foundation for an internet bridge:

ProblemEvidence
ESP32 WiFi-hang — CPU alive, WiFi stack dead, every TCP client dropsDown again 2026-08-10 ~12:37, ops bridge crash-looping No route to host → BrokenPipe. Needs a Tuya-switch power cycle to recover.
Serves one streaming TCP-API client, reliablyAlready forced HA onto its own dedicated V3 radio (D049)
Bridge does not auto-reconnectmeshtastic-bridge-watchdog.timer exists solely to paper over it
WiFi-onlyNo wired path; it lives on E12-DMZ WiFi

That radio is on the load-bearing OOB control path (4th reach channel, D048). Hanging an internet/MQTT bridge off it stacks a new dependency on the component that is already the mesh's most frequent outage.

meshgw is a separate, wired, purpose-built box. The V4 keeps doing C&C; meshgw owns the internet bridge.


Design

PieceChoiceWhy
HostRaspberry Pi 3B/3B+ (wired Ethernet)Native Ethernet kills the WiFi-hang failure mode. meshtasticd is a real Linux daemon — multiple concurrent API clients, no single-TCP-slot contention. Cheapest board with Ethernet + 40-pin header; a spare is likely already on the shelf.
RadioEbyte E22-900M30S (SX1262 + PA, 30 dBm)~$14 bare module vs ~$30 for a commercial LoRa HAT, and 1 W / 30 dBm vs the Heltec's 22 dBm SX1262 ceiling — ~8 dB more link budget on the same mesh.
CarrierCustom HAT PCB (hardware/meshgw-hat/)A bare module needs a carrier. KiCad 9 headless, gen.py + freerouting — same workflow as the OSL / FD2 / Warden carriers.
Enclosure3D-printed, parametric (enclosure/)OpenSCAD source. Indoor shelf/rack box — not weatherproof.
UplinkMQTT → mqtt.meshtastic.orgWhat makes nodes appear on the public map directories.

Ruled out: ESP32 + Ethernet

WT32-ETH01 (ESP32 + LAN8720) would have been the cheapest wired option (~$8). Rejected: native ESP32 Ethernet support is meshtastic/firmware PR #9586, which is closed and never merged (verified 2026-08-10 via the GitHub API). Using it means maintaining a firmware fork on the OOB control path. Not acceptable for this role.

Ruled out: reuse an in-stock Heltec V4

Zero cost (2 on hand), but it reintroduces the exact WiFi-hang failure mode that has the current gateway down as this is being written. Reasonable as a cold standby, not as the primary.


Privacy boundary — read docs/privacy-boundary.md

This is the part that must not be got wrong.

  • Only E12-owned nodes are published: meshgw itself, the Heltec V4 gateway, the HA V3, and the e12solar RAK router.
  • Techtaria customer-home endpoints stay dark. No ok_to_mqtt, no map reporting, ever. Publishing them would put approximate customer home locations on public maps.
  • paw-cmd (idx 1, C&C) and Techtaria (idx 2, community) have uplink AND downlink OFF. Only the default primary channel uplinks. Downlink on the C&C channel would let internet-sourced packets inject into the command path.

The HMAC envelope on the C&C receiver is a second line of defence, not a reason to relax the first.


Repo layout

text
config/meshtasticd/    config.yaml (E22 pinout), MQTT + channel policy, systemd
hardware/meshgw-hat/   KiCad: netlist.py, gen.py, gen_pcb.py, route.sh,
                       check_geometry.py, lib.pretty/
enclosure/             OpenSCAD parametric case + build notes
docs/                  design notes, privacy boundary, provisioning runbook
scripts/               provisioning helpers

netlist.py is the single source of truth for the pinout — the schematic generator, the board generator and (by hand) config/meshtasticd/config.yaml all derive from it. It used to be duplicated in gen.py and gen_pcb.py with a comment saying the two must mirror each other; on 2026-08-11 they silently stopped mirroring each other. Change the map in one place.

The HAT is mechanically verified, the footprints are not

These are two different claims and only the first one is true.

check_geometry.py asserts 27 facts about the routed board against the Raspberry Pi HAT mechanical specification and the Pi 3B+: outline 65 x 56 mm with R3 corners, all 40 header pads on the spec grid from pin 1 at (8.37, 4.77), four 2.75 mm mounting holes with 6.2 mm isolated lands, no copper over the Pi 3B+ PoE header, the ground pour actually filled, and the +5V width. It exists because on this toolchain a board can pass DRC with 0 violations and 0 unconnected and still be scrap — the previous revision of this board did exactly that with its two header rows swapped, which would have put every SPI signal on its neighbour's pin.

Run it on anything you are about to fab. route.sh runs it automatically.

Two deliberate deviations from the spec: there are no camera/display flex cutouts, and there is no ID EEPROM. Without the EEPROM this is a board in the HAT form factor, not a certified HAT, and the Pi will not auto-configure it — which is fine here, because meshtasticd is told the pinout explicitly.

Pi 3B+ PoE header

The 3B+ adds a 4-pin PoE header (J14) that the 3B does not have, and it stands tall enough to foul a HAT. The board has an edge-open notch rather than an enclosed cutout, because J14 leaves only ~1 mm to the board edge and an enclosed cutout would leave a 1 mm FR4 bridge that would snap.

Fit is the smaller reason. J14 sits on the Ethernet magnetics' centre taps, so on a PoE-capable switch those pins can carry ~48-57 V — and this is by definition a wired-Ethernet gateway, so it is exactly the machine likely to be plugged into such a switch. Copper over J14 is checked for, not assumed.

Build state

ItemState
PartsBin project [18] + BOMdone — 11 lines
meshtasticd configverified on hardware — SX1262 comes up on the documented pinout
Device provisioning scriptrun against real hardware 2026-09-09 and fixed — three defects that aborted it under set -e (position.ok_to_mqtt is not a field; region/coordinate writes reboot the radio; mqtt.tls_enabled is rejected by meshtasticd). Admin key and all channel PSKs come from Vault
HAT PCBrev A, gerbers built, cleared to order 2026-08-12. Mechanically verified against the HAT spec and the Pi 3B+ (see below); 119 segments, 0 vias, DRC 0/0, ERC 0, 27/27 mechanical assertions, schematic netlist matches netlist.py. Fab package out/fab/meshgw-hat-revA-gerbers.zip. Exported on a recorded override — U1's land pattern still has not met a physical module. CHECK U1'S FIT BEFORE SOLDERING. See fab_gate.py
EnclosureDRAFT — all three parts render solid, dimensions not validated against a real Pi + HAT stack. Print coupon first
DeploymentLIVE 2026-09-09 — wired primary on meshgw.empire12.net, MQTT connected, map reporting on. MQTT is PLAINTEXT: meshtasticd rejects the whole MQTT config when tls_enabled is set

Bare boards were ordered with U1's land pattern unverified — on purpose

Don's call, 2026-08-12, recorded in fab_gate.py rather than laundered into a flag that claims the unknown was resolved. GEOMETRY_VERIFIED is still False; a separate GEOMETRY_OVERRIDE string permits the export and says who decided, when, and why. Six weeks from now "verified" and "we decided to risk it" are very different things to read.

The reasoning: boards are ~$2 and JLCPCB shipping is $6–25, so batching this into the same checkout as OSL, FD2, pool and Sentinel costs ~$2 marginal. Holding it back would pay that shipping charge again later with certainty. If the land pattern is wrong the loss is ~$2 of board plus one respin's shipping — cheaper in expectation than waiting, unless no further order is ever placed.

This is a real risk, not a formality. The E22 solders to castellated pads, so a wrong land pattern makes these boards scrap. That is unlike the Sentinel carrier, where the open items were modules on headers and a wrong guess costs a module rather than a respin.

When the module arrives, before any soldering: offer it up to the bare board. Check the 2.54 mm pitch, both irregular gaps (7.60 mm pin 19→20, 5.46 mm pin 21→22), and that the castellations land on the 1 mm of pad left outside the module body. Then set GEOMETRY_VERIFIED = True and clear GEOMETRY_OVERRIDE. The board silkscreens the same warning, because that is the object you will be holding at that moment.

Still to check before the parts go on

  1. The E22-900M30S land pattern, against the physical module (above). The footprint is internally self-consistent with its cited datasheet figures — pad count, first-pad offset, pitch, both irregular gaps and the pin ring direction were re-checked 2026-08-12 — but that only proves it was transcribed correctly, not that the source figures are right. Note the deliberate deviation: the land is 2.0 mm wide against a 0.80 mm castellation, centred on the body edge so 1 mm sits outside for a solder fillet. That is correct practice; do not "fix" it back to 0.80.
  2. Hand-check power-trace width. KiCad DRC has no current check. The E22 pulls ~650 mA peak on a 30 dBm TX burst; route.sh asks for 0.4 mm on +5V, which IPC-2221 puts at ~1.24 A on 1 oz external copper for a 10 °C rise — about 1.9x the peak. It is not wider because it cannot be: every +5V run has to thread the 1.04 mm gaps between the header's pads, and at 0.5 mm and 1.0 mm freerouting could not finish the board at all. If you want more margin, the honest fix is a second +5V path on B.Cu, not a bigger number in route.sh.
  3. Confirm the Pi's 5V rail holds through a TX burst. The E22 runs from 5 V, not 3V3 — the datasheet is explicit that ">=5.0 V ensures output power", and its SPI/control pins are 3.3 V logic so they land on the Pi's GPIO directly. A sagging rail during TX presents as terrible range, not as a power fault, which is why provision-meshgw.sh starts at tx_power 22 and leaves 30 for after the rail is proven.
  4. Check SMA vs RP-SMA on the pigtail against the antennas in stock.
  5. Swap C1 for a 10 V or 16 V part. The 1000 µF in stock is rated 6.3 V; on a 5 V rail that is ~26 % headroom, right at the usual 80 % derating limit, and the Pi's 5 V rail does not sit low. The C1 footprint (D8.0 mm, P3.50 mm) takes either.
  6. Print the enclosure coupon and offer it up to a real Pi 3B before committing to the ~4 h full base print.

Never power the E22 without an antenna attached. 1 W into an open circuit damages the PA.

Parts

9
QtyValueFootprintReferences
4—MountingHole:MountingHole_2.75mmH1, H2, H3, H4
2C_Disc_D5.0mm_W2.5mm_P5.00mmC_Disc_D5.0mm_W2.5mm_P5.00mmC2, C3
1CP_Radial_D8.0mm_P3.50mmCP_Radial_D8.0mm_P3.50mmC1
1E22-900M30SE22_900M30SU1
1RPi_GPIO40RPi_GPIO40_HorizontalJ1

Similar boards

  • 2 layers55 × 80 mmBoard esp32 v2, the printed circuit board in 3D

    Board esp32 v2

    sudomesh/disaster-radio

    A (paused) work-in-progress long-range, low-bandwidth wireless disaster recovery mesh network powered by the sun.

    101 parts1.1k
  • 2 layers40 × 40 mmIkoka nano meshtastic device, the printed circuit board in 3D

    Ikoka nano meshtastic device

    ndoo/ikoka-nano-meshtastic-device

    A Meshtastic device based on the Seeed Studio XIAO nRF52840 and EBYTE E22-XXXMXXS series LoRa modules. Pinout matches the Meshtastic xiaoble variant.

    22 parts104CERN-OHL-P-2.0
  • 6 layers144.8 × 106.7 mmLoriques, the printed circuit board in 3D

    Loriques

    skot/Loriques

    A solar powered Meshtastic LoRa gateway

    122 parts17CERN-OHL-S-2.0
  • 2 layers46.5 × 67 mmMesh Injection Apparatus v1 015, the printed circuit board in 3D

    Mesh Injection Apparatus v1 015

    paperclipsvinny/Meshtastic-Injection-Apparatus

    MIA - Meshtastic Injection Apparatus Tool for long range Pen testing

    13 parts9MIT
  • 2 layers31.1 × 94.2 mmMeshtasticStick, the printed circuit board in 3D

    MeshtasticStick

    Oliver0804/MeshtasticStick

    80 parts8
  • 4 layers101.5 × 43.6 mmAlcantara v.1.0, the printed circuit board in 3D

    Alcantara v.1.0

    zenitheesc/Alcantara

    Mobile Ground Station for stratospheric probe monitoring and rescue. Goes well with the Zenith Monitor app.

    90 parts5
  • 6 layers84.5 × 56 mmVLF4 PCB, the printed circuit board in 3D

    VLF4 PCB

    McMaster-Rocketry-Team/VLF4r2

    PCB schematics and layout for Void Lake Fusion 4 Avionics

    156 parts3
  • 2 layers40 × 40 mmIkoka NanoX, the printed circuit board in 3D

    Ikoka NanoX

    YuriySm/Ikoka-NanoX-Meshtastic-Device

    Small 1W LoRA on Seeed Studio XIAO nRF52840 PCB for Meshtastic (fork of Ikoka Nano)

    33 parts3GPL-3.0

Questions

How big is the Meshgw hat PCB?

It measures 65 × 56 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Meshgw hat use?

9 parts, built around the E22-900M30S. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Meshgw hat KiCad files?

From the d3athstr/mesh-internet-gateway repository on GitHub, at the commit this page was made from: the board is hardware/meshgw-hat/meshgw-hat.kicad_pcb and its schematic hardware/meshgw-hat/meshgw-hat.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Meshgw hat design in my own project?

Its repository states no licence, so its author keeps all rights: ask d3athstr before reusing the design.