# D-Link DWL-122 Wireless USB Adapter HOWTO

## juliancoccia

This adapter uses a Prism2 chipset, which is supported by linux-wlan-ng version 0.2.1-pre13 or later, thanks to a patch written by Andrew Beresford. Unfortunately the version in portage as of today is 0.2.0, which means you will have to manually download the latest version and install it yourself.  

Note: Since this is a Gentoo forum, which means that you already have your kernel sources cleanly installed. For a full version of this guide, visit my blog: http://julian.coccia.com/article-53.html

Check the current version with emerge -s linux-wlan-ng. If you get version 0.2.1-pre13 or later, simply install with USE="usb" emerge linux-wlan-ng, otherwise follow the instructions below.

- Get the latest linux-wlan-ng drivers (0.2.1-pre16 in this case), uncompress and configure as follows:

```

wget ftp://ftp.linux-wlan.org/pub/linux-wlan-ng/linux-wlan-ng-0.2.1-pre16.tar.gz

tar -zxf linux-wlan-ng-0.2.1-pre16.tar.gz

cd linux-wlan-ng-0.2.1-pre16

./Configure

-------------- Linux WLAN Configuration Script -------------

The default responses are correct for most users.

Build Prism2.x PCMCIA Card Services (_cs) driver? (y/n) [y]: n

Build Prism2 PLX9052 based PCI (_plx) adapter driver? (y/n) [n]: n

Build Prism2.5 native PCI (_pci) driver? (y/n) [n]: n

Build Prism2.5 USB (_usb) driver? (y/n) [n]: y

Linux source directory [/usr/src/linux]:

The kernel source tree is version 2.4.23.

Alternate target install root directory on host []:

Module install directory [/lib/modules/2.4.23]:

It looks like you have a System V init file setup.

Prefix for build host compiler? (rarely needed) []:

Build for debugging (see doc/config.debug) (y/n) [n]:

Configuration successful.

```

- Compile and install with:

```
make all

make install
```

- That's all. Now you can tail /var/log/messages -f and plug in your Wifi usb adapter. You will see something like this:

```
Dec 22 19:40:01 laptop kernel: hub.c: new USB device 00:07.2-2, assigned address 2

Dec 22 19:40:01 laptop kernel: usb.c: USB device 2 (vend/prod 0x2001/0x3700) is not claimed by any active driver.

Dec 22 19:40:04 laptop /etc/hotplug/usb.agent: Setup prism2_usb for USB product 2001/3700/132

Dec 22 19:40:05 laptop /etc/hotplug/wlan.agent: WLAN startup on null (null)

Dec 22 19:40:05 laptop kernel: prism2_init: prism2_usb.o: 0.2.1-pre16 Loaded

Dec 22 19:40:05 laptop kernel: prism2_init: dev_info is: prism2_usb

Dec 22 19:40:05 laptop kernel: usb.c: registered new driver prism2_usb

Dec 22 19:40:05 laptop /etc/hotplug/wlan.agent: WLAN p80211 starting!

Dec 22 19:40:05 laptop /etc/hotplug/wlan.agent: WLAN register on wlan0 (prism2_usb)

Dec 22 19:40:05 laptop /etc/hotplug/wlan.agent: WLAN wlan0 registered.

Dec 22 19:40:05 laptop /etc/hotplug/net.agent: invoke ifup wlan0

Dec 22 19:40:05 laptop wland[1071]: wland daemon init successful

Dec 22 19:40:05 laptop wland[1071]: netlink socket opened and bound successfully

Dec 22 19:40:05 laptop /etc/hotplug/wlan.agent: /sbin/prism2dl not found, aborting firmware download.

Dec 22 19:40:06 laptop kernel: ident: nic h/w: id=0x8026 1.0.0

Dec 22 19:40:06 laptop kernel: ident: pri f/w: id=0x15 1.1.3

Dec 22 19:40:06 laptop kernel: ident: sta f/w: id=0x1f 1.7.1

Dec 22 19:40:06 laptop kernel: MFI:SUP:role=0x00:id=0x01:var=0x01:b/t=1/1

Dec 22 19:40:06 laptop kernel: CFI:SUP:role=0x00:id=0x02:var=0x02:b/t=1/1

Dec 22 19:40:06 laptop kernel: PRI:SUP:role=0x00:id=0x03:var=0x01:b/t=1/4

Dec 22 19:40:06 laptop kernel: STA:SUP:role=0x00:id=0x04:var=0x01:b/t=1/12

Dec 22 19:40:06 laptop kernel: PRI-CFI:ACT:role=0x01:id=0x02:var=0x02:b/t=1/1

Dec 22 19:40:06 laptop kernel: STA-CFI:ACT:role=0x01:id=0x02:var=0x02:b/t=1/1

Dec 22 19:40:06 laptop kernel: STA-MFI:ACT:role=0x01:id=0x01:var=0x01:b/t=1/1

Dec 22 19:40:06 laptop kernel: Prism2 card SN: 000000000000

Dec 22 19:40:11 laptop /etc/hotplug/wlan.agent: WLAN wlan0 brought up successfully.

Dec 22 19:40:11 laptop /etc/hotplug/wlan.agent: WLAN bringing up layer 3+ with /sbin/ifup

Dec 22 19:40:11 laptop kernel: linkstatus=CONNECTED

```

