# How do I install a (Prism2) USB Wlan adapter? (FIXED)

## ChojinDSL

Sorry if this has been asked and solved before, I did a search, but couldnt find anything that helped me.

My usb wlan unit is a Sitecom WL-012. It uses a prism2 chip.

I have emerge linux-wlan-ng, and I have modprobed prism2_usb, which results in the following modules being added to my lsmod output:

prism2_usb, p80211.

But now what? Ifconfig still does not list a wlan0 interface. 

I also tried /etc/init.d/wlan start 

but then I get the following message:

--------------------------------------------------------------------------

* Could not get dependancy info for "wlan"!

* Could not get dependancy info for "wlan"!

Starting WLAN devices...

Failed to enable the device, resultcode= implementation_failure .

wlanctl-ng: No such device

wlanctl-ng: No such device

error: Autojoin indicated failure!

---------------------------------------------------------------------------

Here is the output of my dmesg in case that helps:

---------------------------------------------------------------------------

init_module: prism2_usb.o: 0.2.0 Loaded

init_module: dev_info is: prism2_usb

usb.c: registered new driver prism2_usb

hfa384x_docmd: ctlx failure=REQ_TIMEOUT

hfa384x_drvr_start: cmd_initialize() failed, result=-5

prism2sta_ifstate: hfa384x_drvr_start() failed,result=-5

hfa384x_usbin_callback: Fatal, failed to resubmit rx_urb. error=-22

hfa384x_drvr_start: Fatal, usb_submit_urb() failed, result=-22

prism2sta_ifstate: hfa384x_drvr_start() failed,result=-22

hfa384x_drvr_start: Fatal, usb_submit_urb() failed, result=-22

prism2sta_ifstate: hfa384x_drvr_start() failed,result=-22

------------------------------------------------------------------------------

Im assuming its something really minor that I either forgot to do, or didnt know I was supposed to do. But either way, any help will be greatly appreciated.

Are there perhaps any special options that I need to enable in my kernel config?

What is the normal process to install wlan? i.e. step1: emerge wlan drivers, step2: edit this config file, etc...

By the way, I have checked on the manufacturers site, and they do have some instructions fo installing this device under linux, but they didnt work for me.Last edited by ChojinDSL on Tue Sep 02, 2003 9:35 pm; edited 1 time in total

----------

## Dark_Hunter

i've inserted following lines into /etc/conf.d/net

```

modprobe prism2_usb

wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable

wlanctl-ng wlan0 lnxreq_autojoin ssid="" authtype=opensystem

iface_wlan0="192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0"

```

after that you can copy 

```
cp /etc/init.d/net.eth0 /etc/init.d/net.wlan0
```

 and after that, just start by 

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

 or for everytime boot-up-start 

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

----------

## ChojinDSL

Ok I did what you said. now I get this message when I do /etc/init.d/net.wlan0 start

--------------------------------------------

message=lnxreq_ifstate

ifstate=enable

resultcode=implementation_failure

wlanctl-ng: No such device

* Could not get dependancy info for "net.wlan0"

* Could not get dependancy info for "net.wlan0"

* Bringing wlan0 up...

SIOCSIFFLAGS: No such device

----------------------------------------------

If I then type ifconfig, its still shows me now wlan0.

----------

## Dark_Hunter

hmm, don't know if it does function.

which kernel-version you've got?

if you've got x86-architecture try

```
ACCEPT_KEYWORDS="~x86" emerge linux-wlan-ng
```

to try the new "unstable" version, it works perfectly for me, maybe it solves your problems.

on wlan-project-site your adabter works

----------

## ChojinDSL

Ok first of all thanks for your help. I finally got it to work!

Turns out all I had to do, was to unplug it and plug it back in and reboot. Well maybe that wasnt all necessary, but thats what I did and now it works!! Brilliant!!

Wow, this is so cool. I have never before had so many things working under linux before. Gotta love gentoo and its community. Who knows, maybe I will even .... *gulp* ..... be able to get *ALL* of my hardware working under Linux!!   :Wink: 

----------

## floeschie

hi,

i have the same problems, but as my card is a built in usb-module, i can't plug it out and in again... any other hints?

dmesg output:

```

prism2usb_init: prism2_usb.o: 0.2.1-pre22 Loaded

prism2usb_init: dev_info is: prism2_usb

prism2_usb 4-1:1.0: usb_probe_interface

prism2_usb 4-1:1.0: usb_probe_interface - got id

usbcore: registered new driver prism2_usb

Debug: sleeping function called from invalid context at mm/slab.c:1989

in_atomic():1, irqs_disabled():1

 [<c0115f47>] __might_sleep+0xb7/0xe0

 [<c030b2d9>] usb_start_wait_urb+0xc9/0xe0

 [<c013f993>] __kmalloc+0xa3/0xb0

 [<d18c51e7>] ohci_urb_enqueue+0xb7/0x330 [ohci_hcd]

 [<c030a1e8>] hcd_submit_urb+0x118/0x1b0

 [<c030aea1>] usb_submit_urb+0x211/0x330

 [<d1921111>] submit_rx_urb+0x111/0x180 [prism2_usb]

 [<d1923e7f>] hfa384x_drvr_start+0x8f/0x180 [prism2_usb]

 [<d192e996>] prism2sta_ifstate+0x216/0x250 [prism2_usb]

 [<d192decc>] prism2sta_mlmerequest+0x16c/0xa20 [prism2_usb]

 [<c0247706>] vsnprintf+0x256/0x4d0

 [<d18f8310>] p80211req_dorequest+0xc0/0x120 [p80211]

 [<d18fcb87>] p80211knetdev_do_ioctl+0x107/0x190 [p80211]

 [<c032f414>] dev_ifsioc+0x374/0x3e0

 [<c032f645>] dev_ioctl+0x1c5/0x340

 [<c03251e0>] sock_ioctl+0x2f0/0x320

 [<c0167d50>] sys_ioctl+0x100/0x270

 [<c0105029>] sysenter_past_esp+0x52/0x71

hfa384x_docmd: ctlx failure=REQ_TIMEOUT

hfa384x_drvr_start: cmd_initialize() failed, result=-5

prism2sta_ifstate: hfa384x_drvr_start() failed,result=-5

```

usbview output:

```

IEEE 802.11b PRISM3 USB

Manufacturer: AirVast Taiwan

Speed: 12Mb/s (full)

USB Version:  1.10

Device Class: 00(>ifc )

Device Subclass: 00

Device Protocol: 00

Maximum Default Endpoint Size: 8

Number of Configurations: 1

Vendor Id: 124a

Product Id: 168b

Revision Number:  1.32

Config Number: 1

 Number of Interfaces: 1

 Attributes: 80

 MaxPower Needed: 500mA

 Interface Number: 0

  Name: prism2_usb

  Alternate Number: 0

  Class: ff(vend.) 

  Sub Class: 0

  Protocol: 0

  Number of Endpoints: 3

   Endpoint Address: 81

   Direction: in

   Attribute: 2

   Type: Bulk

   Max Packet Size: 64

   Interval: 0ms

   Endpoint Address: 02

   Direction: out

   Attribute: 2

   Type: Bulk

   Max Packet Size: 64

   Interval: 0ms

   Endpoint Address: 83

   Direction: in

   Attribute: 3

   Type: Int.

   Max Packet Size: 8

   Interval: 1ms

```

uname -a:

```

Linux hubair 2.6.8.1 #19 Tue Oct 19 19:19:55 CEST 2004 i686 Transmeta(tm) Crusoe(tm) Processor TM5800 GenuineTMx86 GNU/Linux

```

----------

