Saturday, October 1, 2016

Get Raspberry Pi into Networking

As many electronic enthusiasts know, Raspberry Pi is a small credit card size computer which runs a Linux operating system called Raspbian which can be used in many ways to do computer engineering stuff. I am writing this post which I will use as a reference to my future posts regarding network solutions which can be provided using this small piece of electronics.

Get Hardware Fixed

Assemble Raspberry Pi into the casing with a fan. Because this is going to be a server, it is better to use a casing with a fan to reduce the heat caused by continuous long time operation. The only thing you need to know in fixing hardware is where to plug the fan. (click on the image to view full size)

Put it just like I have done on the long GPIO / Input Output line running on the board. 

Power (Red) must be connected to the 2nd pin from the left and the Ground (Black) must be connected to the 3rd pin from the left.

Format SD card

SD card is the hard disk of this machine.
You will also need a card reader if your PC does not have a SD card reader slot. Also before buying a SD card, check whether the card supports Raspberry Pi or not though most cards do support. 

To correctly format it use SDF Formatter from here

Go to Option and select Format Type as FULL (Erase) and Format Size Adjustment ON

Now go to My Computer and right click on the SD card and select Format.

This time select the File System as exFAT because it is more faster and select Quick Format and hit Start.

Now the Hard Disk is ready to install the OS.

Burn Raspbian OS to SD card

Now download Raspbian OS (Jessie) from
Do not download Noobs if you do not have a HDMI cable and  a LCD Display because SSH is not active by default in Noobs. I'm going to do SSH to install a remote access software like VNC next.
So I need clean OS which the SSH is enabled by default.

Time to download Win32 Disk Imager from here.

Select the downloaded image and hit Write.

Now the SD card is fully ready to insert in to the Raspberry Pi.

Boot up, SSH & Update Packages

Now plug your Pi to a 2.5A power plug (which is recommended) and plug an Ethernet Cable to the Pi which is connected to your home router. Because DHCP is enabled by default on the Ethernet port, it is the easiest way. And aslo you can guess the ip address which it will get by looking at your PC's IP and if you know how many devices are connected. If you are not sure, download a scanner like Advanced IP Scanner from here.

You can see the IP address of my Pi is which I'm going to SSH into.
Download Putty to do SSH. SecureCRT will not work because of a SSH version mismatch.

Select port 22, SSH etc. Just normal terminal access.

Hit Open.

In the 1st time you SSH, it will prompt an Security Alert in Putty.
Hit Yes to ignore it and log in to the Pi.

Default Logins:-

Log in as: pi
Password: raspberry

After logged in, enter the following command in terminal to access Pi's software configuration tool.

sudo raspi-config

Select Expand Filesystem to use all the space in SD card for root partition.

Hit Ok for the next dialog box and it will ask to reboot. Hit Ok and start a new SSH session after reboot.

Now enter following commands to download & update packages.

sudo apt-get update
sudo apt-get dist-upgrade

To view the available space in memory enter following command anytime in terminal.

df -h

After packages are updated, enter following commands to clean the downloaded update packages to free space & reboot.

sudo apt-get clean
sudo reboot

Install TightVNC to Access Desktop

Enter following commands to install and run TightVNC

sudo apt-get install tightvncserver

It will ask a password to the remote session. It will be used to login to the Pi via TightVNC. After confirming that it will ask a view only password. You can ignore that.

Remember to enter "tightvncserver" command to start a session with Pi everytime you reboot before accesing through TightVNC.

Now install TightVNC on your native PC from here.

Now open TightVNC from your PC and start a session to your Pi by giving IP address with a : followed by a 1 for the session like shown in the screen capture.

Hit Connect and it will ask the password. Give the password entered a short while ago and hit OK

Now you are on the desktop of the Pi.
Now it's only a GUI. You can move around easily and customize as you like.

From upper right hand corner, you can see the network icon on the tray. Click on it to connect Wifi network too using your Wifi Key. You can also give static IP from here too.

Go to Menu > Preferences > Raspberry Pi Configuration

You can change many important things here like Hostname, Password, Enable Interfaces, Overscan, Date and Time etc and reboot the Pi to make the changes effective.


  • July 21, 2017 at 3:46 PM
    Anonymous says:

    Great information. Lucky me I ran across your
    website by chance (stumbleupon). I have book marked it for later!


Post a Comment