Software-based remote management is convenient until the local network drops or the operating system kernel panics. While the official Raspberry Pi Connect remote access service is excellent for traversing NAT firewalls over standard internet, it relies entirely on the host OS and the primary network interface being alive. When you deploy a Pi in a remote cabin, an agricultural site, or an industrial cabinet, you need hardware-level out-of-band access.
This wiring diagram walkthrough details how to physically wire a 4G LTE cellular HAT alongside a UART serial debug header on a Raspberry Pi 5. This setup guarantees you can issue AT commands to the modem or drop into a root serial shell even if the primary WiFi/Ethernet and Raspberry Pi Connect services are completely unresponsive.
Understanding the Diagram Symbols and Physical Terminals
Before stripping wires, you need to translate the schematic symbols to the physical silkscreen on your boards. In embedded wiring diagrams for remote access, you will encounter four primary node types:
- VCC / 5V: The positive voltage supply. On the Pi 5 40-pin header, this is strictly 5V DC. (Note: The Pi 5 also has a 3.3V output on Pin 1, but cellular HATs require the higher current capacity of the 5V rail).
- GND (Ground): The 0V reference return path. Represented by a circle with a vertical line or a downward-pointing triangle. Never assume ground is shared unless physically wired.
- TXD (Transmit Data): The pin that sends serial data out.
- RXD (Receive Data): The pin that listens for incoming serial data.
The Raspberry Pi 5 GPIO and UART pins operate at exactly 3.3V logic. Feeding a 5V signal from a cheap USB-to-serial adapter or an unregulated RS232 module into the Pi's RXD pin will permanently destroy the BCM2712 SoC. Always verify your HAT has onboard logic-level shifting or operates natively at 3.3V before connecting data lines.
Terminal and Pin Mapping Table
The following spec-sheet-table maps the physical Raspberry Pi 5 40-pin header to a standard SIM7600X-based 4G HAT. This mapping ensures the primary UART (/dev/ttyAMA0) is correctly routed for the serial console.
| Pi 5 Pin # | BCM GPIO | Function | 4G HAT Terminal | Wire Color (Std) | Notes / Constraints |
|---|---|---|---|---|---|
| Pin 2 | N/A | 5V Power | 5V / VCC | Red | Main power feed for HAT regulator |
| Pin 4 | N/A | 5V Power | 5V / VCC (Alt) | Red | Use if HAT requires dual 5V injection |
| Pin 6 | N/A | Ground | GND | Black | Primary 0V return path |
| Pin 8 | GPIO 14 | TXD0 (Transmit) | RXD / RX | Yellow | Data leaves Pi, enters HAT |
| Pin 10 | GPIO 15 | RXD0 (Receive) | TXD / TX | Orange | Data leaves HAT, enters Pi |
Node-by-Node Wiring Trace (Source to Load)
A proper wiring trace follows the current and data from the source to the load, and back via the ground path. Follow these numbered steps exactly to wire the remote access fallback circuit.
- The 5V Power Feed (Source to Load): Current originates from your 5V/5A USB-C power supply, enters the Pi 5, and is routed to the 40-pin header. Connect a red jumper wire from Pi Pin 2 (5V) to the HAT 5V IN terminal. The HAT's onboard buck converter (the load) will step this down to the 3.8V-4.2V required by the cellular modem's RF amplifier.
- The Ground Return (Polarity Reference): Connect a black jumper wire from Pi Pin 6 (GND) to the HAT GND terminal. This establishes the shared 0V equipotential reference. Without this explicit ground wire, the UART data lines will float, resulting in garbage characters on your serial console.
- The UART Data Cross-Over (Pi to HAT): Data transmission requires a cross-over. The Pi's transmit pin must talk to the HAT's receive pin. Connect a yellow wire from Pi Pin 8 (TXD0) to the HAT RXD terminal.
- The UART Data Cross-Over (HAT to Pi): Connect an orange wire from HAT TXD to Pi Pin 10 (RXD0). Double-check this step. Swapping TX and RX is the most common reason a hardware remote access setup fails to yield a login prompt.
- Software Configuration: To enable the serial console on the Pi 5, you must add
enable_uart=1to theconfig.txtfile on the boot partition, and ensureconsole=serial0,115200is present incmdline.txt. This allows you to bypass SSH entirely and log in via a physical serial terminal or the 4G HAT's virtual serial port.
Unlike the Pi 4, the Raspberry Pi 5 features a dedicated 3-pin JST UART debug connector near the USB-C power port. If your 4G HAT blocks the 40-pin header, you can use this dedicated debug port (Pin 1: GND, Pin 2: RXD, Pin 3: TXD) for your serial console fallback, leaving the main GPIO header free for the HAT's power and control pins.
Verifying Connections with a Multimeter
Never apply power to a newly wired embedded system without bench-testing it first. Set your multimeter to the correct modes and verify the physical layer.
Step 1: Dead Circuit Continuity Test (Power OFF)
With the Pi completely unplugged from the wall, set your multimeter to Continuity mode (the diode/sound wave symbol).
- Ground Path: Place one probe on the metal shield of the Pi's USB-C port (which is tied to system ground) and the other on the HAT's GND pin. You should read < 1.0 Ω and hear a beep. If it reads OL (Open Loop), your ground wire is broken or not seated.
- Data Lines: Probe Pi Pin 8 and HAT RXD. Verify continuity. Probe Pi Pin 10 and HAT TXD. Verify continuity. Ensure there is no continuity between Pin 8 and Pin 10 (which would indicate a short between TX and RX).
Step 2: Live Voltage Verification (Power ON)
Plug in the Pi and let it boot. Set your multimeter to DC Voltage (20V range).
- 5V Rail: Black probe on HAT GND, Red probe on HAT 5V IN. You must read between 4.9V and 5.1V. If it reads 4.6V or lower, your power supply is browning out under the Pi 5's baseline load, and the 4G modem will fail to register on the cellular network when it attempts its 2A RF transmit burst.
- 3.3V Logic Check: If your HAT breaks out a 3.3V reference pin, measure it against GND. It must read exactly 3.25V to 3.35V. If you measure 5V here, unplug immediately—the HAT's logic level shifter has failed and is feeding lethal voltage to the Pi's RXD pin.
Frequently Asked Questions
How do I maintain Raspberry Pi Connect remote access if the main network drops?
Raspberry Pi Connect remote access relies on the primary network interface (wlan0 or eth0) having an active route to the internet. If your primary ISP drops, the Connect service will show the device as offline. By wiring a 4G HAT as a secondary interface (e.g., usb0 or wwan0) and configuring systemd-networkd or NetworkManager with a higher metric for the cellular interface, the Pi will automatically failover to the 4G network. Once the cellular link is up, the Raspberry Pi Connect daemon will re-establish its secure tunnel, restoring your remote GUI and terminal access.
Can I use a serial console for Raspberry Pi Connect remote access fallback?
Not directly, because Raspberry Pi Connect is a software service that requires the OS to be fully booted and networked. However, the UART serial console you wired in this diagram serves as the ultimate hardware fallback. If the OS kernel panics or the networking stack crashes (preventing Pi Connect from loading), you can dial into the 4G HAT's secondary virtual serial port via a cellular terminal connection, or plug a physical USB-to-TTL adapter into the UART pins to access the root shell, diagnose the crash logs, and reboot the system.
Why does my serial console show garbage characters instead of a login prompt?
This is almost always a baud rate mismatch or a missing ground reference. The Raspberry Pi serial console defaults to 115200 baud. Ensure your terminal emulator (like PuTTY or screen) is set to 115200-8-N-1. If the settings are correct but you still see symbols like ÿÿÿ or random squares, your ground wire (Pin 6) is loose, causing the voltage thresholds on the TX/RX lines to drift. Re-seat the GND jumper and verify continuity with your meter.
What happens if I swap TX and RX on the remote access debug header?
If you connect Pi TXD to HAT TXD, and Pi RXD to HAT RXD, the circuit will not short out, but it will be completely silent. Both devices will be "talking" on the same wire and "listening" on an empty wire. You will see the transmit LED on your USB adapter blink, but your terminal screen will remain blank. Simply swap the yellow and orange wires at the HAT terminals to fix the cross-over.