- Now you need to configure your network accordingly with your access point. Edit /etc/wlan/wlan.conf and set your SSID as follows:

```
SSID_wlan0="mywlan"

ENABLE_wlan0=y

```

- This means you will need a /etc/wlan/wlancfg-mywlan file. You can use the included wlancfg-DEFAULT for reference. You might want to try first with the default configuration, disabling WEP on your access point, but do not forget to enable it once you know it works:

cp /etc/wlan/wlancfg-DEFAULT /etc/wlan/wlancfg-mywlan

Note: When enabling WEP make sure there are NO spaces/tabs after "=" in the line dot11WEPDefaultKey0=00:01.... otherwise it WILL NOT WORK !!!. I have submitted this info, and hopefully will be corrected in future versions.

- Configure now your IP:

```
ifconfig wlan0 192.168.0.2 netmask 255.255.255.0

route add -net default gw 192.168.0.1
```

Note: This IP configuration will work with most default configurations. Make sure you set the right local (wlan0) and gateway (gw) ip addresses. You may even have DHCP enabled on your access point, in that case you can obtain your ip automatically with dhclient

Note2: Make sure CONFIG_PACKET and CONFIG_FILTER are enabled in your kernel if you expect DHCP to work.

That should get you going. Enjoy

Julian

----------

## Tamerz

Just wanted to add some things that got in the way for me.

Using kernel 2.6 you have to make a symbolic link to get linux-wlan-ng to emerge.

```
cd /usr/src/linux/arch/ 

ln -s i386 x86
```

As mentioned you have to use version 0.2.1-pre13 or later except you can't use beyond 0.2.1-pre17 with 2.6.  So what I did is:

```
FEATURES="-sandbox" emerge /usr/portage/net-wireless/linux-wlan-ng/linux-wlan-ng-0.2.1-pre17.ebuild
```

Also good to point out you must have hotplug installed and running.

Now I'm having problems though.  The device is listed when I do a ifconfig -a as wlan0 but I can't do anything with it.  I tried dhcpcd wlan0 and had the WEP off.  It just sat there and didn't do anything.

EDIT: I think I found the problem.  One of my config files is named wrong   :Embarassed:    I'll fix it and find out.

----------

## juliancoccia

Does it work if you set the IP address manually with ifconfig wlan0 ip.address bla bla ?

----------

## Tamerz

Nope.  I just tried that and I even fixed the config file name.  The wlan0 shows up like I said but even if I configure it, it can't even ping the gateway.

----------

## juliancoccia

Then I can't think of anything other than a bad /etc/wlan/ configuration.

Two things to check

1-That you have created a file names wlancfg-mynetwork that matches the SSID_wlan0="mynetwork" defined in wlan.conf

2-You have NOT left any spaces after the = sign on any config file

----------

## Tamerz

I wonder if the 5th and second to last lines have anything to do with it?  Here is what comes up when I plug the adapter in:

