How to setup Raspberry Pi 3 Model B+ only using USB Drive and Android Phone Charger.

Written by elango_11461 | Published 2019/01/06
Tech Story Tags: raspberry-pi | setup | raspberry-pi-3 | diy | raspberry-pi-3-model

TLDRvia the TL;DR App

Raspberry Pi has been around for sometime and I was interested in Setting up MagicMirror using it, so went to Sim Lim Square and got one for S$ 70. Luckily the shop owner just had one model — Raspberry Pi 3 Model B+ without which, setting up this thing would have required buying an SD Card , Keyboard, etc.

This is not new information — rather gathered from several sources. I am just shouting out loud that “Yes — you don’t have buy any additional stuff ” — if you are able to locate a Pen Drive/USB drive and an Android phone charger (micro USB).

What do we need

Hardware

  1. Raspberry Pi 3 Model B+ (yes, we need this specific model)
  2. Micro USB Charger (Android Phone charger are usually this)
  3. USB Drive (thumb/pen drive/stick) — 8 GB at least
  4. Mac or PC (though we will be using Mac for detailed steps in this article)
  5. Home or Office Wifi Network (for which you know the password and Network name)

Software

  1. Raspbian Operating System (Raspbian Stretch with desktop)
  2. Etcher (use to burn USB Drive with OS Image)
  3. VNC Viewer (choose Operating System Windows or Mac or Linux) — Raspbian comes preloaded with VNC Server
  4. Special Unzip utilities, Standard OS ones don’t handle these file types [7-Zip (Windows) or The Unarchiver (Mac) or Unzip (Linux) ]

Lets get to work

Step 1: Preparing USB Drive by loading Operating System

  • Install Etcher
  • Plug in the USB Drive to Computer (warning — all data in USB Drive will be erased)
  • Launch Etcher and Select the Raspian .img file.

Select Raspian Image, USB Drive and Flash

  • Select USB Drive that we just plugged in and Flash
  • Eject and Plugin the USB Drive again, we will have to edit some files so that Raspberry automatically connects to Wifi network — this will help us to open a terminal to Raspberry when it boots.

Step 2: Enable SSH and Wifi Connection

  • Open Terminal on Computer and cd to USB Drive (in mac cd /Volumes/<usb name> (i called my drive boot)

cd /Volumes/boot

  • Enable SSH by creating a empty file

touch ssh

  • Let move to setup Wifi Connection details so that Raspberry connects to your Wifi network and becomes available for us to Connect from Command Line
  • Under the same root folder of USB, create file called wpa_supplicant.conf (vi is my preferred file editor, you can use TextEdit or Notepad too)

  • Type in the below details or copy paste from below (press i key for insert mode, paste contents and to save — Esc :wq )

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdevnetwork={ssid=""psk=""key_mgmt=WPA-PSK}

  • Save the file and eject USB drive, we are all set for creating USB Bootable drive

Step 3: Selecting the micro USB Charger

There are several articles that go into detail of how much current(important) is required than voltage. Since most USB charges produce 5V output.

The suggested output required is 5V and 2.5 A if you have to run several peripherals (monitor, keyboard, Wifi, etc).

In our case, we just need one peripheral — Wifi . So anything more than 1.5 A should be good to start with. I was able to find a USB charger that produced 2.4A output. Find the thickest USB cable that you can find, thicker the cable — higher the current it can carry (discounting insulation thickness).

Step 4: Startup and Terminal Access

  • Once Raspberry is powered on, Red light glows to confirm that it got power and ready to wow you.

  • Then Green light next to Red LED starts to flicker, this is when Wifi Connection is being established.

  • Wait for about 20 seconds and then try to SSH (login) into Raspberry Pi
  • By default hostname raspberrypi.local is assigned and this can be used to connect from terminal. Open a terminal and connect

ssh pi@raspberrypi.local

here pi is the Username and raspberrypi.local is the hostname. Default password for pi account is raspberry

Step 5: View Desktop using VNC Viewer

  • Launch raspi-config to enable VNC Server

sudo raspi-config

  • This launches a nice CUI to select and enable VNC. Choose Interfacing Options > VNC > Yes

  • Launch VNC Server on your Computer and add a New Connection.

New VNC Connection

  • Then Double Click on the Connection to launch VNC Connection, this will prompt for username and password.

Invincible

References

Raspberry Pi 3 Model B+ - Raspberry Pi_The Raspberry Pi 3 Model B+ is the latest product in the Raspberry Pi 3 range._www.raspberrypi.org

How to boot from a USB mass storage device on a Raspberry Pi - Raspberry Pi Documentation_This section contains documentation with technical information about the Raspberry Pi hardware, including official…_www.raspberrypi.org

Installing operating system images - Raspberry Pi Documentation_This section includes some simple guides to setting up the software on your Raspberry Pi. We recommend that beginners…_www.raspberrypi.org

Download Raspbian for Raspberry Pi_Raspbian is the Foundation's official supported operating system. You can install it with NOOBS or download the image…_www.raspberrypi.org

VNC (Virtual Network Computing) - Raspberry Pi Documentation_Need to access a Raspberry Pi, but don't have a monitor spare? This section provides basic instructions for setting up…_www.raspberrypi.org

How to set up WiFi on your Raspberry Pi without a keyboard or monitor (or ethernet)_I'm one of the rare software developers that doesn't have an extra HDMI monitor, keyboard, and ethernet connection…_howchoo.com


Published by HackerNoon on 2019/01/06