Categories
Raspberry Pi

Setting up the WiFi Part I – Supported Adapters

Video Coming Soon

<<FIRST  <PREVIOUS

This entry is for configuring the Asus USB-N10 USB Wireless-N USB Adapter. If you have any other WiFi adapter please refer to Chapter 4 Network Configuration of the Raspberry Pi User Guide book or perform Google Searches for your adapter.

003_001

NOTE: There is a WiFi Config tool included with Raspbian “wheezy” distribution however I have not had much luck with it. I t did work one time for me and that was it. You may give it a try but I recommend using the steps below as they have worked 100% of the time for me.

 

You will need to perform these steps from the command line. If you have the desktop loaded, open a terminal window by double clicking on the the LXTerminal shortcut on the desktop.

  1. At the command line, type the following command and press enter to view available wireless networks.
    sudo iwlist scan | less
  2. On the wlan interface, you will see the SSIDs listed on the lines starting with ESSID:. Verify that the network you wish to connect to is listed.
    003-002
  3. Press Ctrl+z to return to the command line
  4. Edit the network configuration file by typing the following command and press enter.
    sudo nano /etc/network/interfaces
  5. You should see the following content in the interfaces file.
    auto loiface lo inet loopback
    iface eth0 inet dhcpallow-hotplug wlan0
    iface wlan0 inet manual
    wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
    iface default inet dhcp

     

  6. Replace the bottom block with the following.
    auto wlan0
    iface wlan0 inet dhcp
    wpa-conf /etc/wpa.conf

     

  7. The resulting file should have the following contents.
    auto loiface lo inet loopback
    iface eth0 inet dhcpauto wlan0
    iface wlan0 inet dhcp
    wpa-conf /etc/wpa.conf

     

  8. Save the file and exit
    • Press Ctrl+o
    • Press Enter
    • Press Ctrl+x
  9. Now edit the wpa.conf file by typing the following command and pressing enter.
    sudo nano /etc/wpa.conf
  10. Enter the following for the contents of your file based on the type of security used by your WiFi network.
    NOTE: Do not type the word [Tab]. It indicates that you need to include a tab.

    No Encryption network={
    [Tab] ssid=”Your_SSID
    [Tab] key_mgmt=NONE
    }
    WEP Encryption network={
    [Tab] ssid=”Your_SSID
    [Tab] key_mgmt=NONE
    [Tab] wep_key0=”Your_WEP_Key
    }
    WPA/WPA2 Encryption network={
    [Tab] ssid=”Your_SSID
    [Tab] key_mgmt=WPA-PSK
    [Tab] psk=”Your_WPA_Key
    }

     

  11. Save the file and exit
    • Press Ctrl+o
    • Press Enter
    • Press Ctrl+x
  12. Connect to the wireless network by typing the following command and pressing enter.
    sudo ifup wlan0
  13. If you see the message “ifup: interface wlan0 already configured,” type the following command and repeat the previous step again.
    sudo ifdown wlan0
  14. If you are successful, you will see several lines starting with DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 … with the last line stating that the adapter is bound to an IP address on your network
    .
    003-003
  15. If you are successful at this point, you may close the terminal window and open a web browser to verify that you are connected to the internet.
    003-004
<<FIRST  <PREVIOUS
Categories
Raspberry Pi

Initial Configuration of the Raspberry Pi

First Step – Getting the Raspberry Pi to Boot

Required Items

  • Raspberry Pi
  • 2 GB or larger SD Card
  • Keyboard
  • Monitor (Composite or HDMI)
  • Display cable (Composite or HDMI)
  • USB Power Supply
  • USB Cable for power (Micro USB)
  • PC connected to the internet with a card reader

Optional Items

  • Case for Raspberry Pi
  • USB Mouse
  • Book – Raspberry Pi User Guide
    by Eben Upton & Gareth Halfacree
    ISBN: 978-1-118-46446-5 (Amazon Link)

NOTE: I am running these steps from a Windows 7 PC. If you are running from another OS be certain you read the information on the http://www.raspberrypi.org/downloads page for information for your OS. I am also using a 16 GB SDHC Card.

