Skip to content

4. Enable UART0 to get an extra port

Matias Andina edited this page Feb 24, 2023 · 1 revision

Enabling Serial Communication on UART0 in Raspberry Pi

The Raspberry Pi comes with a built-in Universal Asynchronous Receiver-Transmitter (UART) hardware module. The UART allows for serial communication, which is a common way to communicate between electronic devices. In this guide, we will show you how to enable serial communication on UART0 in a Raspberry Pi.

An advantage of using this port is that it makes FEDWatcher compatible with other RPi HATs, which might leave the UART0 exposed for login/debugging. We are using this method with this ANAVI LIGHT hat.

Prerequisites

Before getting started, make sure you have the following:

  • A Raspberry Pi that you have access to (either directly, through remote desktop or terminal)
  • Jumpers that you can connect from the FED3 BNC/audio jack output into the proper RPi Pins (NOTE: This is currently not possible if using the RPi HAT with 4 ports).

Step 1: Open raspi-config

The first step is to open raspi-config. This is a configuration tool that comes with the Raspberry Pi operating system. You can open it by running the following command in a terminal window:

sudo raspi-config

Step 2: Navigate to Interfacing Options

Use the arrow keys on your keyboard to navigate to "Interfacing Options" and press Enter.

Interfacing Options

Step 3: Enable Serial

In the "Interfacing Options" menu, navigate to "Serial" and press Enter.

Serial

You will be asked whether you want a login shell to be accessible over serial. Select "No" and press Enter.

Login Shell

You will then be asked whether you want the serial port hardware to be enabled. Select "Yes" and press Enter.

Serial Port Hardware

Step 4: Exit raspi-config and Reboot

Use the arrow keys to navigate to "Finish" and press Enter. You will be prompted to reboot your Raspberry Pi for the changes to take effect. Select "Yes" and press Enter.

Step 5: Connect your FED3 to UART0

Connect the USB to serial cable to your Raspberry Pi. The cable should have two wires: RX (receive) and GND (ground). Connect the RX wire to GPIO pin 10 on the Raspberry Pi, and the GND wire to any GND pin.

Step 6: Test the Serial Connection

You can run fedwatcher normally to test!