2

I currently am trying to set up my Rasberry Pi so that it automatically connects to WiFi when I turn it on. I have tried a few tutorials online none of which worked for me. I was wondering if someone could help me out.

3
  • 1
    Specifically what have you tried? A little more detail is needed regarding your setup, ie. OS, wifi module, does it work when connecting manually?
    – Impulss
    Nov 4 '13 at 1:57
  • 1
    What wifi adapter are you using?
    – Loko
    Nov 4 '13 at 11:00
  • I solved this by doing the following: wpa-ssid "your ssid" wpa-psk "your password" address "assign a static IP address within your routers range" netmask "your netmask" gateway "your gateways address"
    – user10394
    Mar 14 '14 at 21:06
2

Assuming you have a Wifi SSID called "HOMEWIFI"...

First, in the file '/etc/wpa_supplicant/wpa_supplicant.conf' :

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
    ssid="HOMEWIFI" ##Your SSID
    scan_ssid=1
    key_mgmt=WPA-PSK  ## Your conf
    pairwise=CCMP TKIP ## Your conf
    group=CCMP TKIP ## Your conf
    proto=RSN ## Your conf
    id_str="home_wifi" ##What you want
    psk="password" ##Your Wifi password
    priority=10
}

And then, in '/etc/network/interfaces' :

iface home_wifi inet static ## Your id_str
    address 192.168.1.X ## The address you want for the rpi
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1

If you want dhcp:

iface home_wifi inet dhcp

I hope it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy