Using PuTTY and USB_TTL to Connect to a Raspberry Pi




100 Points
Learning Objectives

USB TTL connection to raspberry piUSB TTL to Raspberry Pi

These instructions will show you how to use the PuTTY client and a USB TTL cable to connect to a Raspberry Pi.
Reference: https://learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable/overview
This software allows you to run a terminal window (CLI) on a Raspberry Pi over a network using your laptop.
This 'remote access' technology has revolutionized the way IT professionals work, allowing them to access numerous devices all over the world from their computer.
More information on PuTTY is available online.
Being able to use this software will greatly simplify working with the Raspberry Pi, Arduino UNO and micro:bit.

After completing this assignment you will be able to:

  1. Connect to the Raspberry Pi using a USB_TTL cable and PuTTY
  2. Issue commands to the Raspberry Pi from your laptop using PuTTY
  3. Update/upgrade the Raspberry Pi from your laptop using PuTTY

Assignment Overview
This assignment reviews basic computer concepts that you will need in this course and throughout your career.

You are expected to have a working knowledge of SBC hardware and software.
If you do not understand how to use an item, perform a Google Search, refer to the WSU Technology Knowledge Base,  ask a teaching assistant, or ask the instructor.


Exercise 1-Install PuTTY

Refer to IOTPi03 for installing and configuring PuTTY
This assignment builds on IOTP03, and shows how to use a USB cable that contains a TTL chipset that connects to GPIO pins on a Raspberry Pi, then allows you to establish a terminal session.

Need to rewrite instructions from here on, PgP, 8/12/2019. Renumber this assignment...

comm port infoRetrieve Comm Port Info

PuTTY Serial SettingsPuTTY Serial Settings

PuTTY loginPuTTY Log In

After this it is just like an SSH session from IOTP03

PuTTY serial sessionPuTTY Serial Session



  1. These steps are performed on your laptop.
  2. Open a browser to: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
  3. Download and save the latest (.72 or above) 64-bit Windows version of PuTTY to your ' ' folder.
  4. Use File Explorer, find the PuTTY install file, and double-click to install the program.
  5. During the install of PuTTY accept all of the default settings.
  6. Press the Windows key and type: putty , then press the ' Enter' key to start PuTTY.
  7. The first time PuTTY starts, there are no connections, so it looks like this:

    VNC ViewerPuTTY


Exercise 2-Boot the Raspberry Pi
  1. These steps are performed on your Raspberry Pi.
  2. Install the flash drive into the slot on the Raspberry Pi.
    For this exercise you will not need a USB keyboard and mouse, unless you run into problems later.
  3. Turn on the power and allow the Raspberry Pi to boot up.
  4. On the monitor press the colored dot to display the Pi desktop.
    Because you do not have a keyboard and mouse (input devices) connected to the Raspberry Pi, you need another way to interact with it.
    This is where the need arises to run PuTTY.
    And this is why you enabled SSH (Securce SHell) when you originally configured your Raspberry Pi.
  5. Your Raspberry Pi desktop should appear after about 30 seconds.
    If the desktop does not appear, see a teaching assistant or the professor.

Exercise 3-Start PuTTY
  1. These steps are performed on your laptop.
  2. If PuTTY is not running, start it per the instructions in Excercise 1.
  3. In the 'Host Name (or IP address)' box at the top, enter the IP address of your Raspberry Pi that you saved from your previous assignment.
    Make sure that 'Port' is set to '22' and
    the 'Connection type:' is 'SSH' enter RPi IP addressPuTTY Session-your IP address WILL be different

  4. In the 'Saved Sessions' box type in a session name such as 'Raspberry Pi', then click the Save butotn.
  5. Click the Open button and a Secutiy Alert window will appear-click Yes.
    logon to RPiSecurity Alert

  6. In the PuTTY session window you will be prompted to login, enter
    username: pi
    password: MagicMirror%
    No feedback is provided as you type your password. Press the Enter key, and you are logged in.
    logon to RPiLogged In to PuTTY Session

  7. There is no graphical user interface in PuTTY, you must type in all commands.
    If you need help, simply type in 'help' and press enter to see a list of available commands.
  8. Periodically, at least weekly, update your Raspberry and apply the latest program patches and security fixes by typing in the following commands, pressing Enter after each one:
    sudo apt-get update
    sudo apt-get upgrade You will be prompted to continue, press 'y'
    During this process read and comprehend any messages.
    Depending on how much updating is being done, it may take a while.
    If something goes wrong, there will be an explanation of how to proceed.
    See a teaching assistant or professor for help.
    RPi updateUpdate Raspberry Pi-your messages will be different

  9. In the PuTTY window install the Matrix program
    Enter the following text, then press the enter key:
    sudo apt-get install cmatrix
  10. After cmatrix is installed, type in, then press the enter key:
    cmatrix
    You will see a matrix program running on the Raspberry Pi.
    Press the q key to quit the program, and return to PuTTY.
    Feel free to explore the available options.
    reference: http://reefwingrobotics.blogspot.com/2017/01/raspberry-pi-console-matrix-screensaver.html
  11. Type cmatrix -h and press enter to view the command line options.

  12. Type cmatrix -b -s and press enter to see the program start with bold font characters, and ???
    cmatrixcmatrix running, press any key...

  13. Press any key to return to the PuTTY window.
    You are going to take a screen shot of this window for the next exercise.

Exercise 4-ScreenShot

Use the Snipping Tool on your laptop to take a screenshot of the PuTTY window from the previous exercise.
Your screen shot will look something like this:
Sample Screen Shot of PuTTY windowPuTTY Window Sample Screen Shot

Save the screenshot as "IOTP03" in your ' ' folder.


ScreenShot IOTP03


Upload Screenshot

Submit to the appropriate D2L Assignment folder a screenshot that documents your work.


(90) 1. Upload your screenshot to the 'IOTP03' D2L Assignment Folder.


Submit Assignment

When all tasks are completed press the Submit button.


(10) 2. Assignment submission


-- WHEN DONE --
SHUTDOWN THE RASPBERRY PI
TURN OFF THE POWER
REMOVE YOUR FLASH DRIVE