1

This question (and answer) relate to an obsolete OS and not relevant to ANY current system.

I have a Raspberry Pi B+ which is connected to my modem/router via a TP-Link TL-WN725N usb adapter. It works fine, however if i turn off the router and than back, the Raspberry doesn't reconnect automatically. I need to plug and unplug the adapter back.

This is the content of /etc/network/interfaces:

interfaces
auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
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

I have a static ip reserved by the router

2 Answers 2

2

I had a similar problem I think. Try the wpa_supplicant.conf file without the full auto wlan1 entry so your config file looks like this: interfaces auto lo iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

If this doesn't works, you can try the wpa.conf file instead of wpa_supplicant.conf file.

5
  • However i don't use wlan1, the adapter is wlan0.
    – Matteo
    Jan 5, 2016 at 14:57
  • Then you can try the '/etc/wpa.conf' file instead of *wpa_supplicant.conf'. The file contains 'network={ ssid="" psk="" }'
    – Johannes
    Jan 5, 2016 at 15:15
  • What are the differences?
    – Matteo
    Jan 5, 2016 at 15:17
  • I am not completely sure. It works fine for me since I changed it. Maybe I should try again the wpa_supplicant.conf. Can't find the blog entry for this again, sorry.
    – Johannes
    Jan 5, 2016 at 15:27
  • Checked now, I have no /etc/wpa.conf file, the ssid and password file is /etc/wpa_supplicant/wpa_supplicant.conf
    – Matteo
    Jan 5, 2016 at 15:31
0

I have had similar problems on two of my networked Pis. On both, the issue was that I had done in-place upgrades on the systems and by mistake ended up with two network control packages running at the same time on both systems.

On one system I had dhcpcd and dhclient, on the other I had dhcpcd and wicd.

For the system with dhclient, the solution was:

Find out if dhclient (or wicd) is in use

ps -elf | grep dhclient

Then remove it

sudo apt remove --purge dhclient

Then reboot

sudo shutdown -r now

or sudo reboot

I followed a similar process on the system that had dhcpcd and wicd. There were multiple wicd packages running and I needed to remove all of them.

1
  • MatsK, thank you for the editing! Nov 25, 2022 at 3:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.