Page 1 of 1

RaspberryPi automatic connect to hidden wireless network

Posted: Wed Dec 21, 2016 8:39 pm
by Peter_w
Hello,

I want to setup my RaspberryPi so it can connect
automatically to a hidden wireless network.

Anyone know how to do this?

Re: RaspberryPi automatic connect to hidden wireless network

Posted: Wed Dec 21, 2016 9:08 pm
by Chris
if it is protected WPA
you need to setup a /etc/wpa_supplicant/wpa_supplicant.conf

Code: Select all

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Code: Select all

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

network={
ssid="YOURSSID"
psk="YOURPASSWORD"

# Protocol type can be: RSN (for WP2) and WPA (for WPA1)
proto=WPA

# Key management type can be: WPA-PSK or WPA-EAP (Pre-Shared or Enterprise)
key_mgmt=WPA-PSK

# Pairwise can be CCMP or TKIP (for WPA2 or WPA1)
pairwise=TKIP

#Authorization option should be OPEN for both WPA1/WPA2 (in less commonly used are SHARED and LEAP)
auth_alg=OPEN
}
You also need to tell it to ue it:
Update /etc/network/interfaces

Code: Select all

iface wlan0 inet dhcp
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
You need to restart the RaspberryPi.

Re: RaspberryPi automatic connect to hidden wireless network

Posted: Wed Dec 21, 2016 9:20 pm
by Chris
You can also add a fixed ip-address:

Update /etc/network/interfaces

Code: Select all

iface wlan0 inet static
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
address 192.168.1.81
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.254