I have a problem cofiguring Raspberry's 2B wifi connection. I have a usb wifi adapter that is detected by raspberry. What I want to achive is to connect to wifi immediately after boot. I need only to connect to two diffrent wifi connections: one at home, and one when using Android phone as a modem. Also i want IP in home to be static
my /etc/wpa_supplicant/wpa_supplicant.conf
looks like this:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="Name of home wifi"
psk="home wifi pass"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
id_str="home"
}
network={
ssid="android phone wifi name"
psk="android wifi pass"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
id_str="android"
}
and my /etc/network/interfaces
looks like this
source-directory /etc/network/interfaces.d
auto wlan0
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet manual
iface home inet static
address 192.168.1.155
netmask 255.255.255.0
gateway 192.168.1.1
iface android inet static
address 192.168.43.155
netmask 255.255.255.0
gateway 192.168.43.1
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf