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.

  • As for checking whether the driver is loaded, maybe try kldstat -v | less? It looks like the interface name is ugen0(?), for configuring rc.conf and wpa_supplicant? – miyalys Sep 25 '15 at 13:26
  • 1
    There's no kldstat here. – Arman Hayots Sep 25 '15 at 14:08
  • ah, sorry! It's called modstat instead: "NetBSD and OpenBSD use the modload, modunload, and modstat tools." bsdnewsletter.com/bsda-book/… – miyalys Sep 25 '15 at 14:18
  • Got only ath and ath_hal. No athn, no ral. But why? And how load and start athn or ral? – Arman Hayots Sep 25 '15 at 17:05
1
+50

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.

| improve this answer | |
  • So, maybe better to wait NetBSD 7 release? When it planned? – Arman Hayots Sep 26 '15 at 9:06
  • 1
    They haven't said exactly, but I'm guessing within a few days? It seems it's already available here now, which it wasn't yesterday I think(?): ftp.netbsd.org/pub/NetBSD/NetBSD-7.0/iso So I'd probably go for that now personally, but up to you! – miyalys Sep 26 '15 at 14:33
  • 1
    athn is also listed here, and that's describing `NetBSD-current", which is still NetBSD 7 until release (after that it will be NetBSD 8): netbsd.org/support/hardware/usb.html – miyalys Sep 26 '15 at 14:38
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.

| improve this answer | |
  • But how check driver installation? – Arman Hayots Sep 25 '15 at 5:45
  • Look in your dmesg log or call dmesg. There should be a line like athn is connected to something. – darktrym Oct 11 '15 at 13:52
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.

| improve this answer | |
  • And that's a result? Not work's just because unrecognized? How much MS engineers worked to avoid such problems and so in 2015 on of best post-UNIX can't? – Arman Hayots Sep 25 '15 at 16:51
  • 1
    @ArmanHayots, your statement is out focus, you cant compare MS with Unix, you are mixing water with oil, The mostly Unix Machines run as Servers, and servers do not have any wireless interface. I could give several examples why Unix wireless development is more hard to find as example propietary firmwares...blabla. There we have OSX with a LOT of develop of wireless firmwares, i cant find a right place where your comment is OK – Francisco Tapia Sep 25 '15 at 20:46
  • 1
    @ArmanHayots -- You can bet that MS didn't develop the drivers for MS-Windows. Either TP-Link did, or maybe Atheros. and they asked (politely) to have Microsoft sign it, and possibly distribute it. For equivelency ask TP-Link or Atheros to write the driver for NetBSD. Or get the documentation for the chipset and modify the existing athn driver to support the chipset (or, possibly, write a new driver.) – Eric Schnoebelen Sep 26 '15 at 0:14
  • I'm talking about something another. On Windows even if device is not recognized, I can install driver manually and it will work if chip matches. – Arman Hayots Sep 26 '15 at 9:04
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!

| improve this answer | |
  • That's good one, I'm done most of this already. But ifconfig shows only re0 and lo0, no athn0. And in dmesg.boot I see no athn, only ugen0. – Arman Hayots Sep 25 '15 at 13:41
  • You have got the ath driver in the output of the ifconfig command? – blackcat Sep 25 '15 at 17:22
  • Then replace athn0 with ath0 in the instructions above. Besides, you get more information about your driver with the command: man ath – blackcat Sep 25 '15 at 17:37
  • ifconfig only shows re0 (ethernet) and lo0 (loopback). No ath/athn, no ral there. – Arman Hayots Sep 26 '15 at 9:13
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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.