Building a DIY smartphone from scratch bridges the gap between embedded Linux and telecommunications hardware. For this raspberry pi phone project, we are targeting the Raspberry Pi Zero 2 W (Rev 1.1) paired with a Waveshare SIM7600X 4G HAT. This combination provides a quad-core processor capable of running a lightweight GUI, while the cellular HAT handles LTE data, SMS, and basic dialing via AT commands over a high-speed USB interface.

Direct Answer: To build a functional 4G Pi phone, you need a Raspberry Pi Zero 2 W, a SIM7600X 4G HAT, a 3.5-inch SPI display, and a PiSugar 3 battery module. The code targets Raspberry Pi OS (Bookworm, 64-bit) and uses Python 3 with pyserial to communicate with the modem on /dev/ttyUSB2.

Project Overview & Difficulty Rating

ParameterSpecification
Target BoardRaspberry Pi Zero 2 W (Rev 1.1)
OS RequirementRaspberry Pi OS (Bookworm, 64-bit, Lite or Desktop)
Cellular ModuleSIMCom SIM7600X (Global 4G LTE Cat-4)
DifficultyIntermediate (Requires GPIO wiring, Linux serial config, Python)
Estimated Time3–4 hours (Hardware assembly + Software config)
Estimated Cost$110 – $140 USD (2026 street pricing)

Hardware BOM & Pin Mapping

Sourcing the exact variants matters here. The SIM7600X is the global version; if you buy the SIM7600G or SIM7600A, you will be locked to specific regional frequency bands. The PiSugar 3 Plus is mandatory for clean power delivery, as the SIM7600 can draw up to 2A peak during LTE transmission, which will brownout the Pi if powered directly from a standard USB wall wart.

Bill of Materials

  • Compute: Raspberry Pi Zero 2 W (with pre-soldered GPIO headers) — ~$20
  • Modem: Waveshare SIM7600X 4G HAT (includes LTE antennas and USB ribbon) — ~$65
  • Display: Waveshare 3.5" RPi LCD (SPI, ILI9486 driver, 480x320) — ~$22
  • Power: PiSugar 3 Plus for Pi Zero (1200mAh + RTC) — ~$25
  • Storage: 32GB MicroSD Card (SanDisk High Endurance) — ~$10
  • Audio: MAX98357A I2S Amplifier + 3W Speaker (Optional for voice) — ~$8
  • SIM Card: Active Nano-SIM (IoT or standard mobile plan)

GPIO Pin Mapping (Pi Zero 2 W to Peripherals)

Pi GPIO (BCM)Physical PinFunctionConnected To
GPIO 1812PWRKEY (PWM0)SIM7600X HAT (PWRKEY)
GPIO 47Modem StatusSIM7600X HAT (STATUS)
GPIO 8 (CE0)24SPI Chip Select3.5" LCD (CS)
GPIO 2522Display DC/RS3.5" LCD (DC)
GPIO 2418Display Reset3.5" LCD (RST)
GPIO 18 (PCM_CLK)12I2S Bit ClockMAX98357A (BCLK) *

* Note: Pin 18 is shared between the Modem PWRKEY and I2S BCLK in some audio setups. If using the MAX98357A for audio, route the PWRKEY to GPIO 17 (Physical 11) and update the Python code accordingly to avoid bus contention.

Step-by-Step Assembly & Wiring

  1. Prep the Pi Zero 2 W: Flash Raspberry Pi OS Bookworm (64-bit) using the Raspberry Pi Imager. Enable SSH and configure WiFi in the imager settings so you can access the board headlessly for initial setup.
  2. Attach the PiSugar 3: Slide the PiSugar 3 Plus onto the Pi Zero's GPIO header. Secure it with the included M2.5 standoffs. Do not power it on yet.
  3. Mount the SIM7600X HAT: Use the USB ribbon cable to connect the HAT's USB port to the Pi Zero's micro-USB data port (the inner port, not the PWR port). Secure the HAT over the PiSugar using the long M2.5 standoffs.
  4. Connect Antennas & SIM: Snap the two IPEX U.FL LTE antennas onto the MAIN and AUX ports on the HAT. Insert your active Nano-SIM into the push-push SIM tray. Never insert or remove the SIM while the board is powered.
  5. Wire the SPI Display: Connect the 3.5" LCD to the exposed GPIO pins using female-to-female jumper wires according to the pin mapping table above.
  6. Enable Serial & SPI: Boot the Pi, SSH in, and run sudo raspi-config. Go to Interface Options and enable SPI. Disable the serial console login, but keep the serial port hardware enabled.