```
Mar 11 13:45:40 timmay usb 3-3: new full speed USB device using address 3

Mar 11 13:45:40 timmay prism2usb_init: prism2_usb.o: 0.2.1-pre17 Loaded

Mar 11 13:45:40 timmay prism2usb_init: dev_info is: prism2_usb

Mar 11 13:45:40 timmay drivers/usb/core/usb.c: registered new driver prism2_usb

Mar 11 13:45:40 timmay modprobe: FATAL: Module wlan0 not found.

Mar 11 13:45:40 timmay wland[4610]: wland daemon init successful

Mar 11 13:45:40 timmay wland[4610]: netlink socket opened and bound successfully

Mar 11 13:45:41 timmay ident: nic h/w: id=0x8026 1.0.0

Mar 11 13:45:41 timmay ident: pri f/w: id=0x15 1.1.3

Mar 11 13:45:41 timmay ident: sta f/w: id=0x1f 1.7.1

Mar 11 13:45:41 timmay MFI:SUP:role=0x00:id=0x01:var=0x01:b/t=1/1

Mar 11 13:45:41 timmay CFI:SUP:role=0x00:id=0x02:var=0x02:b/t=1/1

Mar 11 13:45:41 timmay PRI:SUP:role=0x00:id=0x03:var=0x01:b/t=1/4

Mar 11 13:45:41 timmay STA:SUP:role=0x00:id=0x04:var=0x01:b/t=1/12

Mar 11 13:45:41 timmay PRI-CFI:ACT:role=0x01:id=0x02:var=0x02:b/t=1/1

Mar 11 13:45:41 timmay STA-CFI:ACT:role=0x01:id=0x02:var=0x02:b/t=1/1

Mar 11 13:45:41 timmay STA-MFI:ACT:role=0x01:id=0x01:var=0x01:b/t=1/1

Mar 11 13:45:41 timmay Prism2 card SN: 000000000000

Mar 11 13:45:46 timmay wlan.agent[4587]: WLAN wlan0 brought up successfully.

Mar 11 13:45:46 timmay wlan.agent[4587]: WLAN bringing up layer 3+ with /sbin/if up

Mar 11 13:45:46 timmay linkstatus=ASSOCFAIL (unhandled)

Mar 11 13:45:48 timmay linkstatus=CONNECTED
```

Here is what comes up for wlan0 when I use ifconfig -a:

```
wlan0     Link encap:Ethernet  HWaddr 00:0D:88:5F:34:70

          BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
```

----------

## juliancoccia

The SN 00000 is normal, and if 00:0D:88:5F:34:70 is your MAC address then it it is working. I insist it has something to do with your wlan configuration. You said you are not using WEP, which kind of makes it easier to configure. Is the access point working properly ? No MAC address filters ? Is the wifi card working properly.

Sorry to ask more questions, but is all I can think of for now   :Crying or Very sad: 

----------

## Tamerz

 *juliancoccia wrote:*   

> The SN 00000 is normal, and if 00:0D:88:5F:34:70 is your MAC address then it it is working. I insist it has something to do with your wlan configuration. You said you are not using WEP, which kind of makes it easier to configure. Is the access point working properly ? No MAC address filters ? Is the wifi card working properly.
> 
> Sorry to ask more questions, but is all I can think of for now  

 

I turned off WEP just for testing, normally I use it.  That is the correct MAC address.  The access point works fine in windows.  It probably is my config file, I just wanted to make sure those errors weren't my trouble.  Time to mess with the config files again.

----------

## Tamerz

Maybe you can see what I'm doing wrong in the configs

/etc/wlan/wlan.conf with comments removed:

```
WLAN_DEVICES="wlan0"

ChannelList="01:02:03:04:05:06:07:08:09:0a:0b:00:00:00"

ChannelMinTime=200

ChannelMaxTime=250

WLAN_SCAN=n

SSID_wlan0="lauver"

ENABLE_wlan0=y
```

/etc/wlan/wlancfg-lauver with comments removed and WEP key hidden:

```
lnxreq_hostWEPEncrypt=true     # true|false

lnxreq_hostWEPDecrypt=true     # true|false

dot11PrivacyInvoked=true   # true|false

dot11WEPDefaultKeyID=0      # 0|1|2|3

dot11ExcludeUnencrypted=true   # true|false, in AP this means WEP is required.

dot11WEPDefaultKey0=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx   # format: xx:xx:xx:xx:xx   or

dot11WEPDefaultKey1=      #         xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx

dot11WEPDefaultKey2=      #  e.g.   01:20:03:40:05   or

dot11WEPDefaultKey3=      #         01:02:03:04:05:06:07:08:09:0a:0b:0c:0d

IS_ADHOC=n          # y|n, y - adhoc, n - infrastructure

AuthType="opensystem"      # opensystem | sharedkey (requires WEP)

BCNINT=100         # Beacon interval (in Kus)

CHANNEL=6         # DS channel for BSS (1-14, depends 

            #   on regulatory domain)

BASICRATES="2 4"      # Rates for mgmt&ctl frames (in 500Kb/s)

OPRATES="2 4 11 22"      # Supported rates in BSS (in 500Kb/s)
```

