Raspberry Pi 2 Starter Kit Hookup Guide

This Tutorial is Retired!

This tutorial covers concepts or technologies that are no longer current. It's still here for you to read and enjoy, but may not be as useful as our newest tutorials.

View the updated tutorial: Raspberry Pi 3 Starter Kit Hookup Guide

Pages
Contributors: MTaylor
Favorited Favorite 1

Configuring the Pi

This section goes over configuring the keyboard, ethernet, and wireless (Edimax) modules.

Configuring the keyboard layout

The raspbian distribution comes defaulted to European hardware. For us Yanks, we find the " (quotation mark) symbol is replaced by @ (commercial at) and our number sign # is replaced by the european pound sign £. This can made it aggravating when trying to #define things. Invoke the config tool with "sudo raspi-config" and take the following actions.

Set the default locale for the system

  • Select "Internationalisation Options"
  • Select "Change Locale"
  • Deselect en_GB.UTF-8 UTF-8
  • Select en_US.UTF-8 UTF-8, (Ok)
  • Set default to en_US.UTF-8, (Ok)

Change the keyboard layout -- from the Internationalisation Options menu,

  • Change Keyboard Layout
  • Leave set as: Generic 105-key (Intl) PC (Ok)
  • Select Other (Ok)
  • Select English (US) (Ok)
  • Select English (US) (Ok)
  • Select default (Ok)
  • Select No compose key (Ok)
  • Set Ctrl+Alt+Bksp function (Ok)

Finish with the dialog and get back to the shell

Try the " and # keys at the prompt. It may be necessary to restart the pi at this point.

Configuring the Internet interfaces

A single configuration file, interfaces, configures both wired and wireless devices. Settings that work for the EdiMax 7811Un card were found in a blog post by Jason Theobald. His configuration also enables DHCP listening for the wired connection, which is what we want for most networks.

sudo nano /etc/network/interfaces

replace "nano" with "leafpad" if you are in x and prefer graphics

auto lo
iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
auto wlan0

iface wlan0 inet dhcp
   wpa-ssid "Your Network SSID"
   wpa-psk "Your Password"
A note on DHCP: The Ethernet port is default configured to manual IP configuration. Make sure the eth0 line specifies the dhcp rather than manual ("iface eth0 inet dhcp") if you plan on using the wired port.

Applying the changes ( turning it off and then back on again )

The link should be cycled for the new configuration to take. Rather than shutting down the pi and restarting, use 'ifdown' and 'ifup' to bring the link down and back up.

For wireless connections, use

sudo ifdown wlan0

and

sudo ifup wlan0

For wired connections, use

sudo ifdown eth0

and

sudo ifup eth0