JezT
Posts: 4
Joined: Fri Jun 14, 2019 10:47 am

Connection to dhcpcd lost [no wireless interfaces found] [SOLVED]

Fri Jun 14, 2019 11:08 am

My pi is currently connected through wifi and the internet connection works. However, the top right icon for the wifi settings isn't what it should be, when i hover on the icon it says, Connection to dhcpcd lost and when i click it it says no wireless interfaces found.

Everything works in wifi, to connect to a new network, i have to manually add the ssid and password in etc/wpa_supplicant/wpa_suppicant.conf this is such a hassle if i bring my pi anywhere and i have to keep adding networks manually, of course i can just do it in sudo raspi-config, but it would be waaay easier if the icon just works.

Im not sure if this is related but i installed samba on my pi which is working perfectly. I also use vnc viewer to connect to my pi if that helps.
vnc and ssh are enabled

here are some references:
Capture.PNG
Capture.PNG (33.02 KiB) Viewed 438 times
wpa_supplement:

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=PH

network={
	ssid="*****"
	scan_ssid=1
	psk="*****"
	key_mgmt=WPA-PSK
}

network={
	ssid="****"
	psk="****"
}
interfaces

Code: Select all

auto lo
iface lo inet loopback

allow-hotplug eth0
auto eth0
iface eth0 inet dhcp

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

iface default inet dhcp
and dhcpcd: (i didnt touch this)

Code: Select all

# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel

# Inform the DHCP server of our hostname for DDNS.
hostname

# Use the hardware address of the interface for the Client ID.
clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
#duid

# Persist interface configuration when dhcpcd exits.
persistent

# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# Generate Stable Private IPv6 Addresses instead of hardware based ones
slaac private

# Example static IP configuration:
#interface eth0
#static ip_address=192.168.0.10/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
#static routers=192.168.0.1
#static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1

# It is possible to fall back to a static IP if DHCP fails:
# define static profile
#profile static_eth0
#static ip_address=192.168.1.23/24
#static routers=192.168.1.1
#static domain_name_servers=192.168.1.1

# fallback to static profile on eth0
#interface eth0
#fallback static_eth0
Last edited by JezT on Fri Jun 21, 2019 5:57 am, edited 1 time in total.

hdtodd
Posts: 35
Joined: Tue Mar 04, 2014 1:53 am

Re: Connection to dhcpcd lost [no wireless interfaces found]

Sat Jun 15, 2019 3:41 am

I was having similar problems, and your posting helped me resolve mine. Perhaps this will help you in return though I can't see exactly what changes to suggest you make.

After some recent upgrades, my WiFi stopped working (but not Ethernet). At various times in my editing of config files, either the wlan0 used a random MAC address and got the wrong IP from the DHCP service, the wlan0 device wasn't found at all, or the wlan0 device wouldn't associate with the router (which had worked fine before the upgrades). I had given up fixing it until I read your posting.

I noticed that the upgrades to my system left /etc/network/interfaces with the following as the only un-commented line:

Code: Select all

source-directory /etc/network/interfaces.d
That is, it had no information, and the interfaces.d directory was empty.

I recalled that earlier versions had interfaces with the contents you posted, so I went back and commented out the new line and put in your contents, with one small addition:

Code: Select all

...
iface eth0 inet dhcp

[u]iface wlan0 inet dhcp
      hwaddress b8:27:eb:c1:63:ae[/u]
      
allow-hotplug wlan0
...
My addition of the hwaddress line was intended to make sure that the wlan0 device uses the static hardware address, not the random MAC address the new software was assigning, so that my router would assign it the IP address I want it to have.

With that change -- the reversion to the old version of "interfaces" and the insertion into it of the "iface ... hwaddress" lines -- the system now works as it should have. It boots with wlan0 functioning and with the correct IP address assigned.