Python Control Code for SMS & Dialing

The SIM7600X enumerates as multiple virtual serial ports. On Raspberry Pi OS, the AT command port is almost always /dev/ttyUSB2. The script below handles modem wake-up, signal verification, and sending an SMS. It includes robust error handling for serial timeouts and port enumeration failures.

import serial
import time
import sys
import RPi.GPIO as GPIO

# --- PIN DEFINITIONS & CONFIG ---
# Adjust PWRKEY_PIN if you moved it to GPIO 17 for I2S audio sharing
PWRKEY_PIN = 18  
STATUS_PIN = 4
SERIAL_PORT = '/dev/ttyUSB2'
BAUD_RATE = 115200
TIMEOUT = 5

GPIO.setmode(GPIO.BCM)
GPIO.setup(PWRKEY_PIN, GPIO.OUT)
GPIO.setup(STATUS_PIN, GPIO.IN)

def wake_modem():
    """Pulses the PWRKEY pin to turn on the SIM7600X radio."""
    if GPIO.input(STATUS_PIN) == GPIO.HIGH:
        print("[INFO] Modem already awake.")
        return
    print("[INFO] Pulsing PWRKEY to wake modem...")
    GPIO.output(PWRKEY_PIN, GPIO.HIGH)
    time.sleep(1.2)  # SIM7600 requires >1s pulse to power on
    GPIO.output(PWRKEY_PIN, GPIO.LOW)
    time.sleep(3)    # Wait for radio initialization

def send_at_command(ser, cmd, expected='OK', timeout=TIMEOUT):
    """Sends AT command and waits for expected response."""
    ser.reset_input_buffer()
    ser.write((cmd + '\r\n').encode('utf-8'))
    ser.flush()
    
    start_time = time.time()
    response = ''
    while (time.time() - start_time) < timeout:
        if ser.in_waiting:
            response += ser.read(ser.in_waiting).decode('utf-8', errors='ignore')
            if expected in response or 'ERROR' in response:
                break
        time.sleep(0.1)
    return response

def main():
    wake_modem()
    
    try:
        ser = serial.Serial(SERIAL_PORT, BAUD_RATE, timeout=TIMEOUT)
        print(f"[SUCCESS] Connected to modem on {SERIAL_PORT}")
    except serial.serialutil.SerialException as e:
        print(f"[FATAL] {e}")
        sys.exit(1)

    # Check Signal Quality
    csq_resp = send_at_command(ser, 'AT+CSQ')
    if '+CSQ: 99,99' in csq_resp:
        print("[WARNING] No signal. Check antennas or SIM provisioning.")
    else:
        print(f"[INFO] Signal response: {csq_resp.strip()}")

    # Send SMS
    phone_number = '+15550198765'  # Replace with target number
    message = 'Hello from the DIY Raspberry Pi Phone!'
    
    send_at_command(ser, 'AT+CMGF=1')  # Set SMS to text mode
    send_at_command(ser, f'AT+CMGS="{phone_number}"', expected='>')
    
    # Send message body followed by Ctrl+Z (ASCII 26)
    ser.write((message + chr(26)).encode('utf-8'))
    ser.flush()
    time.sleep(2)
    sms_resp = ser.read(ser.in_waiting).decode('utf-8', errors='ignore')
    
    if '+CMGS:' in sms_resp:
        print("[SUCCESS] SMS sent successfully.")
    else:
        print(f"[ERROR] SMS failed. Modem said: {sms_resp}")

    ser.close()
    GPIO.cleanup()

if __name__ == '__main__':
    main()

Debugging: "Modem Not Responding" & Common Failures

When working with cellular HATs, you will inevitably hit a wall where the Pi cannot talk to the modem. The most common fatal error string you will see in the terminal is:

serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyUSB2: [Errno 2] No such file or directory: '/dev/ttyUSB2'

