# D-Link WDA 1320 Compatability



## fleetadmiral73 (Jul 15, 2010)

Hello,

I have a fresh install of 8.0 i386. My wireless card, a D-Link WDA 1320, does not seem to be detected automatically. If there are drivers for it, currently its not easy for me to get the computer a network connection other than wireless so putting the drivers on external media for transfer would be easiest. 

This is my first attempt at using a BSD distribution. 

Thank you.


----------



## fleetadmiral73 (Jul 15, 2010)

In Linux, I know using ndiswrapper and a windows driver can provide compatability with many network devices. Would such a solution work here? (I could not find the edit post option).


----------



## fleetadmiral73 (Jul 15, 2010)

I am reading through documentation located here:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/config-network-setup.html
I need a .sys and .inf file. 

At D-Links website, 
http://www.dlink.com/products/default.aspx?pid=WDA-1320&tab=3
I don't see a .inf file in the .zip available for download.


----------



## mky (Jul 15, 2010)

Have you tried ath(4) driver? Load it as root:


```
kldload if_ath
```

and check ifconfig.
Also check this thread for wireless network configuration.


----------



## fleetadmiral73 (Jul 15, 2010)

I found a .inf file in the XP driver folder. Loading it failed, output is in ndis error attachment. 

ifconfig output is also included. 

The output of kldload was
	
	



```
kldload: can't load if+ath: Exec format error
```

I have started reading through the pages you suggested, but am unsure if I have the knowledge to apply the information in solving this.


----------



## mky (Jul 15, 2010)

Checking your ifconfig.txt i see that you already have loaded ath(4) driver. ath0: is your wireless card, wlan0: is wireless device that you should configure. Check the link for thread which i wrote you in my previous post. There you will find all the information to configure wireless.


----------



## wblock@ (Jul 15, 2010)

```
kldload: can't load if+ath: Exec format error
```

Something's not right there.  If you mistyped the command, that wouldn't be the error.  If you mistyped the error, it still shouldn't be that error.

Maybe you're combining if_ath and ndis?  That would be bad.  Just log in as root, and:

`# kldload if_ath`
`# ifconfig`

Look for ath0.


----------



## fleetadmiral73 (Jul 15, 2010)

I read through the man pages for ath(4) and wlan(4), but I am not understanding what I need to do in my case. The closest thing I can find that seems to relate to what I want to do is 

Join an existing BSS network (ie: connect to an access point):

`ifconfig ath0 inet 192.168.0.20 netmask 0xffffff00`
But this seems to presuppose that my wireless card works and is detected properly. That, and they have an example for WEP networks but not WPA. If my card were detected properly, i would expect I would see my network SSID show up in a toolbar aplet or something. 

Thank you for the link and encouraging me to read through for the information, but I am going to need more explicit instructions before I can move forward.


----------



## fleetadmiral73 (Jul 15, 2010)

wblock said:
			
		

> ```
> kldload: can't load if+ath: Exec format error
> ```
> 
> ...



The error I got was in fact if_ath, but I did not see the type until after I posted, and I can't seem to edit posts here! I'm going to go run your commands now and post the output.


----------



## fleetadmiral73 (Jul 15, 2010)

wblock said:
			
		

> ```
> kldload: can't load if+ath: Exec format error
> ```
> 
> ...



Here is the output. I copied it from the terminal this time. Disregard the attachment name typo.


----------



## wblock@ (Jul 15, 2010)

Is your access point using WPA?

Sorry, I missed the ifconfig output earlier.  The good news is that you have an Atheros chipset and it's recognized!

Now you just have to figure out what the access point wants, hopefully WPA.


----------



## fleetadmiral73 (Jul 15, 2010)

Yes, I have my router using WPA Personal, using TKIP and AES. Its using WPA only, and not WPA2.


----------



## wblock@ (Jul 15, 2010)

Okay, then this should be easy.  In /etc/rc.conf:


```
wlans_ath0="wlan0"
ifconfig_wlan0="WPA DHCP"
```

Then edit /etc/wpa_supplicant.conf to have your ssid and key:


```
network={
        ssid="myssid"
        psk="mysooperdoopersecretkey"
}
```

On restart, it should connect to your access point.  That's it.


Notes: web search for TKIP.  You should probably turn it off.
WPA with only AES is essentially WPA2.  There's some subtle
distinction I've missed, maybe.

You can restart it manually:
`# /etc/rc.d/netif restart`

(I've seen problems with restarting wireless networking--as in crash--which
I've been told separately are
A) due to problems with devd, and 
B) there should be no problems with devd.)


----------

