I want to setup multiple network for wifi. One for my home and another for my office. I took the reference from stackoverflow but it did not work in mine. It works if i use the ethernet but not when using wifi dongle. Here how i setup for multiple wifi
/etc/network/interfaces
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
iface eth0 inet manual
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
/etc/wpa_supplement/wpa_supplement.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
scan_ssid=1
ssid="MiRouter"
psk="4444333221"
id_str="home"
priority=1
key_mgmt=WPA-PSK
}
network={
ssid="companyssid"
psk="password"
id_str="office"
priority=2
}
I am using raspberry pi 2 and OS is raspbian stretch. What have i missed here?
Before the configuration was following and it was working
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
wpa-scan-ssid 1
wpa-ap-scan 1
wpa-key-mgmt WPA-PSK
wpa-proto RSN WPA
wpa-pairwise CCMP TKIP
wpa-group CCMP TKIP
wpa-ssid "MiRouter"
wpa-psk "4444333221"
iface default inet dhcp
ssh
is NOT enabled by default. Post output ofip a
– Milliways Aug 23 '18 at 17:41ifconfig
- do you even see awlan0
(orwlx????????????
) device? is its IP address192.168.31.94
like you've mentioned in a comment below? Check the output ofdmesg
- any errors pertaining to wifi device there? You haven't specified what wifi dongle you are using. You may have one not compatible with RPi – Jaromanda X Aug 23 '18 at 23:34