In the context of the workshop being held by Matthew Plummer-Fernandez this week at ECAL, Raspberry Pi’s will be available to students.
The Pi’s have already been set up with a basic layer of software / harware, the OS installed is Raspbian (on 8Gb SD’s for the Raspberry Pi B and 16Gb SDxC for the Raspberry Pi B+), the keyboard system is standard International Mac US and the wifi-dongle enables to access the Pi via SSH from another machine. Here’s how we did it from scratch:
Beforehand, gather all the necessary material: a Raspberry Pi version B or B+ with it’s power adaptor (others untested), 1 USB keyboard, 1 USB Mouse, 1 SD card (min. 8Gb recommended, SDxC if using a Pi B+), 1 USB Wifi-Dongle, 1 Screen (with HDMI connector), 1 USB card reader (optionnal).
Attention: There is no power switch on the Pi, which means you turn it on when you plug it in the power source (and vice versa ;), choose the right moment to do so. Raspberry Pi B+ have 2 extra USB ports. We noticed that having 3 ports used during setup often results in one of them not working (this model probably doesn’t handle well power distribution). If your keyboard or mouse seems dead, plug it back in again changing ports. If you remove the wifi-dongle form your Pi while it’s running, it crashes.
Setting up the Pi:
1. Download the latest NOOBS package from www.raspberrypi.org/downloads
2. Download the latest SD Formatter form the SD Association website and format your SD card. Disk utility or simple delete and trash procedures may not erase all the bytes and leave clusters which might cause problem during installation on the Pi. Note: if you encounter difficulties formatting the card (ie. don’t have the administrator rights to do it) use an external card reader.
3. Unzip the NOOBS Package and copy it’s contents to the card.
4. Insert your card into the Pi, connect the wifi-dongle, the keyboard, the mouse and the screen, once everything is connected, plug in the power the power adaptor. The Pi will boot and you will be brought to a welcome screen where you can choose your installation type. Choose Raspbian and click install. A modal dialog will appear informing you about the total erasure of the data on the SD card, click OK.
5. Once installed, you will automatically be brought to the raspi-config shell. Don’t worry, your Pi has more than this interface, however, this is where you can setup the most interesting parameters (ie. configure the Pi for a camera board, for SSH, ect.). By navigating with arrows + Tab + Enter, setup your time and date, keyboard model, finally go to the advanced panel and enable SSH (you can do the SSH part later on if you prefer). Please don’t change the password. Exit the config by choosing Finish.
6. To log in and access the Pi, use the information appearing on the side of your machine’s case. Note: You will not see the password while typing, this is normal. If your password doesn’t work, you probably didn’t setup your keyboard correctly, try typing your password in the Login field to verify this. You will the be brought to your first command prompt.
7. Type startx to load the GUI.
7.1. To go back to raspi-config while in the GUI, just open a Terminal window and type in raspi-config .
Setting up the Wifi-dongle:
8. In the GUI, click on Wifi-config. Once open, click on the scan button. A window will open, click scan again.
9. Double-click on the wifi network you want to connect to. You have to know which security and authentication protocol the network uses to set up a connection. The best way to do that is to have another computer (we used a mac) connected to the same network and navigate to your Network Preference Pane > Advanced. Note that on your Pi, you must enter at least four fields for the connection to work: the network type (ie. WPA), the security protocol (ie. TKIP), the User and the Password. Click Ok and wait for the connection to establish (~20 sec).
10. To verify your connection open Epiphany Web Browser and type in a URL. Don’t expect the craziest Webgl experience ever.
Connecting to your Pi via SSH:
11. To connect to your Pi from another computer you’ll need two things: your wifi-dongle to be established and working (we assume you followed the steps) and your Pi’s IP adress. Here’s how to get it. Open a terminal window and type ifconfig . Look into the WLAN0 paragraph for the part where there’s the following “inet addr: xxx.xxx.x.xxx“. The “xxx.xxx.x.xxx” is your local IP address. Note that every time you start up your Pi again, the address changes and that in order to connect via SSH with a local IP address both computers must be on the same network.
12. On the computer you want to connect to your Pi from, open a terminal window and type ssh email@example.com . You will be asked for the Pi’s Login and password. That all. Enjoy
How to connect to your Pi via SSH, transfer files via SFTP, share screen via VNC and last but not least, access your Pi over the internet:
Shell command basics for your Pi, which you must read, learn and worship:
And to shut down your Pi from the command line:
sudo shutdown -h now