Installing Raspberry PI - BitKnitting/should_I_water GitHub Wiki

I install Raspberry Pi every once in a while. Each time, I forget pieces of what I did to install the last time. The goal here is to list the steps to follow when installing Raspbian Pi...at least the steps I recently used.

  • I got a Raspberry Pi from Adafruit. I try to buy from Adafruit whenever I can because of their incredible learning tutorials and amazing support. Adafruit is the kind of company I wish more companies were like.
  • Get a micro SD card. This is the one I am using.
  • Format the SD card using SDFormatter(Overwrite).
  • Download a Raspbian OS image. I downloaded Raspbian Stretch Light.
  • Burn the Rasbian OS image onto the SD card using Etcher.
  • Open a Terminal window and check to see the SD card shows up: $ ls \Volumes. You should see a boot volume.
    • Try removing and reinserting the SD card if it doesn't show up.
  • I have been using ssh to talk with the Raspberry Pi. I just recently received a console cable from Adafruit. So far the only challenge I have had is typing in $ screen /dev/cu.SLAB_USBtoUART 115200 and getting back the screen was busy. To fix this:
lsof | grep SLAB*
screen    18900 margaret    5u      CHR               20,5   0t19827     1385 /dev/cu.SLAB_USBtoUART
screen -x 18900

the session number (18900 in this case) will be different.

  • I also use ssh to communicate with the Raspberry Pi. Get ssh to work by going to the boot drive: $ cd \Volumes\boot and creating an ssh file: $ touch ssh.
    • You can verify the ssh file was created by: $ ls s*.
  • Insert the SD Card into the Raspberry Pi.
  • Plug the Raspberry Pi to power and Ethernet.
  • Optional: I like to use Angry IP to scan our network. Happily, I have always seen the raspberrypi.home server.
  • Open a window and start an ssh session, e.g.:$ ssh [email protected]
  • If I've reinstalled Raspbian, I'll get this message:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

I just follow the directions in the message and try again.

Installing WiFi

I like to unplug the Raspberry Pi from Ethernet. This allows me to "play" with it closer to my desk. The first thing I do is use ifconfig to check how the networks are configured. From ifconfig's man:

DESCRIPTION
       Ifconfig  is  used to configure the kernel-resident network interfaces.
       It is used at boot time to set up interfaces as necessary.  After that,
       it  is  usually  only  needed  when  debugging or when system tuning is
       needed.

       If no arguments are given, ifconfig displays the  status  of  the  cur‐
       rently  active interfaces.  If a single interface argument is given, it
       displays the status of the given interface only; if a single  -a  argu‐
       ment  is  given,  it  displays the status of all interfaces, even those
       that are down.  Otherwise, it configures an interface.

Turn On WiFi.

I thought a good place to get info on how to get WiFi working would be this article. Yet, when I tried $ sudo iwlist wlan0 scan I would get wlan0 Interface doesn't support scanning : Network is down.

Running $ sudo -i:

Wi-Fi is disabled because the country is not set.
Use raspi-config to set the country before use.

NOTE: I believe I was getting this message every time I ssh'd in. I just didn't read it!

Back To The Regularly Scheduled Process

Once wlan0 was working, the steps in the article worked.

YIPPEE! We've got WiFi on our Pi.