Config Raspberry Pi with static ip WIFI

After several times searching the internet and finding several blog about static wifi ip-configuration for the rasp. I thought “Maybe it’s time to write a new instruction” ;). This instruction is usefull if you place you raspberry pi on place where you only have WiFi available.

Step 1 “Install OS”

Download and install “Raspbian” from http://www.raspberrypi.org/downloads on a SD-Card

Step 2 “Connect the Raspberry Pi and configure OS”
Connect the Raspberry Pi with a TV. HDMI – Keyboard – WIFI-adapter – Ethernet – Power adapter

Rasp_on_TV

Step 3 “Configure raspi”

Enable the following settings in the raspi-config

  • Expand filesystem
  • Enable SSH (under advanced options)Configuration

Reboot system!

Step 4 “WIFI settings”

  • Configure wlan interface for static ip with following commands
$sudo nano /etc/network/interfaces

Network Interfaces


auto lo

iface lo inet loopback
iface eth0 inet dhcp
iface default inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

iface mywifisetting inet static
address 192.168.1.150
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

Save and Exit “nano editor” CTRL-O and CTRL X

  • Configure wifi settings
$sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

wpa_supplicant.conf


ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

update_config=1

network={

ssid="THE_NAME_OF_YOUR_SID_WIFI"

psk="YOURWIFIPASSWORD"

proto=RSN

key_mgmt=WPA-PSK

pairwise=CCMP

auth_alg=OPEN

id_str="mywifisetting"

}

Save and Exit

Reboot and disconnect Ethernet

Test! Connect with putty!

NOTE: Change your raspberry pi hostname if you have more than 1 raspberry pi in your network! 

sudo nano /etc/hostname

 

sudo nano /etc/hosts
Hardware Software
Raspberry Pi (Hinix chipset)Sandisk Ultra 8 GBWifi adapter: TP-Link (TL-WN823N)

HDMI 1.4 Cable

Powersupply: 1A – 5V

Keyboard

TV (with HDMI)

Wheezy RaspbianRelease date: 2014-01-07Kernel: 3.10