User avatar
MojaMike
Posts: 5
Joined: Thu Sep 08, 2016 12:33 am

Solved My Pi-3 / Raspbian Wi-Fi Connect Problem w/ dhcpcd

Thu Sep 15, 2016 10:45 pm

I couldn't get my Pi-3 to connect over wi-fi. So I did some searching and saw that many others were having a similar problem. After doing some troubleshooting, I now have my WiFi issue worked-out. Hopefully this may help somebody with a similar connection problem.

NOTE: Fwiw, my router reserves an IP address for my Pi-3. I am using a hidden SSID, and I also have MAC filtering enabled. (I know...) Everything is now working well. :)

Here is the updated configuration that I am now using with dhcpcd.

My '/etc/network/interfaces' file is: (No changes from the installed default for dhcpcd.)

Code: Select all

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

iface eth0 inet manual

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

allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

My '/etc/wpa_supplicant/wpa_supplicant.conf' file is:

Code: Select all

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

# my network
network={
    bssid=XX:XX:XX:XX:XX:XX
    ssid="mySSID"
    scan_ssid=1
    key_mgmt=WPA-PSK
    proto=RSN
    psk="myWiFiPassword"
}
NOTE: Use the info for your router within the 'network' block, and enclose with curly-braces.


And my '/etc/dhcpcd.conf' file is: (Default file with 3 options appended.)

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.
#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.
# Some interface drivers reset when changing the MTU so disabled by default.
#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

# A hook script is provided to lookup the hostname if not set by the DHCP
# server, but it should not be run by default.
nohook lookup-hostname

### My entries are as follows:

# only allow eth0 & wlan0
allowinterfaces eth0 wlan0

# tell DHCP server (my router) to broadcast replies
broadcast

# not using ipv6
ipv4only
I hope this works for you or is at least of some help in troubleshooting.

Return to “Troubleshooting”