Once again I have to setup my pi. Because I mainly use it in headless config its quite annoying to connect it to display for setup. So anyone else having same trouble here is a small tutorial how to setup you Raspberry pi sd card for running pi headlessly with wifi. No need for monitors or keyboards on pi.
After configuring your sd card you just connect the power and ssh into your pi.
- Download Raspbian Jessie Lite from: https://www.raspberrypi.org/downloads/raspbian/
- Format your micro SD card into FAT32 .
- Extract the .zip of Raspbian Jessie Lite.
- Install the .img file onto your clean micro SD card. ( I use default Linux Disks tool)
- Open SD card Linux partition and open file:
/etc/network/interfaces
After editing the content should look like:auto lo iface lo inet loopback allow-hotplug eth0 iface eth0 inet dhcp allow-hotplug wlan0 iface wlan0 inet manual wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf post-up ifdown eth0 allow-hotplug wlan1 iface wlan1 inet manual wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf post-up ifdown eth0
- Content of
/etc/wpa_supplicant/wpa_supplicant.conf
:ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="YOUR_SSID_HERE" psk="YOUR_SECRET_PASSPHRASE_HERE" id_str="SOME_DESCRIPTIVE_NAME" }
- Place a file named ‘ssh’, without any extension, onto the boot partition of the SD card. When the Pi boots, it looks for the ‘ssh’ file; if it is found, SSH is enabled and then the file is deleted. The content of the file doesn’t matter: it could contain either text or nothing at all.
- Insert the microSD card to pi and power the pi.(Pi should automatically connect to your wifi network).
- Open terminal and
ssh pi@[your pi-s ip] examp: ssh pi@192.168.1.10
You can check your pi-s ip address from routers settings/info page.
*Tutorial on Linux version 4.4.50/ Raspbian v. 8 (jessie)
Leave a Reply