3

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.

Striezel
  • 113
  • 8
menuhin
  • 171
  • 1
  • 4

1 Answers1

1

I thought I found the root cause of the problem:

The WiFi USB dongle was not fully supported: it has a Realtek RTL8191S WLAN chipset and although it was fully recognized and even the static IP somewhat worked, DHCP was not fully supported. Some other people ran into similar problems with the same dongle: http://www.forum-raspberrypi.de/Thread-csl-wlan-usb-stick-funktioniert-nicht

I did an rpi-update to update the firmware and then after reboot, I amended the /etc/network/interfaces file back from static IP to using DHCP allocated IP, and everything worked for almost 2 whole days. And then it stopped working again after some other software package updates and installation I performed. :\

menuhin
  • 171
  • 1
  • 4