adafruits raspberry pi lesson 5 using a console cable

14
Adafruit's Raspberry Pi Lesson 5. Using a Console Cable Created by Simon Monk

Upload: samir-tabib

Post on 13-Apr-2015

36 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Adafruits Raspberry Pi Lesson 5 Using a Console Cable

Adafruit's Raspberry Pi Lesson 5. Using a Console CableCreated by Simon Monk

Page 2: Adafruits Raspberry Pi Lesson 5 Using a Console Cable

234457

1012

Guide Contents

Guide ContentsOverviewYou Will Need

PartSoftware Installation (Mac)Software Installation (Windows)Connect the LeadTest & Configure

© Adafruit Industries http://learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable

Page 2 of 14

Page 3: Adafruits Raspberry Pi Lesson 5 Using a Console Cable

Overview

In this lesson you will learn how to remote control your Raspberry Pi with a console cable.

The great advantage of connecting this way is that it can even supply the power for your Pi andyou do not need keyboard, mouse or display attached to the Pi to log into it.

You will need to install terminal emulation software (ZOC) and also USB drivers for the ConsoleLead. ZOC is available for Mac and Windows and allows you to communicate through a serialport from your Mac or PC to another computer – in this case the Raspberry Pi.

The Raspberry Pi uses its built-in serial port to allow devices to connect to its console and issuecommands just as if you were logged in.

In the next lesson, we will look at another way of doing much the same thing but over a localnetwork using something called SSH.

© Adafruit Industries http://learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable

Page 3 of 14

Page 4: Adafruits Raspberry Pi Lesson 5 Using a Console Cable

You Will Need

To follow this lesson, you will need:

Part

Raspberry Pi

Adafruit ConsoleLead https://www.adafruit.com/products/954

© Adafruit Industries http://learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable

Page 4 of 14

Page 5: Adafruits Raspberry Pi Lesson 5 Using a Console Cable

Software Installation (Mac)

Install ZOC for Mac, you can download it from here:http://www.emtec.com/zoc/index.html (http://adafru.it/aTT)

Now fetch the installer package for the USB drivers from here:http://sourceforge.net/projects/osx-pl2303. (http://adafru.it/aWQ)

If using Lion, try this driver here http://changux.co/osx-installer-to-pl2303-serial-usb-on-osx-lio (http://adafru.it/aWR)

Both downloads are standard Mac installers. Accept all defaults when prompted.

© Adafruit Industries http://learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable

Page 5 of 14

Page 6: Adafruits Raspberry Pi Lesson 5 Using a Console Cable

© Adafruit Industries http://learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable

Page 6 of 14

Page 7: Adafruits Raspberry Pi Lesson 5 Using a Console Cable

Software Installation (Windows)

Download and install ZOC from here:http://www.emtec.com/zoc/index.html (http://adafru.it/aTT)

The download is an installer program that you can save to the Desktop or some otherconvenient location and run to install ZOC. During installation, the ZOC installer will ask you anumber of questions. Accept all the defaults, including the question below.

Install PL2303 Drivers from here: http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=225&pcid=41 (http://adafru.it/aTV)

This will save a zip file called “PL2303_Prolific_DriverInstaller_v1_7_0.zip”. Unzip this onto thedesktop and within the folder run the installer called “PL2303_Prolific_DriverInstaller_v1.7.0.exe”.

© Adafruit Industries http://learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable

Page 7 of 14

Page 8: Adafruits Raspberry Pi Lesson 5 Using a Console Cable

The driver is installed in such a way that when you later plug in the USB console lead, it will stilllaunch the “Found New Hardware” wizard. If you allow the Wizard to search the Internet andinstall it should work.

© Adafruit Industries http://learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable

Page 8 of 14

Page 9: Adafruits Raspberry Pi Lesson 5 Using a Console Cable

When it has finished installing the driver, you should get this message:

© Adafruit Industries http://learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable

Page 9 of 14

Page 10: Adafruits Raspberry Pi Lesson 5 Using a Console Cable

Connect the Lead

The Console lead has four female connections that can be plugged directly onto the GPIOheader of the Raspberry Pi.

For this experiment, the serial lead is going to power the Raspberry Pi. So, DO NOT attach thePi's USB power adapter. If you would rather power the Pi from your USB power adapter thenleave the Red lead from the Serial lead un attached.

The important thing here is to only power it from one source, the USB power adaptor or theConsole Lead BUT NOT BOTH.

Attach the leads as shown below:

The connections are to the outside pin connections of the GPIO header. See Lesson 4, for moreinformation about the header: http://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/the-gpio-connector (http://adafru.it/aTW)

© Adafruit Industries http://learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable

Page 10 of 14

Page 11: Adafruits Raspberry Pi Lesson 5 Using a Console Cable

The red lead should be connected to 5V, The black lead to GND, The white lead to TXD.The green lead to RXD.

Check the diagram below if you are not sure about the connections. But note that the connectis being viewed upside down, so rotate the diagram by 180 degrees to compare it with thephotograph.

Now plug in the USB lead and you will see the Pi's power LED should light.

© Adafruit Industries http://learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable

Page 11 of 14

Page 12: Adafruits Raspberry Pi Lesson 5 Using a Console Cable

Test & Configure

Start ZOC. The instructions below are for Mac, but its just the same as using ZOC on Windows,except the icons look a bit different.

When ZOC starts it will open the quick connection profile below:

Cancel this and from the Options menu, select the option 'Edit Session Profile'.

Click on 'Devices' on the left and then 'Serial/Direct'.

Change the baud rate to 115200 and click the scan button to find the serial port for the USBConsole adapter. On a Mac, this will have a name something like “/dev/cu.PL2303-00401124”,on Windows it may just be called “COM7” but it will probably be the only serial port in the list.

Also change both RTS and DTR to be off. When its all changed, it should look like this:

© Adafruit Industries http://learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable

Page 12 of 14

Page 13: Adafruits Raspberry Pi Lesson 5 Using a Console Cable

Now click “Save” and then click the Quick Connection icon and select “Serial/Direct” from theconnection type.

Press Connect and the communication should start with a prompt from the Raspberry Pi for youto log on.

For a new installation of Occidentalis or Wheezy, the default username is “pi” and the defaultpassword is “raspberry”.

If you are using Windows, it will look more like this:

© Adafruit Industries http://learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable

Page 13 of 14

Page 14: Adafruits Raspberry Pi Lesson 5 Using a Console Cable

Thats it! You are connected and can use the command line to navigate around your Pi.

In the next session we will look at using SSH as another means of connecting to your Pi overyour local network.

© Adafruit Industries Last Updated: 2013-01-25 03:00:21 PM EST Page 14 of 14