----------

## juliancoccia

I guess you are enabling WEP. Take a look at this piece of my config (I use WEP), the remarks make it self explanatory.

```
#=======WEP===========================================

# [Dis/En]able WEP.  Settings only matter if PrivacyInvoked is true

lnxreq_hostWEPEncrypt=true     # true|false

lnxreq_hostWEPDecrypt=true     # true|false

dot11PrivacyInvoked=true        # true|false

dot11WEPDefaultKeyID=0          # 0|1|2|3

dot11ExcludeUnencrypted=true    # true|false, in AP this means WEP is required. 
```

----------

## Tamerz

Yea that is exactly what I have.  Hmm...

----------

## juliancoccia

My guess is that all you need is:

```
dot11PrivacyInvoked=false
```

Once it works, I strongly encourage you to configure WEP with a 128 bit key   :Wink: 

----------

## Tamerz

Ok I just turned off WEP in the config files and on the AP and it works.  It's gotta be my WEP setup.  At least I know the hardware is setup correctly.  Thanks again.

----------

## juliancoccia

No problem. First thing I would do is double check the actual key.

----------

## Tamerz

Ok I double checked the keys.  All 4 match perfectly to the ones I put in the WAP.

----------

## Tamerz

Could you post your whole wlancfg-name file (without the keys of course)?

----------

## juliancoccia

Sure, here it is:

```
#=======USER MIB SETTINGS=============================

# You can add the assignments for various MIB items

#  of your choosing to this variable, separated by 

#  whitespace.  The wlan-ng script will then set each one.

# Just uncomment the variable and set the assignments 

#  the way you want them.

#USER_MIBS="p2CnfRoamingMode=1 p2CnfShortPreamble=mixed"

#=======WEP===========================================

# [Dis/En]able WEP.  Settings only matter if PrivacyInvoked is true

lnxreq_hostWEPEncrypt=true     # true|false

lnxreq_hostWEPDecrypt=true     # true|false

dot11PrivacyInvoked=true        # true|false

dot11WEPDefaultKeyID=0          # 0|1|2|3

dot11ExcludeUnencrypted=true    # true|false, in AP this means WEP is required.

# If PRIV_GENSTR is not empty, use PRIV_GENTSTR to generate 

#  keys (just a convenience)

# add-ons/ in the tarball contains other key generators.

PRIV_GENERATOR=/sbin/nwepgen    # nwepgen, Neesus compatible

PRIV_KEY128=false               # keylength to generate

PRIV_GENSTR=""

# or set them explicitly.  Set genstr or keys, not both.

dot11WEPDefaultKey0=12:12:12:12:12:12:12:12:12:12:12:12:12

dot11WEPDefaultKey1=            #         xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx

dot11WEPDefaultKey2=            #  e.g.   01:20:03:40:05   or

dot11WEPDefaultKey3=            #         01:02:03:04:05:06:07:08:09:0a:0b:0c:0d

#=======SELECT STATION MODE===================

IS_ADHOC=n                      # y|n, y - adhoc, n - infrastructure

#======= INFRASTRUCTURE STATION  ===================

# What kind of authentication?

AuthType="opensystem"           # opensystem | sharedkey (requires WEP)

#======= ADHOC STATION ============================

BCNINT=100                      # Beacon interval (in Kus)

CHANNEL=10                      # DS channel for BSS (1-14, depends 

                                #   on regulatory domain)

BASICRATES="2 4"                # Rates for mgmt&ctl frames (in 500Kb/s)

OPRATES="2 4 11 22"             # Supported rates in BSS (in 500Kb/s)

```

----------

## Tamerz

