usb recognizes the device. Next step is Networking. The basic steps that need to happen
- urtwn0 needs to be "up"
- urtwn0 needs an IP address - two ways
negotiate with the access point via dhcpcd or set a static IP
- You could also have problems with your router - for example specifying wpa3 - NetBSD only supports wpa2. By the way, OpenBSD just funded wpa3 support:
Undeadly WPA3 support
In NetBSD there can be issues if dhcpcd tries to validate urtwn0 before the interface is fully up and running. If you run $ ifconfig urtwn0, it will show if you have an IP address:
Setting up TCP/IP specifically section 24.1.2 which shows the output of ifconfig before and after getting an IP address assignment.
Your router should also have a log that shows urtwn0 requesting an IP.
Without an IP, you should be able to scan for networks:
# wpa_cli scan
# wpa_cli scan_results
Selected interface 'iwm0'
16:01:33.578: bssid / frequency / signal level / flags / ssid
xx:xx:xx:xx:xx:xx 5180 91 [WPA2-PSK-CCMP][ESS] FRITZ!Box 1000 EZ
Older NetBSD releases had an alternative to dhcpcd which is dhclient.it is less complex and bulky but for security reasons, NetBSD pushes dhcpcd and my 11.0 has no man page for dhclient. dhclient is available as a package.
NetBSD wifi dhcpcd problems are common. My recent 11.0-stable install using dhcpcd sometimes fails on boot to get an IP. In which case, I run as root # service dhcpcd restart.
I could not find the handbook section on setting a static IP but Google's AI spits out a reasonable guide.
Method 2: Permanently via /etc/rc.conf
To make the static IP configuration persistent across reboots, add the interface settings to /etc/rc.conf:
Open /etc/rc.conf using your preferred text editor (e.g., vi /etc/rc.conf).
Add the ifconfig_urtwn0 variable:
sh
ifconfig_urtwn0="inet 192.168.1.50 netmask 255.255.255.0 up"
Use code with caution.
If this interface provides your default route to the internet, set the default gateway in the same file:
sh
defaultroute="192.168.1.1"
Use code with caution.