If you encounter this, or if the modem powers on but returns +CSQ: 99,99 (zero signal), run through these first three things to check:

  1. Verify USB Enumeration (lsusb): Run lsusb in the terminal. You must see Qualcomm / SIMCom SIM7600. If it is missing, your USB ribbon cable is likely unseated or defective. The micro-USB port on the Pi Zero is fragile; ensure the cable is pushed in fully.
  2. Check Kernel Port Assignment (dmesg): Run dmesg | grep ttyUSB. The SIM7600 creates multiple ports (usually 0 through 3). If the kernel assigned the AT port to /dev/ttyUSB3 instead of 2, update the SERIAL_PORT variable in the Python script.
  3. Verify the PWRKEY Pulse: The SIM7600X does not turn on its cellular radio simply by applying 5V power. It requires a hardware pulse on the PWRKEY pin. If your GPIO wiring is loose, or if you forgot to run the wake_modem() function, the modem remains in a dormant state and will drop all serial connections.
Permissions Gotcha: If you get a [Errno 13] Permission denied error, your user is not in the dialout group. Fix this permanently by running: sudo usermod -a -G dialout $USER and then rebooting the Pi.

Extending and Simplifying the Build

How to Simplify: If the 3.5-inch SPI screen and GUI setup are causing framerate bottlenecks or SPI bus conflicts, drop the screen entirely. Run the Pi headless and interface with the phone via a Telegram Bot API script. The Pi Zero 2 W can easily run a Python Telegram bot that forwards incoming SMS (read via AT+CMGL) to your main smartphone, effectively turning the build into a remote SMS/2FA gateway rather than a handheld phone.

How to Extend: To add true two-way voice calling, the SIM7600X's internal audio codec must be routed to an external speaker and microphone. The HAT exposes PCM audio pins. You can extend this build by wiring a WM8960 I2S audio codec board to the Pi's I2S pins, then using ALSA (Advanced Linux Sound Architecture) to bridge the Pi's audio output to the modem's PCM interface. Alternatively, bypass the cellular voice network entirely: use the LTE data connection to run a lightweight SIP client (like Linphone) for VoIP calling over 4G data, which yields vastly superior audio quality compared to standard 3G/4G circuit-switched voice.

Raspberry Pi Phone Project FAQ

Can I use a Raspberry Pi 4 or 5 for this phone project?

Yes, but it is not recommended for a handheld form factor. The Raspberry Pi 4 and 5 draw significantly more baseline current (2.5A to 5A peak) compared to the Pi Zero 2 W. Finding a battery HAT that can sustain a Pi 5 while simultaneously supplying the 2A peak TX burst of a 4G modem requires a massive, heavy LiPo pack and a high-discharge BMS. Stick to the Pi Zero 2 W or the original Pi Zero W for mobile, battery-powered cellular projects.

Does the SIM7600 HAT support VoLTE for voice calls?

Hardware-wise, the SIM7600X supports VoLTE. However, enabling it requires your carrier to provision the SIM's IMSI specifically for VoLTE on their network, and you must upload the correct MBIM/AT carrier configuration files to the modem's NVRAM. For most DIY makers, standard circuit-switched fallback (CSFB) to 3G/2G is easier to get working for voice, though many global carriers are shutting down 3G networks, making VoLTE configuration a necessary, albeit complex, hurdle in 2026.

How long will the 1200mAh PiSugar battery last on this Pi phone?

With a 1200mAh PiSugar 3 Plus, expect roughly 2.5 to 3 hours of active use (screen on, LTE data transmitting). If the Pi is idling with the screen off and the modem registered to the network (listening for SMS), you can stretch this to about 6 hours. For a true all-day smartphone experience, you must design a custom backplate housing a 3000mAh+ flat LiPo cell and use a dedicated UPS HAT like the PiSugar 3 Pro or a custom TP4056-based power management circuit.

Do I need a special carrier plan for a DIY Raspberry Pi phone?

No, you do not need a specialized IoT plan if you just want to test SMS and basic data. Any standard prepaid Nano-SIM from a major MVNO (like Mint Mobile, Lycamobile, or local equivalents) will work perfectly for data and SMS. However, if you plan to use this device permanently as an automated SMS gateway or remote sensor node, an IoT-specific SIM (like Hologram or Twilio Super SIM) is better, as they offer pay-as-you-go data pricing and global roaming without the aggressive deprioritization that consumer phone plans apply to non-smartphone IMEIs.