Steps

  1. Go to the download section at http://www.raspberrypi.org/downloads
  2. If you are running a Windows PC, download Win32DiskImager
    I downloaded the version 0.5 binary (win32diskimager-binary.zip)
  3. Download the Raspbian “wheezy” image
    I downloaded via the direct download.
    The version at the time of this blog entry is 2012-12-16-wheezy-raspbian.zip
  4. Open the zip file (2012-12-16-wheezy-raspbian.zip) and extract the image file (2012-12-16-wheezy-raspbian.img)
    The following steps are modified from the “Easy Way” section from http://elinux.org/RPi_Easy_SD_Card_Setup
  5. Insert the SD card into your SD card reader and check what drive letter it was assigned. You can easily see the drive letter (for example G:) by looking in the left column of Windows Explorer. If the card is not new, you should format it; otherwise Win32DiskImager may hang.
  6. Extract the Win32DiskImager utility files from the zip file (win32diskimager-binary.zip) and run the Win32DiskImager utility (Win32DiskImager.exe). You should run the utility as Administrator! (Right click on Win32DiskImager.exe and select “Run as administrator from the context menu.)
    001
  7. Select the 2012-12-16-wheezy-raspbian.img image file you extracted earlier
    002
  8. Select the drive letter of the SD card in the device box. Be careful to select the correct drive; if you get the wrong one you can destroy your computer’s hard disk!
    003
  9. Click Write and wait for the write to complete.
    004005
  10. Exit the imager and eject the SD card.
  11. Insert the card in the Raspberry Pi, power it on, and it should boot up. There is an option in the configure script that comes up to expand the partitions to use all of the SD card if you have used one larger than 4 GB

Second Step – Initial Configuration of the Raspbian “wheezy” distribution

When you boot up the Raspberry Pi, the Raspi-config utility will launch.

There are a few things that you should configure right away or you may have problems later.

  • Expand the root partition if your SD Card is greater than 4 GB (Optional)
    1. Select “expand_rootfs” from the Raspi-config menu
    2. The Raspi-config widow will disappear for a bit then a new window will display telling you that the root partition has been resized and the file system will be enlarged upon the next reboot. Click enter to close the dialog.
  • Configure the keyboard (You must do if you are not using a UK keyboard!)
    I did not perform this step the first time I booted up the Raspberry Pi and I had issues as I could not use the pipe symbol. The “|” was mapped as a tilde “~” symbol. 

    1. Select “configure_keyboard” from the Raspi-config menu
    2. You may keep the default “Generic 105-key (Intl) PC” model or change it to match your keyboard
    3. Press enter or Tab to the bottom options and select “<OK”>” and press enter
    4. If you are not using a UK keyboard, select “Other”
    5. Press enter or Tab to the bottom options and select “<OK”>” and press enter
    6. Select your country of origin from the list (i.e. English (US))
    7. Press enter or Tab to the bottom options and select “<OK”>” and press enter
    8. Select the keyboard layout (i.e. English (US))
    9. Press enter or Tab to the bottom options and select “<OK”>” and press enter
    10. Select the option for the AltGr modifier (i.e. The default for the keyboard layout)
    11. Press enter or Tab to the bottom options and select “<OK”>” and press enter
    12. Select the option for the Compose key (i.e. No compose key)
    13. Press enter or Tab to the bottom options and select “<OK”>” and press enter
    14. Select an option for the Control+Alt+Backspace key combination
    15. Press enter
    16. There will be some delay as the options are saved
    17. The Raspi-config menu will reappear
  • Change the locale (You should do if you are not in the UK)
    1. Select “change_locale” from the Raspi-config menu
    2. Scroll down to the “en_GB.UTF-8 UTF-8 option and deselect it by pressing the spacebar (You do not need to remove it. You may keep it if you like.)
    3. Scroll through the list to find the locale(s) you wish to install and select it/them by pressing the spacebar (i.e. en_US.UTF-8 UTF-8)
    4. Tab to the bottom options and select “<OK”>” and press enter
    5. Select the default locale for the system (i.e. en_US.UTF-8 UTF-8)
    6. Press enter or Tab to the bottom options and select “<OK”>” and press enter
    7. There will be some delay as the options are saved
    8. The Raspi-config menu will reappear
  • Change the time zone (Unless you want to stick to UTC)
    1. Select “change_timezone” from the Raspi-config menu
    2. Select your geographic area (i.e. US)
    3. Press enter or Tab to the bottom options and select “<OK”>” and press enter
    4. Select your time zone (i.e. Eastern)
    5. Press enter or Tab to the bottom options and select “<OK”>” and press enter
    6. There will be some delay as the options are saved
    7. The Raspi-config menu will reappear
  • If you have a hardwired internet connection, you may try to update Raspi-config
    1. Select “update” from the Raspi-config menu
    2. Press enter or Tab to the bottom options and select “<OK”>” and press enter
  • Once you are done making changes, press the tab key to jump to the options at the bottom of the screen and select “<Finish>”
  • Depending on the options selected, you may be prompted to reboot. If given the option, reboot your Raspberry Pi as most options do not take effect until the Raspberry Pi reboots.
<<FIRST  <PREVIOUS | NEXT>
Categories
Raspberry Pi

Introduction to the Raspberry Pi

NEXT>

 

Raspberry Pi Model B Board

NEXT>