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

Elango
6 min readJan 6, 2019

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=netdev
network={
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

--

--

Elango

Elango has held several senior positions in Big Banks and Startups. He likes sharing about tech and explaining tech to people who are new to it.