I am trying to set my Pi2 to have DHCP allocated IP for its USB WiFi dongle. However, everything it got was a 169.254.x.x (169.254.155.42) IP address. Setting static IP works somehow, but with some other problems.
Here is my /etc/network/interfaces
:
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet manual
auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
auto wlan1
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
The wpa_supplicant.conf
looks like this:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="My_SSID"
psk="My_Wifi_password"
#proto=RSN
#key_mgmt=WPA-PSK
#pairwise=CCMP
#auth_alg=OPEN
}
The dhcpcd.conf
is unmodified.
Can you give me some suggestions to find out the source of problem?
Thanks.
[ iface wlan0 inet manual wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf ]
as stated in the link, but the result was the same.
– menuhin Feb 15 '16 at 16:24169
address islink-local
- it is what happens before allocation. Have you tried using GUI? You need to confirm that the WiFi Dongle (You give no details) is detected and has a driver. Assuming this is OKdmesg
should show attempt to connect. – Milliways Feb 15 '16 at 21:46