I posted a question previously on how to set up a static IP address on the rpi and eventually figured out, along with some others, that the answer was to change wpa-roam
to wpa-conf
when pointing to /etc/wpa_supplicant/wpa_supplicant.conf
, but why does this work?
i.e. when I have this in my /etc/network/interfaces
file:
auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet static
address 192.168.0.3
netmask 255.255.255.0
gateway 192.168.0.1
broadcast 192.168.0.255
network 192.168.0.0
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
Assuming that /etc/wpa_supplicant/wpa_supplicant.conf
has been properly configured, this method doesn't work.
This is the relevant output from iwconfig
:
wlan0 unassociated Nickname:"<WIFI@REALTEK>"
Mode:Managed Frequency=2.437 GHz Access Point: Not-Associated
Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
As well as from ifconfig
:
wlan0 Link encap:Ethernet HWaddr ec:1a:59:64:3a:36
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:847 errors:0 dropped:1029 overruns:0 frame:0
TX packets:759 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:677394 (661.5 KiB) TX bytes:133345 (130.2 KiB)
But everything magically starts working once you change wpa-roam
to wpa-conf
and run sudo /etc/init.d/networking restart
. When would you use wpa-roam
, and when would you use wpa-conf
?