Raspberry Pi: attach a serial console

For a Raspberry Pi with GPIO pins (B, B+, 2, 3):

  1. Connect as follows:
  2. Append this line at the end of /boot/config.txt:
  3. Access the console from your workstation like this:
    sudo screen /dev/ttyUSB0 115200


For Raspberry Pi without pins (Pi Zero, Pi Zero W):

  1. Add the following line at the end of /boot/config.txt:
  2. Insert the following between ‘rootwait‘ and ‘quiet‘ in /boot/cmdline.txt:
  3. Mount the linux part of the Pi SD card and add the following lines at the end of /etc/rc.local, before ‘exit 0’:
    if [ ! $(systemctl is-enabled "${usbconsole}") ]
    echo "Enabling and starting ttyGS0 console..."
    systemctl enable "${usbconsole}"
    systemctl start "${usbconsole}"
  4. Connect a micro usb cable into the socket market ‘USB‘ on the Pi, not the one marked ‘PWR’.
  5. On your workstation, console can be accessed as:
    sudo screen /dev/ttyACM0 115200


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s