1

Where can I find and install an AR9271 driver for the latest NetBSD? The target machine does not have Internet access and I need to setup the WiFi dongle first.

I only found this: https://www.daemon-systems.org/man/athn.4.html

UPDATE: wpa_supplicant was already written, but I didn't see my device.

When I plug in the dongle it's shown as:

ugen0 at uhub4 port 8 
ugen0: Mediatek 802.11 n WLAN, rev 2.01/00, addr 2 

ifconfig shows only re0 and lo0 interfaces.

UPDATE: I saw on some Linux forums that the dongle uses an Atheros chip, but I checked in Windows and see Ralink. The ral driver is also integrated in NetBSD, but the situation doesn't change - I see no ra~ device in dmesg.boot.

Gareth
  • 19,080

5 Answers5

2

If the NetBSD athn driver supports your hardware, all neccessary firmware files comes with NetBSD.

For the setup, configure wpa_supplicant for encrypted networks then start the daemon, followed from dhclient with the right interface (athn). You can take the conf files from a linux system. All wireless drivers don't support 802.11n or 802.11ac.

ge0rdi
  • 1,591
2

Given the kernel marks the device as "ugen", the device isn't recognized/claimed by any device driver.

Since it's a USB dongle, I would suggest trying a different dongle. There is a long list of supported devices for urtwn (using the Realtek RTL8188CU/RTL8188EU/RTL8192CU chip sets), urtw (using the Realtek RTL8187B/L chip set), zyd (using the ZyDAS ZD1211/ZD1211B chip set) and otus (Atheros USB AR9001U chip sets)

The manual pages for those devices include lists of known to work adapters. These days, I keep a recent copy of the list in the notepad on my phone for when I'm out shopping.

rum, ral, and atu are other drivers on my list.

1

First check your wireless adapter: ifconfig
The output will show your network devices (ethernet and wireless adapter) Is the athn0 driver in the list?

Then configure wpa supplicant:
vi /etc/wpa_supplicant.conf

Example:

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

It's important to set your exact SSID (name of your wlan) and of course your exact psk (preshared key). Both are case sensitive.

You can get more information on http://wiki.netbsd.org/tutorials/how_to_use_wpa_supplicant/

Second, configure rc init. Add entries to /etc/rc.conf to configure the network on startup:

dhcpcd_flags="-q -b"  
wpa_supplicant="YES"  
wpa_supplicant_flags="-B -i athn0 -c /etc/wpa_supplicant.conf"  

Use dhcpcd, the DHCP client daemon:

vi /etc/ifconfig.athn0
up
dhcp

Third, start wireless service: you have two possibilities

Restart your computer or

you can start wpa_supplicant with

/etc/rc.d/wpa_supplicant start

then restart your network with

/etc/rc.d/network restart  

Last but not least you can try as root a neat program to improve your configuration (in interactive mode):

wpa_cli

reconfigure
status
save_config
quit

After the configuration of your network card test if it's working correctly. Use the ping command to send 3 packets to the IP address of your localhost or to an DNS name of your choice, for example:

ping -c3 www.netbsd.org

And don't give up! NetBSD is rocksolid, no bloatware and nobody bothers you with systemd. And as a bonus you can use pkgsrc!

8bittree
  • 2,958
1

I just investigated this, and from what I can gather athk has only recently been added, to NetBSD 7 also called NetBSD Current (and not NetBSD 6 which I'm assuming is what you're running?), which was the development version of NetBSD until today more or less, where it was released, though it hasn't been announced yet.

In 7 it should be part of the generic kernel, so you shouldn't need to load the driver manually or anything. So I guess I'd suggest either upgrading to fx. 7 RC3 or reinstalling 7 RC3 from scratch now, or maybe wait a few days for it to be publically released and an ISO for that becomes available. Then, hopefully, it would just work automatically.
If you wish, you can get NetBSD 7 RC3 here.

miyalys
  • 2,311
0

On NetBSD you use wpa_supplicant to authenticate your device to your wlan. This requires writing a short configuration file, which is typically named /etc/wpa_supplicant.conf

Good luck, blackcat