11 June 2018

Setup raspberrypi without a monitor,keyboard or mouse

Hello,
This post discusses setting up Raspberry Pi and configuring wi-fi over SSH.

The equipment required are:
Raspberry Pi
Power adapter for Raspberry Pi
Micro SD card (Minimum 8 GB)
LAN cable

So lets get started :)

1) Download the latest Raspbian OS image
https://www.raspberrypi.org/downloads/raspbian

2) Extract the zip file on to your PC/Laptop, you will find the Rasbian image file (*.img)

3) Download Etcher software      https://etcher.io

4) Install Etcher (Windows PC) or launch the Etcher Appimage (Linux PC)

5) Flash the Raspbian image on to Micro SD card.

6) After flashing the OS image on the SD card, create a file named 'ssh' in the boot folder of the SD card.

7) Insert the SD card on to Raspberry Pi and power it up. There is no need to connect a monitor, mouse or keyboard to Raspberry Pi.

8) The link-local connection settings for Linux and Windows are as follows
-----------------
On Linux PC
============
Open Network > Wired connection settings > IPv4 . Select IPv4 method as Link-Local only

On Windows PC
=============
Open Windows LAN properties
Networking >IPv4 >
Check the following--
Obtain an IP address automatically
Obtain a DNS server address automatically

----------------

9) Now Connect the Raspberry Pi to Laptop using the LAN cable

10) SSH to Raspberry Pi from your Laptop. Configure RPi using raspi-config

11) After configuring wi-fi on RPi via SSH you can disconnect the LAN cable connection between RPi and PC and SSH to Rpi using Wi-fi

12) To find the Rpi wlan IP you can do either of the two things:
a) On terminal type the following commands
ssh pi@raspberrypi.local
hostname -I         # Gives the IP address of RPi

b) Login to your wireless router and find out the IP alloted to RPi

13) Now we can SSH to RPi as
    ssh pi@<RPi IP>

We have setup Raspbian on RPi and configured wi-fi just using an ordinary LAN cable to connect to Pi.
There is no need for a separate monitor, keyboard, mouse or wi-fi router.
Only your Laptop and LAN cable is required.
All the Best! Have a great day!


You can also setup a remote desktop connection with RPi using VNC