Otherwise, my "interfaces", "dhcpd.conf", and "wpa_supplicant.conf" files are the same as yours (with my parameters in "wpa_supplicant".

I'm running

Code: Select all

$ uname -a
Linux Pi-6 4.19.50-v7+ #1234 SMP Thu Jun 13 11:06:37 BST 2019 armv7l GNU/Linux
on a Raspberry Pi-3B+ booting off a USB-connected hard drive. I'm running with

Code: Select all

# apt-cache show raspberrypi-kernel
Package: raspberrypi-kernel
Source: raspberrypi-firmware
Version: 1.20190517-1
Architecture: armhf
I've done both apt-get update/apt-get upgrade and rpi-update (the last time was earlier today) to get to these levels.

I hope this helps.

David

JezT
Posts: 4
Joined: Fri Jun 14, 2019 10:47 am

Re: Connection to dhcpcd lost [no wireless interfaces found]

Thu Jun 20, 2019 1:29 pm

hdtodd wrote:
Sat Jun 15, 2019 3:41 am
I was having similar problems, and your posting helped me resolve mine. Perhaps this will help you in return though I can't see exactly what changes to suggest you make.

After some recent upgrades, my WiFi stopped working (but not Ethernet). At various times in my editing of config files, either the wlan0 used a random MAC address and got the wrong IP from the DHCP service, the wlan0 device wasn't found at all, or the wlan0 device wouldn't associate with the router (which had worked fine before the upgrades). I had given up fixing it until I read your posting.

I noticed that the upgrades to my system left /etc/network/interfaces with the following as the only un-commented line:

Code: Select all

source-directory /etc/network/interfaces.d
That is, it had no information, and the interfaces.d directory was empty.

I recalled that earlier versions had interfaces with the contents you posted, so I went back and commented out the new line and put in your contents, with one small addition:

Code: Select all

...
iface eth0 inet dhcp

[u]iface wlan0 inet dhcp
      hwaddress b8:27:eb:c1:63:ae[/u]
      
allow-hotplug wlan0
...
My addition of the hwaddress line was intended to make sure that the wlan0 device uses the static hardware address, not the random MAC address the new software was assigning, so that my router would assign it the IP address I want it to have.

With that change -- the reversion to the old version of "interfaces" and the insertion into it of the "iface ... hwaddress" lines -- the system now works as it should have. It boots with wlan0 functioning and with the correct IP address assigned.

Otherwise, my "interfaces", "dhcpd.conf", and "wpa_supplicant.conf" files are the same as yours (with my parameters in "wpa_supplicant".

I'm running

Code: Select all

$ uname -a
Linux Pi-6 4.19.50-v7+ #1234 SMP Thu Jun 13 11:06:37 BST 2019 armv7l GNU/Linux
on a Raspberry Pi-3B+ booting off a USB-connected hard drive. I'm running with

Code: Select all

# apt-cache show raspberrypi-kernel
Package: raspberrypi-kernel
Source: raspberrypi-firmware
Version: 1.20190517-1
Architecture: armhf
I've done both apt-get update/apt-get upgrade and rpi-update (the last time was earlier today) to get to these levels.

I hope this helps.

David
Hey David, I tried inputting the static MAC address and still no change. My problem isnt really that my Pi cannot connect to the internet. Its more on the icon not allowing me to view other networks, or display that it is connected.

Thanks though

Milliways
Posts: 431
Joined: Fri Apr 25, 2014 12:18 am
Location: Sydney, Australia

Re: Connection to dhcpcd lost [no wireless interfaces found]

Fri Jun 21, 2019 1:21 am

If you left the interfaces file alone it should work!

Putting nonsense in the file won't help

Specifically, by calling dhcp in interfaces you cause dhcpcd to disable itself (as boot logs would show)

JezT
Posts: 4
Joined: Fri Jun 14, 2019 10:47 am

Re: Connection to dhcpcd lost [no wireless interfaces found]

Fri Jun 21, 2019 5:57 am

Milliways wrote:
Fri Jun 21, 2019 1:21 am
If you left the interfaces file alone it should work!

Putting nonsense in the file won't help

Specifically, by calling dhcp in interfaces you cause dhcpcd to disable itself (as boot logs would show)
Man! you are absolutely right! Thanks! you dont know how many hours ive been fixing this. Here's my new interfaces file. I remember editing this because I was setting up connection between my PC and raspi through LAN directly and it messed everything up.

Code: Select all

source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
This solved my problem, thanks!

Milliways
Posts: 431
Joined: Fri Apr 25, 2014 12:18 am
Location: Sydney, Australia

Re: Connection to dhcpcd lost [no wireless interfaces found]

Fri Jun 21, 2019 6:11 am

JezT wrote:
Fri Jun 21, 2019 5:57 am
Milliways wrote:
Fri Jun 21, 2019 1:21 am
If you left the interfaces file alone it should work!

Putting nonsense in the file won't help

Specifically, by calling dhcp in interfaces you cause dhcpcd to disable itself (as boot logs would show)
Man! you are absolutely right! Thanks! you dont know how many hours ive been fixing this. Here's my new interfaces file. I remember editing this because I was setting up connection between my PC and raspi through LAN directly and it messed everything up.

Code: Select all

source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
This solved my problem, thanks!
You don't need ANYTHING in the interfaces file with Stretch, although the Jessie file MAY work. dhcpcd has a wpa_supplicant hook in Stretch.

JezT
Posts: 4
Joined: Fri Jun 14, 2019 10:47 am

Re: Connection to dhcpcd lost [no wireless interfaces found]

Fri Jun 21, 2019 6:38 am

Milliways wrote:
Fri Jun 21, 2019 6:11 am
JezT wrote:
Fri Jun 21, 2019 5:57 am
Milliways wrote:
Fri Jun 21, 2019 1:21 am
If you left the interfaces file alone it should work!

Putting nonsense in the file won't help

Specifically, by calling dhcp in interfaces you cause dhcpcd to disable itself (as boot logs would show)
Man! you are absolutely right! Thanks! you dont know how many hours ive been fixing this. Here's my new interfaces file. I remember editing this because I was setting up connection between my PC and raspi through LAN directly and it messed everything up.

Code: Select all

source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
This solved my problem, thanks!
You don't need ANYTHING in the interfaces file with Stretch, although the Jessie file MAY work. dhcpcd has a wpa_supplicant hook in Stretch.
So you mean its way better to leave the file empty?

Return to “Troubleshooting”