{"id":354,"date":"2014-10-13T22:19:26","date_gmt":"2014-10-13T19:19:26","guid":{"rendered":"http:\/\/www.bashpi.org\/?page_id=354"},"modified":"2020-12-03T17:30:16","modified_gmt":"2020-12-03T15:30:16","slug":"raspberry-pi-serial-console-connection","status":"publish","type":"page","link":"https:\/\/www.bashpi.org\/?page_id=354","title":{"rendered":"Raspberry Pi serial console connection"},"content":{"rendered":"<p>One easy way to connect with your RPi and get CLI access in any situation is to use its serial port &#8211; pins 8 and 10 in the header.<\/p>\n<p>As its almost mission impossible to find laptop with serial port these days, I am using USB-serial interface.&nbsp; I also intend to keep USB-serial interface in the same box and connected with RPi so that I only need to bring USB cable (A-plug\/B-plug) with me to connect.<\/p>\n<p><strong>Important note: RPi is using 3.3V logic levels! Do not use random USB-Serial interface\/converter which typically use 5V!<\/strong><\/p>\n<p>For the example below you need following parts:<\/p>\n<ol>\n<li>Raspberry Pi model A, B or B+ (B+ first 26 pins same as A and B).<\/li>\n<li><a href=\"http:\/\/www.byvac.com\/bv3\/index.php?route=product\/product&amp;filter_name=bv103&amp;product_id=85\">ByVac BV103 USB-serial interface<\/a> &#8211; it supports both 3.3v and 5v logic levels.<\/li>\n<li>USB cable: standard A plug &#8211; standard B blug. Borrow it from your printer or scanner.<\/li>\n<li>3 wires to connect RPi and BV103. Ideally breadboard male to female cables for easy connection.<\/li>\n<\/ol>\n<p><strong>Before connecting, make sure that BV103 is set to 3.3V levels. Note the blue jumper position on BV103 board below.<\/strong><\/p>\n<div id=\"attachment_357\" style=\"width: 776px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/10\/console_wiring2.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-357\" class=\"size-full wp-image-357\" src=\"http:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/10\/console_wiring2.jpg\" alt=\"RPi and ByVac BV103 wiring diagram\" width=\"766\" height=\"652\" srcset=\"https:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/10\/console_wiring2.jpg 766w, https:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/10\/console_wiring2-300x255.jpg 300w, https:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/10\/console_wiring2-624x531.jpg 624w\" sizes=\"auto, (max-width: 766px) 100vw, 766px\" \/><\/a><p id=\"caption-attachment-357\" class=\"wp-caption-text\">RPi and ByVac BV103 wiring diagram<\/p><\/div>\n<p>In the picture above are 3 connections:<\/p>\n<ol>\n<li>RPi ground (PIN6) to BV103 ground (PIN9)<\/li>\n<li>RPi TxD (PIN8) to BV103 RxD (PIN3)<\/li>\n<li>RPi RxD (PIN10) to BV103 TxD (PIN1)<\/li>\n<\/ol>\n<p>If you are still in doubt where to connect wires on RPi: Pins 6,8,10 are on main header third, fourth and fifth from the corner on the outer row which is closer to the PCB edge. There is no power connection as power is provided to USB-serial interface by the connected computer, not by RPi.<\/p>\n<p>In real life it should look following, USB cable for connecting your computer is in the left:<\/p>\n<div id=\"attachment_356\" style=\"width: 810px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/10\/console_wiring1_web.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-356\" class=\"size-full wp-image-356\" src=\"http:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/10\/console_wiring1_web.jpg\" alt=\"RPi and ByVac BV103 wiring photo\" width=\"800\" height=\"422\" srcset=\"https:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/10\/console_wiring1_web.jpg 800w, https:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/10\/console_wiring1_web-300x158.jpg 300w, https:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/10\/console_wiring1_web-624x329.jpg 624w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><p id=\"caption-attachment-356\" class=\"wp-caption-text\">RPi and ByVac BV103 wiring photo<\/p><\/div>\n<p>Next thing to do is to connect BV103 with your computer using USB cable. A-plug to your computer, B-plug to BV103. Your computer should now detect USB-serial interface, device name in Linux is by default <em>\/dev\/ttyUSB0<\/em> or similar. If you using Linux, then for establishing serial connection you should install package <em>minicom<\/em> and run it as follows:<\/p>\n<pre><code class=\"language-bash\">sudo minicom -b 115200 -D \/dev\/ttyUSB0\n<\/code><\/pre>\n<p>Where<em> \/dev\/ttyUSB0<\/em> is USB-serial interface device name, 115200 is baudrate and <em>sudo<\/em> is needed if you don&#8217;t want to deal with <em>\/dev\/ttyUSB0<\/em> device ownership issues.<\/p>\n<p>If you encounter anomalies or it its not working, check minicom options, choose &#8220;8N1&#8221; for 8 data bits, no parity and 1 stop bit + set both hardware and software flow controls off.<\/p>\n<p>If everything is done right, you should get login prompt as follows:<\/p>\n<div id=\"attachment_355\" style=\"width: 810px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/10\/console_screenshot.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-355\" class=\"size-full wp-image-355\" src=\"http:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/10\/console_screenshot.jpg\" alt=\"RPi serial connection with minicom\" width=\"800\" height=\"574\" srcset=\"https:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/10\/console_screenshot.jpg 800w, https:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/10\/console_screenshot-300x215.jpg 300w, https:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/10\/console_screenshot-624x447.jpg 624w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><p id=\"caption-attachment-355\" class=\"wp-caption-text\">RPi serial connection with minicom<\/p><\/div>\n<p>Windows lovers can find serial port numbers in their device manager and connect using teraterm, hyperterminal or whatever-terminal.<\/p>\n<p>If needed, you can modify RPi serial port settings in<strong> \/etc\/inittab<\/strong>. Find following lines and I think no further explanation is needed.<\/p>\n<pre><code class=\"language-bash\">#Spawn a getty on Raspberry Pi serial line\nT0:23:respawn:\/sbin\/getty -L ttyAMA0 115200 vt100\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>If you found this useful, say thanks, click on some banners or <a href=\"http:\/\/www.bashpi.org\/?page_id=105\">donate<\/a>, I can always use some beer money.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One easy way to connect with your RPi and get CLI access in any situation is to use its serial port &#8211; pins 8 and 10 in the header. As its almost mission impossible to find laptop with serial port these days, I am using USB-serial interface.&nbsp; I also intend to keep USB-serial interface in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-354","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.bashpi.org\/index.php?rest_route=\/wp\/v2\/pages\/354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bashpi.org\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bashpi.org\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bashpi.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bashpi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=354"}],"version-history":[{"count":9,"href":"https:\/\/www.bashpi.org\/index.php?rest_route=\/wp\/v2\/pages\/354\/revisions"}],"predecessor-version":[{"id":757,"href":"https:\/\/www.bashpi.org\/index.php?rest_route=\/wp\/v2\/pages\/354\/revisions\/757"}],"wp:attachment":[{"href":"https:\/\/www.bashpi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}