GETTING STARTED WITH
RASPBERRY PI
Embedded Systems Lab
This document provides instructions to setup headless Raspberry Pi
IIITDM Kancheepuram
RASPBERRY PI SETUP
Requirements:
Operating System: Windows 7
SD card : min 4 GB
Micro USB cable
Ethernet cable
1. Download and install the following software:
SD Card Formatter :To format SD card
Win32DiskImager : To make bootable SD card
Raspbian : Linux OS
VNC Viewer: To view Rapbian window on desktop
PuTTY: Telnet client to connect Pi from PC.
2. Insert your SD card into your computer and open SDFormatter. Check the drive letter
assigned to SD card, and select the same drive letter in SDFormatter.
1
3. In SDFormatter click Option, Select FORMAT TYPE as FULL (OverWrite), and FORMAT
SIZE ADJUSTMENT as ON. After setting option, click Format.
2
4. Once SD card is formatted, open Win32DiskImager, select the SD card drive letter. Click
on the blue folder icon, locate the downloaded Raspbian image and click Write. This will
create a bootable OS.
5. After creating bootable SD card, eject the card and insert into Raspberry Pi, connect
micro USB cable, to power the board. Connect the Ethernet cable to the desktop.
6. The PC needs to be connected to Wi-Fi for internet, as Ethernet is used to connect
Raspberry Pi. The internet needs to be shared to Ethernet for installing packages on
Raspberry Pi. To share Wi-Fi with Ethernet, Open Network and Sharing Center in Control
Panel. In the left pane click on Change adapter settings.
3
7. Right click on Wireless Network Connection and select Properties. At the top, click on
Sharing. Under Internet Connection Sharing, check the first box Allow other network
users to connect through this computer connection. If there are more than one network
on the PC, a drop menu appears and select Local Area Network to which Raspberry Pi is
connected.
4
8. Open cmd.exe (command prompt), and type ping raspberrypi.mshome.net, the IP address of
Raspberry Pi will be displayed. The figure below shows IP as 192.168.137.149.
9. If the ping transmission is successful, then go to step: 12 , else open Network and Sharing in
Control Panel, click Change adapter settings and right click on Local Area Connection to which Pi
is connected.
10. Click on Properties, in the new window, double click on Internet Protocol Version 4 (TCP/IPv4).
Click on Use the following IP address radio button. Enter the IP address of the PC. The IP address
should contain the first three parameters same as Raspberry Pi’s IP address and the last
parameter needs to be set to 1 (eg:192.168.137.1). Enter Subnet mask as 255.255.255.0 and
click OK button.
5
11. Open cmd.exe and type ping raspberrypi.mshome.net , this should successfully connect to
Raspberry Pi. Thus, the PC is connected to Pi.
6
12. Open PuTTY, and enter the IP address of Pi and click Open. A security alert popup window
appears, click on Yes button
7
13. Enter the credentials, the default username is pi and password is raspberry. Note that the
password entered will not reflect on terminal.
8
14. In the terminal, run the command $sudo raspi-config, this will open a new console. Select the
Expand Filesystem and press enter, after the process completes press Esc.
15. To update the OS, run the command $sudo apt-get update .
9
16. To view the desktop of Raspberry Pi on PC, additional packages needs to be installed. Tight VNC
server is one such package. To install this, run the command :
$sudo apt-get install tightvncserver
When prompts to continue enter y and press Enter key.
17. Run the command $tightvncserver in terminal. Enter a password of 8 characters
10
18. After setting server, run the command: $vncserver :0 this will start the server in Pi.
11
19. On the PC open the program VNC Viewer. Enter the IP address of Pi as shown in figure. Click
Connect. A window pops for authentication, enter the 8 character password entered while
configuring tight VNC server in Pi and click OK. Raspberry Pi desktop appears.
12
20. Raspberry Pi can be connected through Remote Desktop Connection (RDP) from Windows. The
supporting packages needs to be installed on Raspberry Pi. Run the command :
$sudo apt-get install xrdp
After installing xrdp on Pi, Open Remote Desktop Connection in Windows, enter IP
(eg:192.168.137.149) address of Raspberry Pi and click Connect.
13
21. Enter the credentials of Raspberry Pi, username: pi, password: raspberry and click Ok. The
desktop of Pi appears on the PC.
14