Record of Raspberry PI Setup Procedure for ENGN1931Z
.~~. .~~.
'. \ ' ' / .'
.~ .~~~..~.
: .~.'~'.~. :
~ ( ) ( ) ~
( : '~'.~.'~' : )
~ .~ ( ) ~. ~
( : '~' : ) Raspberry Pi
'~ .~~~. ~'
'~'
(NOTE: the comptuer lab at B&H 191 has all the hardware you need to setup the RPi (keyboard, mouse, monitor). All computers on the East side have them. Connect, and press the button on the back of the monitor.)
This setup log will begin with quite explicit instructions, but as we proceed, we know that you will be able to help fill in the blanks.
- Begin with micro SD card loaded with latest NOOBS - New Out of the Box Software
- The microSDs provided with the class kit have been loaded with NOOBS v2.4.5. The microSDs were given to you inside SD adapters that may come in handy if your computer has a standard SD slot.
- If you didn't get the class kit, you can follow the instructions here to download and load NOOBS on your own microSD.
- Insert microSD into RPi, connect display+keyboard+mouse, and then power on.
- Note that the RPi autodetects the display resolution on startup, so make sure to connect display first. (Otherwise, you will get very low resolution by default)
- Select and Install Raspbian from NOOBS menu:
- This step will take a while (~10-20 minutes depending on your microSD card speed), and after the installation is complete it will reboot to a graphic interface.
(DO NOT connect to Wi-Fi, yet)
-
Setup keyboard layout (special characters might not be correctly matched), location, and others by using going to the Raspberry icon in the upper left:
Menu
>Preferences
>Raspberry Pi Configuration
:Localization
-
Finding MAC address of the Raspberry Pi and registering it to connect seamlessly to the Brown-Guest WiFi network:
-
Find your MAC (
HWaddr
) address of your WiFi adapter using theifconfig
command. Launch the terminal (using the command prompt icon in the upper left), typeifconfig
and press Enter. In the block underwlan0
look for the set of characters afterether
(e.g. b8:27:eb:51:22:21). -
USING ANOTHER COMPUTER. Register your device at http://guestwifi.net.brown.edu/. This helps the Raspberry Pi connect automatically to Wi-Fi without user input after the first successful connection.
- Back to the Raspberry Pi. Connect to the internet using WiFi:
-
Select Brown-Guest using the network icon in upper right.
-
Launch Chromium web browser using the world icon in the upper left.
-
Test your connection. (Note that you should NOT accept Brown Guest WiFi Terms; if you see a terms window, please cancel,and repeat step 5.)
-
In a terminal run the
ifconfig
command again, this time note and record your IP address for future use. It is found in thewlan0
section of theifconfig
output, right afterinet
(e.g. 172.18.xx.xx). In the future it might occurr that your Raspberry Pi connects correctly to Brown-Guest but that its IP address is changed, one of several way getting this new IP address, withouth having to log in to the Pi or hooking up a monitor and keyboard, is going to the website used to register the MAC address http://guestwifi.net.brown.edu/ : Manage Devices : Click on your Pi info : Click on Print Icon. IP address should show here. -
Please complete the ENGN1931Z RPi Information form here: http://goo.gl/rn4nHT
-
Launch a terminal (black icon in top left) and upgrade to the latest Raspbian distribution using following commands (note that this may take 15-20 minutes depending on the WiFi speed):
sudo apt-get update sudo apt-get dist-upgrade
-
Change Login Password using the terminal command
passwd
. Note that the default username ispi
and the default password israspberry
for all RPis. -
Generate new Secure Shell (SSH) keys using the following terminal command:
sudo rm /etc/ssh/ssh_host_* && sudo dpkg-reconfigure openssh-server
-
Enable SSH on the Raspberry Pi, and set up your personal computer (client) to use it following the platform dependent instructions found here:
- Now you should be able to SSH into your RPi using the IP address you recorded earlier (Step 6) together with the username
pi
and your password (Step 8).
- Setup basic (unencrypted) VNC - Virtual Network Connection following subset of instructions here
- Install and launch realvnc on RPi from terminal:
sudo apt-get install realvnc-vnc-server realvnc-vnc-viewer
vncserver :1 -geometry 1920x1080 -depth 24
When setting up realvnc, choose a password that is distinct from your RPi login.
- Install and launch Real VNC's Chrome App link here on your personal computer.
- Connect to your RPi by entering IP address (from Step 9) followed by
:
and the port number for realvnc (usually1
).- For example, if IP address is
172.18.24.24
and the vnc is on port1
, then you should use172.18.24.24:1
- Login with your vnc password (see step 11 above).
- For example, if IP address is
- To have the above run every time the RPi boots open up a terminal and do the following:
cd .config
mkdir autostart
cd autostart
nano realvnc.desktop
The last line creates the file realvnc.desktop
. Nano is a commandline utility for text editing. Fill it up like so:
[Desktop Entry]
Type=Application
Name=RealVNC
Exec=vncserver :1 -geometry 1920x1080 -depth 24
StartupNotify=False
After putting file contents, exit and save file by doing: Ctrl+x
, y
.