Ok I removed a wlancfg-lauver~ file that was in there somehow (don't know what made it) and also moved the wlancfg-DEFAULT out of that directory and it started working.  Solved!

----------

## Tamerz

Ok no, now I found the real problem.  More info to add to this.  Found out that if you emerge linux-wlan-ng using portage the config files are in /etc/conf.d and NOT in /etc/wlan  So I was changing config files that it wasn't even looking at.  Now it's working fine.

----------

## matkare

Hi,

cannot get my d-link dwl-122 working. 

when I plug in the stick syslog says:

```

Mar 15 10:35:49 aminoe usb 1-2: new full speed USB device using address 3

Mar 15 10:35:49 aminoe prism2usb_init: prism2_usb.o: 0.2.1-pre20 Loaded

Mar 15 10:35:49 aminoe prism2usb_init: dev_info is: prism2_usb

Mar 15 10:35:49 aminoe drivers/usb/core/usb.c: registered new driver prism2_usb

```

and the wlan-script also returns errs:

```

# > /etc/init.d/wlan start

 * Starting WLAN devices...

FATAL: Module wlan0 not found.

message=lnxreq_ifstate

  ifstate=fwload

  resultcode=success

Reading S-record file /etc/wlan//prism2_ru.hex...

prism2dl: No such file or directory

prism2dl: Failed to read /etc/wlan//prism2_ru.hex, exiting.

Failed to enable the device, resultcode= implementation_failure .

wlanctl-ng: No such device

error: Autojoin indicated failure!                                        [ ok ]

```

response in syslog to the skript-start was:

```

Mar 15 10:37:27 aminoe hfa384x_drvr_start: Fatal, failed to submit RX URB, result=-22

Mar 15 10:37:27 aminoe prism2sta_ifstate: hfa384x_drvr_start() failed,result=-22

```

i've installed linux-wlan-ng with

```

# > ACCEPT_KEYWORDS="~x86" USE="usb" FEATURES="-sandbox -userpriv" emerge linux-wlan-ng

```

it installed pre20 version.

some details of my system:

cat /proc/version

```

Linux version 2.6.3 (root@aminoe) (gcc-Version 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)) #5 Tue Mar 2 10:48:10 CET 2004

```

emerge --info says:

```

Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.3)

=================================================================

System uname: 2.6.3 i686 AMD Athlon(tm) Processor

Gentoo Base System version 1.4.3.13

Autoconf: sys-devel/autoconf-2.58-r1

Automake: sys-devel/automake-1.7.7

ACCEPT_KEYWORDS="x86"

AUTOCLEAN="yes"

CFLAGS="-O3 -march=athlon -funroll-loops -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

COMPILER="gcc3"

CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2        

/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/tex/gen        

eric/config/ /usr/share/texmf/tex/platex/config/ /var/qmail/control"

CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"

CXXFLAGS="-O3 -march=athlon -funroll-loops -pipe -fomit-frame-pointer"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoaddcvs ccache sandbox"

GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://        

mirrors.sec.informatik.tu-darmstadt.de/gentoo rsync://mirrors.sec.informatik.tu-        

darmstadt.de/gentoo http://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.uni-        

erlangen.de/pub/mirrors/gentoo"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY=""

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="3dnow X aalib acpi alsa apache2 apm arts avi berkdb cdr crypt cups directfb        

 doc dvd dvdr encode esd ethereal fbcon foomatic foomaticdb gd gdbm gif gnome gp        

m gtk gtk2 imagemagic imap imlib java jpeg kde lcms ldap libg++ libwww lirc mad         

maildir matrox mbox mikmod mmx motif mozilla mpeg mysql ncurses nls odbc oggvorb        

is opengl oss pam pda pdflib pdflibs perl png ppds python qt quicktime readline         

samba scanner sdl slang slp snmp spell ssl svga tcltk tcpd tetex tiff truetype u        

sb video_cards_matrox videos wavelan wmf wxwindows x86 xface xinerama xml xml2 x        

mms xosd xv zlib"

```

by the way: under winxp the usb-stick is working, so hardware issues could be left out.

hope you can help me guys !!   :Rolling Eyes: 

----------

## matkare

found my mistake, I forgot to add the correct entry in /etc/conf.d/net

adding 

```

iface_wlan0="dhcp"

dhcpcd_wlan0=" -R "

```

did it. The -R is only needed to preserve my DNS-Server settings :)

OK but one thing is still left. Everything is working fine now except this:

