Adventures with Wireless for NetBSD ==================================== Notes ------ My `/etc/rc.conf` file has the following: .. code-block:: bash dhcpcd=YES dhcpcd_flags="-qM wm0 iwn0" However, I find this from dhcpcd man page concerning the `-M` flag: Multiple interfaces If a list of interfaces are given on the command line, then dhcpcd only works with those interfaces, otherwise dhcpcd discovers available Ethernet interfaces that can be configured. When dhcpcd is not limited to one interface on the command line, it is running in Manager mode. The dhcpcd-ui project expects dhcpcd to be running this way. If a single interface is given then dhcpcd only works for that interface and runs as a separate instance to other dhcpcd processes. The -w, --waitip option is enabled in this instance to maintain compatibility with older versions. Using a single interface, optionally further limited to an address protocol, also affects the -k, -N, -n and -x options, where the same interface and any address protocol will need to be specified, as a lack of an interface will imply Manager mode which this is not. To force starting in Manager mode with only one interface, the -M, --manager option can be used. I will comment out `dhcpcd_flags` to see if that allows `iwn0` to get an IP address. If that fails, I will set `dhcpcd_flags` with only `iwn0`. Commenting out `dhcpcd_flags` seems to work. I unplugged my ethernet cable from `wm0` and rebooted. When NetBSD fully booted, my wireless NIC had an IP address!. Before, the only way I could get an IP address was to have the ethernet cable plugged into `wm0`. My Working Setup ----------------- `/etc/rc.conf` .. code-block:: bash sshd=YES ntpd=YES ntpdate=YES hostname=netwriter.ronverbs.dev # Network ifconfig_iwn0="up" wpa_supplicant=YES wpa_supplicant_flags="-i iwn0 -c /etc/wpa_supplicant.conf" dhcpcd=YES # dhcpcd_flags="-qM wm0 iwn0" # ---------- `/etc/wpa_supplicant.conf` .. code-block:: bash ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=wheel update_config=1 network={ ssid="Brentwood Guest" psk=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX scan_ssid=1 } network={ ssid="Brentwood" psk=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX scan_ssid=10 } Now, rebooting still allows me access to the web via wireless. Another Note about wpa_supplicant: ---------------------------------- I was getting the following when trying to connect, but once I removed the `dhcpcd_flags` line from `/etc/rc.conf`, that went away. .. code-block:: bash Starting wpa_supplicant. Successfully initialized wpa_supplicant ioctl[SIOCS80211, op=20, val=0, arg_len=7]: Invalid argument ioctl[SIOCS80211, op=20, val=0, arg_len=7]: Invalid argument