{"id":4,"date":"2017-01-16T07:37:05","date_gmt":"2017-01-16T07:37:05","guid":{"rendered":"http:\/\/courses.haigarmen.com\/intd320\/?p=4"},"modified":"2017-01-31T12:31:19","modified_gmt":"2017-01-31T20:31:19","slug":"raspberrypi-01-console-cable","status":"publish","type":"post","link":"https:\/\/courses.haigarmen.com\/intd320\/raspberrypi-01-console-cable\/","title":{"rendered":"RaspberryPi 01: Console Cable"},"content":{"rendered":"<div id=\"story\" class=\"story\" data-id=\"807065395\" data-words=\"571\">\n<article>\n<h2>Overview<\/h2>\n<p>Despite having four full sized USB ports and one micro USB port (for power), you can\u2019t connect to your Raspberry Pi from your computer via USB (without additional hardware).<\/p>\n<p>You can however connect to your Raspberry Pi via a \u201cUSB to TTL Serial Cable\u201d, also sometimes called a <strong>Console Cable<\/strong>. This cable allows you to access the command line of your Raspberry Pi, by plugging the USB end into your computer and the other end into specific serial GPIOs on the Raspberry Pi.<\/p>\n<p>For the most current information on Connecting with the Console look here.\u00a0<a href=\"http:\/\/elinux.org\/RPi_Serial_Connection\">http:\/\/elinux.org\/RPi_Serial_Connection<\/a><\/p>\n<pre><strong>Note for RaspberryPi 3:<\/strong>\r\nAdd the following\u00a0two lines in config.txt file on your RPi SD Card:\r\ndtoverlay=pi3-disable-bt\r\nenable_uart=1<\/pre>\n<h2>What you\u2019ll need<\/h2>\n<p>For this exercise you\u2019ll need a console cable:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.sparkfun.com\/products\/12977\">USB to TTL Serial Cable<\/a><\/li>\n<\/ul>\n<p><em><strong>Caveat<\/strong>: Make sure your computer delivers at least 500 mA (milliamps) at 5 V (Volts). This will assure you that your RPi will receive the power it needs otherwise there\u2019s a chance you\u2019ll fry your Pi!<\/em><\/p>\n<h2>Software Installation (Mac)<\/h2>\n<p>Mac OS X includes a Terminal (inside \/Applications\/Utilities\/), so the only other software you need to install is the drivers for the cable.<\/p>\n<p>You can <a href=\"http:\/\/www.prolific.com.tw\/US\/ShowProduct.aspx?p_id=229&amp;pcid=41\">download the Mac drivers here<\/a>.<\/p>\n<h2>Software Installation (Windows)<\/h2>\n<p>Windows does not include a Terminal application that you can use to connect over serial.<\/p>\n<p>For this workshop we\u2019ll use Putty. You can get the \u201cputty.exe\u201d app from the <a href=\"http:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/download.html\">putty<\/a>website.<\/p>\n<p>Download the one called \u201cPuTTY\u201d under <em>For Windows on Intel x86<\/em> (<a href=\"http:\/\/the.earth.li\/~sgtatham\/putty\/latest\/x86\/putty.exe\">direct link<\/a>).<\/p>\n<p>Putty downloads as an uncompressed binary.<\/p>\n<p>Now that you\u2019ve got Putty, you\u2019ll also need to install the\u00a0<a href=\"http:\/\/www.prolific.com.tw\/US\/ShowProduct.aspx?p_id=225&amp;pcid=41\">cable drivers here<\/a>.<\/p>\n<h2>Software Installation (Linux)<\/h2>\n<p>Assuming you\u2019re running a v2.6 kernel or later you shouldn\u2019t need to install drivers for the cable. If you find that your distribution doesn\u2019t have the drivers installed you can <a href=\"http:\/\/www.ftdichip.com\/FTDrivers.htm\">download the drivers from the FTDI website<\/a>.<\/p>\n<p>You may also need to install <em>screen<\/em>. The <code>screen<\/code> command (some Linux distributions such as Ubuntu 12.10 don\u2019t include the <em>screen<\/em> software). To see if you\u2019ve got <em>screen<\/em> installed type <code>screen<\/code> and if you get an error install <em>screen<\/em> by running: <code>sudo apt-get install screen<\/code>.<\/p>\n<h2>Connecting the cable<\/h2>\n<p>The console cable handily provides the name of the line on the side of the terminal header.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd300\/files\/2016\/11\/console-cable-breakout-2.jpg\" \/><\/p>\n<p>Connect the console cable to the following pins:<\/p>\n<ul>\n<li>DC \u2192 RPi Pin 02 (DC Power 5V)<\/li>\n<li>GND \u2192 RPi Pin 06 (Ground)<\/li>\n<li>RXD \u2192 RPi Pin 08 (Data Transmit)<\/li>\n<li>TXD \u2192 RPi Pin 10 (Data Receive)<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd300\/files\/2016\/11\/rpi-console-connection.jpg\" \/><\/p>\n<h2>Connecting via the Shell<\/h2>\n<p><strong>Bringing up the Shell On Mac \/ Linux<\/strong><\/p>\n<p>TL;DR:<\/p>\n<p>If you\u2019re running Mac OS X all you need to do is open a Terminal window and run <em>screen<\/em> in the command line using the command:<\/p>\n<p><code>screen -L \/dev\/tty.usbserial 115200<\/code><\/p>\n<p><code>screen<\/code> is the command. <code>\/dev\/cu.usbserial<\/code> is the path to your serial device and <code>115200<\/code> is the baud rate (the speed at which we send data across the serial interface).<\/p>\n<p>If you\u2019re on Linux you\u2019ll need to escalate your privileges by putting <code>sudo<\/code> in front of the command.<\/p>\n<p>E.g:<\/p>\n<p><code>sudo screen \/dev\/cu.usbserial 115200<\/code><\/p>\n<p><strong>Bringing up the Shell on Windows<\/strong><\/p>\n<p>If you\u2019re running Windows, you\u2019ll need to find out what <em>com port<\/em> the console cable is using.<\/p>\n<ol>\n<li>Search for <em>Device Manager<\/em><\/li>\n<li>Expand the <em>Ports (COM &amp; LPT)<\/em> section<img decoding=\"async\" src=\"http:\/\/workshop.raspberrypiaustralia.com\/assets\/device-manager.png\" \/><\/li>\n<\/ol>\n<p>You now need to open <em>putty<\/em><\/p>\n<ol>\n<li>Select <em>Serial<\/em> as the connection type<img decoding=\"async\" src=\"http:\/\/workshop.raspberrypiaustralia.com\/assets\/putty-serial-connection-type.png\" \/><\/li>\n<li>Enter the name of the COM port you\u2019ve found<\/li>\n<li>Set the speed to <em>115200<\/em><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd300\/files\/2016\/11\/putty-serial-settings.png\" \/><\/li>\n<li>Click <em>Open<\/em> and you should see the terminal<img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd300\/files\/2016\/11\/putty-serial-terminal.png\" \/><\/li>\n<\/ol>\n<p><strong>Logging In<\/strong><\/p>\n<p>Once you\u2019ve brought up the shell, you\u2019ll be faced with a login prompt. You can log into your Raspberry Pi with the following credentials:<\/p>\n<ul>\n<li>username: <strong>pi<\/strong><\/li>\n<li>password: <strong>raspberry<\/strong><\/li>\n<\/ul>\n<p>Ok we\u2019re in! Let\u2019s have a look around in the <a href=\"http:\/\/courses.haigarmen.com\/intd300\/rpi-02-exploring-your-rpi\/\">next tutorial<\/a>.<\/p>\n<\/article>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Overview Despite having four full sized USB ports and one micro USB port (for power), you can\u2019t connect to your Raspberry Pi from your computer via USB (without additional hardware). You can however connect to your Raspberry Pi via a \u201cUSB to TTL Serial Cable\u201d, also sometimes called a Console Cable. This cable allows you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-4","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/posts\/4","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/comments?post=4"}],"version-history":[{"count":5,"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/posts\/4\/revisions"}],"predecessor-version":[{"id":91,"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/posts\/4\/revisions\/91"}],"wp:attachment":[{"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/media?parent=4"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/categories?post=4"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.haigarmen.com\/intd320\/wp-json\/wp\/v2\/tags?post=4"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}