```

#> /etc/init.d/wlan start

* Starting WLAN devices...

message=lnxreq_ifstate

  ifstate=fwload

  resultcode=success

Reading S-record file /etc/wlan//prism2_ru.hex...

prism2dl: No such file or directory

prism2dl: Failed to read /etc/wlan//prism2_ru.hex, exiting.               [ ok ]

```

what does this "Reading S-record ..."  is all about and why there is no prism2_ru.hex. Thing is, everything is working fine anyways. Do I have to modify the startup-script to eleminate this messages?

----------

## janpk

Another one bites the dust..... I'm in desparate need for some help here. Been trying to get the dwl-122 thing to work, but I wind up with all kinds of errors. 

Kernel : 2.4.25 with epia2-r2 patches

I use the following cmdline to emerge the ebuild 

ACCEPT_KEYWORDS="~x86" USE="usb" emerge linux-wlan-ng

Then I get the following error during the ebuild depmod -a

```
depmod: *** Unresolved symbols in /lib/modules/2.4.25-epia2-r2/kernel/drivers/net/p80211.o

```

depmod -ae gives

```

depmod: *** Unresolved symbols in /lib/modules/2.4.25-epia2-r2/kernel/drivers/net/p80211.o

depmod:         hotplug_path

```

Suggestions ?

Jan-Petter ::-Q

----------

## betaparticle

I followed your article to setup my wlan. I failed.

My kernel is 2.6.5-r1, hotplug is 20040401, and emerge linux-wlan-ng with USE="usb -pci", FEATURES="-sandbox"

But, I can't find /etc/hotplug/wlan.agent

The /var/log/messages I got is

```

Apr 28 13:52:32 gentoo prism2usb_init: dev_info is: prism2_usb

Apr 28 13:52:32 gentoo drivers/usb/core/usb.c: registered new driver prism2_usb

Apr 28 13:52:32 gentoo net.agent[8861]: add event not handled

```

I have no idea what's wrong.

Can you help me?

----------

## betaparticle

ok, I have solved my problem by a method. I think this method is a walkaround.

I install linux-wlan-ng by tarball.

After .Configure, make, make install as juliancoccia said, I got the wlan.agent at /etc/hotplug/. And wlan's path is /etc/rc.d/init.d/wlan not  /etc/init.d/wlan, and I got error(FATAL: Module wlan0 not found) when I execute /etc/init.d/wlan.

I choose to ignore wlan's error.

I copy /etc/conf.d/wlan.conf and /etc/conf.d/wlancfg-DEFAULT to /etc/wlan because I can't find they at the location you mentioned. 

And do some modification to fit my ap settings.

Then I plug the dwl-122, I got a messages like

```

rc-scripts: Please make sure that /etc/conf.d/net has $ifconfig_wlan0 set

...

```

So, I modified my /etc/conf.d/net  to add folllowing line only

```

iface_wlan0="192.168.3.50 broadcast 192.168.3.255 netmask 255.255.255.0"

```

Then, I do a very stupid thing that is executing /etc/init.d/net.eth0 restart. This is the only thing I can do to make my network work. And I really don't know why.

Can anybody can write detail and correct way to make kernel 2.6.x to use dwl-122.

Thx a lot.

----------

## echo6

Slightly off topic!

Has anyone got the DWL-122 to work with the latest Knoppix cd,  2.4.26 kernel?   linux-wlan-ng and utilities are installed and I can modprobe the prism2_usb module etc   However there is no /etc/hotplug/wlan.agent file,  trying to execute wlanctl-ng just produces an error "hardware not found"

Any help or pointers would be appreciated?

----------

## echo6

OK,  I've remastered the Knoppix cd with the latest linux-wlan-ng drivers etc,  the device is seen but I need to conifgure it with my AP manually.   As I'm using the Knoppix boot cd I can't edit the /etc/wlan/wlancfg-DEFAULT config file.

Is there a way of configuring WEP etc using the wlanctl-ng command?

I've worked out the following;

```
wlanctl-ng wlan0 lnxreq_autojoin="opensystem" ssid="myssid"

wlanctl-ng wlan0 lnxreq_hostwep encrypt=true decrypt=true
```

There doesn't seem to be away to specify a wep key as you can with iwconfig  :Sad: 

btw it works if I disable WEP on my AP,  also how do I enable ad-hoc mode?

