# Problem getting a PCI D-Link DWL 520 Rev. E1 (?) to work

## Grammarian

Hi all,

I'm having trouble getting my D-Link PCI Wireless card to work, even after going through the advice here on the forum.

I'm running 2.6 (2.6.1 to be exact), so I figured I'd try the native drivers first, since I'd heard that linux-wlan-ng had some problems with 2.6.

Using hermes, orinoco, and orinoco_pci seemed to be fine, but I couldn't even get the interface to be created.  Checking dmesg gave an error about a timeout reading a cmd register or something like that.

D-Link seems to want you to use linux-wlan-ng for the DWL520 (which I think has the E1 rev.  It's either that or B).  So I emerge linux-wlan-ng (FEATURES="-sandbox -userpriv"), and get the config files set up.

I try loading the driver (after restarting in case the last drivers confused the hardware), and I get the same error message!  Timeout in cmd reg.  In this case, the exact driver was prism2_pci, IIRC.

lspci says that it is an Intersil Prism 2.5, so I'm pretty sure I'm using the right driver.

I was wondering if anyone knows how to get this card working under 2.6.  2.4 would be acceptable, I guess (I haven't even tried that...), but I'd like to have it work under 2.6.  It works just fine under Windows XP on the same computer.

Thanks in advance for any advice.

----------

## yuppienetworking

I have the same problem,

I tried to install gentoo with the wireless card but i'm stuck with the timeout error.

```

[livecd] $ wlanctl_ng wlan0 lnxreq_ifstate ifstate=enable

hfa384x_docmd_wait: hfa384x_cmd timeout(1), reg=0x8002

hfa384x_drvr_start: Initialize command failed

hfa384x_drvr_start: Failed, result = -110

prism2sta_ifstate: hfa384x_drv_start() failed,result= -110

message = lnxreq_ifstate

ifstate=enable

resultcode=implementation_failure

```

That happens with both 2.4 and 2.6 kernels of the 2004.0 livecd

I was hoping that the portage version of 2.6 would solve the problem, but now that I read your post, I lost my optimism.

Will post if luck changes

----------

## yuppienetworking

I finally managed to configure my DWL-520 rev E wireless pci card, but I've been very busy, I will post my solution tonight

----------

## pandaxiongmao

I really need to know how to set this wireless device up. Can somebody post the HOWTO?

Update: I found this website, after I did a search attempt using Google. Is there any easier way?

----------

## yuppienetworking

That's the website where I found the solution...

Read it CAREFULLY.

Here are a couple of tips:

- You must have a DWL-520 Rev E (or E1)

- md5 numbers on the page are wrong, I have 

```
8a0d97de764ff1d1b20c96ff41e09dd2  primary/pm010102.hex

4fd38f5e6a3f8c3314c830eb66eed6ee  1.8.0/rf010800.hex
```

- I patched my kernel, I recommend it

- Don't forget to add hostap_pci to /etc/modules.autoload.d/kernel-2.6

- check that hostap_fw_load is in your path

Steps:

0.- download all files

1.- wireless-tools

```
emerge wireless-tools
```

2.- install drivers (see website)

2.1.- configure kernel (patch it if you want to)

3.- install utils

4.- configure utils

4.1.- run

```
hostap_fw_load wlan0
```

5.- add aliases to modules.conf

6.- configure /etc/conf.d/net to dhcp wlan0

7.- this command:

```
iwconfig wlan0 mode Managed essid default
```

this IS CaSe SeNsItIvE!!! 

8.- dhcpcd wlan0

Optionally, you can write a net.wlan0 init script, just copy net.eth0 and add steps 4.1 and 7

and 

```
rc-update add net.wlan0 default
```

----------

## pandaxiongmao

I followed the above walkthrough.

Here is my iwconfig output:

```

mycomputer root # iwconfig

lo        no wireless extensions.

dummy0    no wireless extensions.

eth0      no wireless extensions.

wifi0     IEEE 802.11b  ESSID:"default"  

          Mode:Managed  Frequency:2.467GHz  Access Point: 44:44:44:44:44:44  

          Bit Rate:2Mb/s   Sensitivity=1/3  

          Retry min limit:8   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality:0/70  Signal level:-73 dBm  Noise level:-73 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:54   Missed beacon:0

wlan0     IEEE 802.11b  ESSID:"default"  

          Mode:Managed  Frequency:2.467GHz  Access Point: 44:44:44:44:44:44  

          Bit Rate:2Mb/s   Sensitivity=1/3  

          Retry min limit:8   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality:0/70  Signal level:-73 dBm  Noise level:-73 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:54   Missed beacon:0

```

I'm really clueless this time...

----------

## pandaxiongmao

 *yuppienetworking wrote:*   

> 
> 
> 5.- add aliases to modules.conf
> 
> 

 

The website said that we should add the alias into "modprobe.conf" if you're using kernel 2.6 version. Do I miss something?

yuppienetworking, I suggest you rewrite your walkthrough w/ some additional explanation, then you may post it into Tips&Tricks page; therefore, any fellow Gentooers who happened to buy this card would be very grateful to you.

----------

## pandaxiongmao

IT WORKS

I'M VERY HAPPY

----------

## UberLord

 *yuppienetworking wrote:*   

> 
> 
> Optionally, you can write a net.wlan0 init script, just copy net.eth0 and add steps 4.1 and 7
> 
> and 
> ...

 

I have an ebuild that take care of configuration and startup - hooks into the generic Gentoo net.eth0 in baselayout.

This means that whenever net.eth0 gets updated, everything gets updated including wireless!

The only proviso is the net.xxx is symlinked to net.eth0

----------

## yuppienetworking

 *Quote:*   

> The website said that we should add the alias into "modprobe.conf" if you're using kernel 2.6 version. Do I miss something? 

 

You should not add this alias to modprobe.conf, you should add it to modules.conf and then run modules-update.

modprobe.conf explains this in its header

 *Quote:*   

> yuppienetworking, I suggest you rewrite your walkthrough w/ some additional explanation, then you may post it into Tips&Tricks page; therefore, any fellow Gentooers who happened to buy this card would be very grateful to you.

 

Yes, I did it because I got a PM requesting it and had little time, I will rewrite it when I have more time, so I can explain everything

 *Quote:*   

> IT WORKS 
> 
> I'M VERY HAPPY

 

I'm glad I helped

----------

## yuppienetworking

Forgot to ask something

 *Quote:*   

> I have an ebuild that take care of configuration and startup - hooks into the generic Gentoo net.eth0 in baselayout. 
> 
> This means that whenever net.eth0 gets updated, everything gets updated including wireless! 
> 
> 

 

baselayout-1.8.12?

----------

## UberLord

 *yuppienetworking wrote:*   

> Forgot to ask something
> 
>  *Quote:*   I have an ebuild that take care of configuration and startup - hooks into the generic Gentoo net.eth0 in baselayout. 
> 
> This means that whenever net.eth0 gets updated, everything gets updated including wireless! 
> ...

 

What exactly was the question? My ebuild required baselayout >= 1.8.11

----------

## pandaxiongmao

It's been a while, and suddenly I got this message while I was trying to activate my wireless connection:

```
Host AP driver data for device wlan0 not found in procfs
```

I'm stuck  :Sad: 

PS: I typed this message from my friend's PC.

Update: Nevermind, it's working now after I shut the computer down for a while.

----------

