I have a set of 24 Raspberry-Pi Zero W that I need to connect to a router (Netgear NightHawk AC2400) with SSID:NETGEAR30. I want all of them to connect on system start to the router. I have programmed the WiFi credentials in the wpa_supplicant file as follows:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB
network={
ssid="S.A.L.'S"
psk="password1"
priority=1
}
network={
ssid="NETGEAR30"
psk="password2"
key_mgmt=WPA-PSK
priority=2
}
Both networks are available and since NETGEAR30 has a higher priority, the raspberry Pis are supposed to connect to it on startup. However, at startup, some cameras connect to the other network (S.A.L.'S). The NETGEAR30 has a good signal strength so I believe thats not the issue. About half of the cameras connect to NETGEAR30 and the other half connect to S.A.L.S. Upon restarting the cameras, the distribution is somewhat different. For some reason, I can not delete SALS network.
I need help as to why not all 24 cameras are connecting to the router. Is there any limitation?
The output of the netgear router connected IPs are shown below. Notice some of the IP addresses (0.0.0.0) and the device name --. The MAC addresses are the ones for Raspberry Pis.
# 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
#interface eth0
#static ip_address=10.10.2.129/140
#static routers=10.10.2.1
#static domain_servers=10.10.2.1
#interface wlan0
#static ip_address=10.10.2.129/140
#static routers=10.10.2.1
#static domain_servers=10.10.2.1
#static domain_name_servers=8.8.8.8 8.8.4.4
#static domain_search=
The network interfaces file is as below:
# 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
allow-hotplug usb0
iface usb0 inet static
metric 404
address 169.254.89.182
netmask 255.255.0.0
network 169.254.255.255
gateway 169.254.89.1
wpa_cli select_network [name]
works on pi-zero-w.)/etc/network/interfaces
: "# Please note that this file is written to be used with dhcpcd". This does not only belongs to static ip addresses. Please read Differences between /etc/dhcpcd.conf and /etc/network/interfaces? and have a look at How do I set up networking/WiFi/static IP address?.