Anyone??

----------

## juliancoccia

I've got it working on Knoppix 3.4 but I have compiled my own kernel (2.6.7) and I have stripped off the hardware recognition on bootup. I am also using ifplugd to configure it automatically when plugged in.

----------

## puelly

I have foloowed the instruction to getting the dwl-122 to wrk.  I have been successful to an extent.  It only works after i type the ifconfig and route commands.  If there a way that I can have hotplug doing this when it loads the drivers? Or is there a was to make it load on boot by using /etc/conf.d/net.

I really want to load the wireless network on boot.  

Hope u can help.

----------

## pilla

Moved from K&H

----------

## hug0

hi...

dwl-122 works great but:

```

iwlist wlan0 scan

wlan0     Interface doesn't support scanning : Function not implemented

```

any ideas or is scanning not supported in the prism2 chip?

----------

## toaster666

 *hug0 wrote:*   

> hi...
> 
> dwl-122 works great but:
> 
> ```
> ...

 

Hi,

I got scanning working with following command, where bssid is the MAC of my wlan-device. I have not used all channels because I did not need to scan all  :Smile: . 

```
wlanctl-ng wlan0 dot11req_scan bsstype=infrastructure bssid=00:11:95:88:07:A8 ssid="" scantype=both probedelay=200 minchanneltime=100 maxchanneltime=1000 channellist=01:02:03:04:05:06:07:08:09
```

The results can be fetched with 

```
wlanctl-ng wlan0 dot11req_scan_results bssindex=0
```

 where bssindex is the index of the result (0 is the first).

I also successfully joined with the 

```
wlanctl-ng wlan0 lnxreq_autojoin="opensystem" ssid="myssid"
```

 command mentioned above but I can't get an IP. Any ideas? I also do not want to join manually when I plug in the adaptor. Is there a way to do it all automagically?

greetz

>toaster

----------

## CrazyYoyimbo

i have the d-link dwl-122. followed the instructions, got it to compile and configure, however i get the following in my dmesg:

```
prism2_usb: Unknown symbol p80211netdev_rx

prism2_usb: Unknown symbol register_wlandev

prism2_usb: Unknown symbol wlan_unsetup

prism2_usb: Unknown symbol unregister_wlandev

prism2_usb: Unknown symbol p80211netdev_hwremoved

prism2_usb: Unknown symbol wlan_setup

prism2_usb: Unknown symbol p80211netdev_rx

prism2_usb: Unknown symbol register_wlandev

prism2_usb: Unknown symbol wlan_unsetup

prism2_usb: Unknown symbol unregister_wlandev

prism2_usb: Unknown symbol p80211netdev_hwremoved

prism2_usb: Unknown symbol wlan_setup
```

any help is greatly appreciated,

CrazyYoyimbo

----------

## CrazyYoyimbo

alright, i've tried using the current ebuild (pre23) and i've also tried manually configuring it from the tar. Manually doing it resulted in an unusable kernel mod. This new module loads, just doesn't work.

if anyone has any ideas of where i can get the pre17 or even pre16 ebuild, it would help out a lot. I've tried googling the filename, but the only results that contain the pre17 ebuilds are the google cache.

thank you for your help,

CrazyYoyimbo

----------

## mikegpitt

Does anyone know when the pre26 ebuild will be released.  There is a bug report for it on bugs.gentoo.org.  I tried to use the ebuild posted in the report, but I got some errors, so it looks like I will need to wait for it to officially get into the portage tree.

PS - I'm having troubles with linux-wlan-ng-pre23 and the 2.6.12 kernel.  I keep getting hangups when starting /etc/init.d/wlan.

----------

## mikegpitt

 *mikegpitt wrote:*   

> Does anyone know when the pre26 ebuild will be released.  There is a bug report for it on bugs.gentoo.org.  I tried to use the ebuild posted in the report, but I got some errors, so it looks like I will need to wait for it to officially get into the portage tree.
> 
> PS - I'm having troubles with linux-wlan-ng-pre23 and the 2.6.12 kernel.  I keep getting hangups when starting /etc/init.d/wlan.

 

I was able to get the pre26 ebuild to work.  (I was making a stupid mistake.)

The pre26 seems to stop the hangups I was getting with the pre23 ebuild in the 2.6.12 kernel.

----------

