Connect cellular module over Raspberry Pi UART

Connect a Quectel module on the Base HAT to the Raspberry Pi UART instead of USB: close the solder jumpers, enable the UART and test it with AT commands.

Show steps for

Over the UART the module serves AT commands and PPP; QMI and ECM need USB. The Base HAT has one UART, so only one of internet (PPP), SMS and GNSS works at a time: use USB for GNSS. PPP over the UART is limited by the UART speed of the Raspberry Pi.

Requirements

Assemble the Base HAT first, as in Get started with Base HAT.

Required

Hardware

  • Base HAT with a module that has a UARTThe module needs RX and TX on mini PCIe pins 11 and 13, as the Quectel modules have. Telit modules cannot use the UART of the Base HAT.
  • Soldering ironTo close the solder jumpers SJ7 and SJ8.

Software

Connect UART of HAT

  1. Check module pins

    The UART of the module must be on mini PCIe pins 11 (RX) and 13 (TX):

  2. Solder SJ7 and SJ8

    The two jumpers on the bottom of the HAT are open by default. Remove the power, then close each jumper with solder; do not connect SJ7 to SJ8.

    All solder jumpers: Base HAT hardware reference.

Enable UART of Raspberry Pi

  1. Open raspi-config

    sudo raspi-config
  2. Open Serial Port settings

    Select Interface Options, then Serial Port.

  3. Turn serial login shell off

    At Would you like a login shell to be accessible over serial?, answer No.

  4. Turn serial port hardware on

    At Would you like the serial port hardware to be enabled?, answer Yes.

  5. Exit and reboot

    sudo reboot

The Raspberry Pi documentation describes the UARTs of each model: Configure UARTs.

Find port

Verify

Open the port at 115200 baud with hardware flow control off, and send AT. The module answers OK:

Details

Legacy boards: Cellular IoT HAT and Cellular IoT Application Shield

The Cellular IoT HAT and the Cellular IoT Application Shield are end-of-life products. Their Quectel BG96 module has three UARTs, already connected to the Raspberry Pi header; no jumper is needed. The Application Shield and the Cellular IoT HAT Worldwide version (v1.1.0) use one; the Cellular IoT HAT North American version (v1.3.0) uses two:

Header pinsUse
8, 10AT commands
33, 32GNSS

Enable the UART of the Raspberry Pi as in Enable UART of Raspberry Pi, turn the module on with the POWER button (about 2 s) and test with Minicom on the same port. With one UART, only one of internet, SMS and GNSS works at a time.

Troubleshooting

Check the solder jumpers SJ7 and SJ8, that the module is a UART module, and the port. More checks: Base HAT troubleshooting.

Next steps