# HOWTO D-Link DWA-125 wireless usb adapter

## natalizi

Based on (in portuguese): http://www.vivaolinux.com.br/topico/Debian/Dlink-DWA-125-1

1. Install the packages madwifi-ng-tools, wireless-tools, wpa_supplicant

For package wpa_supplicant enable madwifi as use flag

2. Download de linux driver in ftp://www.dlinkla.com/pub/drivers/DWA-125/

Extract the file for a local folder, for example using:

```
tar -xzvf <path to the file>
```

3. Install the driver

As root, enter the folder extracted an run:

```
make

make install

```

4. Plug the adpater on USB

Verify if the module rt3070sta (or similar) is loaded, with command:

```
lsmod | grep rt
```

5. Restart dbus

```
/etc/init.d/dbus restart
```

6. Edit /etc/conf.d/net

This is my example (using wpa):

```
modules=( "wpa_supplicant" )

wpa_supplicant_ra0="-Dwext"

config_ra0=( "dhcpcd" )
```

7. Create or edit /etc/wpa_supplicant/wpa_supplicant.conf

This is my example:

```
update_config=1

ctrl_interface=/var/run/wpa_supplicant

ap_scan=1

network={

    ssid="YOURNETWORKNAME"

    key_mgmt=WPA-PSK

    psk="YOURPASSPHRASE"

    priority=5

}
```

8. Create the service net.ra0 with command:

```
ln -s net.lo /etc/init.d/net.ra0
```

9. Start the service and get connected with:

```
/etc/init.d/net.ra0 start
```

10. Setting the connection to start at boot

Edit the line below in file /etc/conf.d/rc

```
RC_PLUG_SERVICES="!net.eth* net.ra0"

# Option !net.eth* avoid other network adapters to start - use wisely

# Option net.ra0 start the adpator at boot, initiating connection
```

----------

## NeddySeagoon

Moved from Networking & Security to Documentation, Tips & Tricks.

----------

## rlittle

I downloaded 2011_0107_RT3070_RT3370_Linux_STA_v2.5.0.1_DPO from the RT site

I had to add one step to get it to load the module (rt3070sta)

add:

```
MODULE_LICENSE("GPL");
```

to 2011_0107_RT3070_RT3370_Linux_STA_v2.5.0.1_DPO/os/linux/usb_main_dev.c

If I didn't, I got:

```
rt3070sta: Unknown symbol usb_alloc_urb (err 0)

rt3070sta: Unknown symbol usb_free_urb (err 0)

rt3070sta: Unknown symbol usb_alloc_coherent (err 0)

rt3070sta: Unknown symbol usb_register_driver (err 0)

rt3070sta: Unknown symbol usb_put_dev (err 0)

rt3070sta: Unknown symbol usb_get_dev (err 0)

rt3070sta: Unknown symbol usb_submit_urb (err 0)

rt3070sta: Unknown symbol usb_free_coherent (err 0)

rt3070sta: Unknown symbol usb_control_msg (err 0)

rt3070sta: Unknown symbol usb_deregister (err 0)

rt3070sta: Unknown symbol usb_kill_urb (err 0)

```

whenever I tried to load the module.

----------

