# Setting up a wireless network with Netgear WPN311

## Smatt454

So this is my first time working with a wireless network (i've hooked up a wireless router on a Windows network, but thats about it)

I cant seem to get Gentoo to recognize my wireless card.

I am using a Netgear WPN311 (yes i checked the compatibility list) and i cant seem to get gentoo to recognize the card

i installed the madwifi dirver and i am using the newbie howto guide off the madwifi site (http://madwifi.org/wiki/UserDocs/FirstTimeHowTo)

when i run 

```
wlanconfig ath0 create wlandev wifi0 wlanmode sta
```

 i get

```
wlanconfig: ioctl: No such device
```

```
iwconfig
```

 gets an output of

```
lo        no wireless extensions.

eth0      no wireless extensions.
```

honesly i have no idea what i'm doing

any ideas?

----------

## erik258

Do you have automatic kernel module loading in the kernel?  If not, you'll have to load the modules for the atheros chip (madwifi supports the atheros wifi chip), either in /etc/modules.autoload.d/kernel-2.6 or by hand.  

If you have automatic module loading you should get these modules loaded automatically when you plug in the card.   If it's not a hotplug card (eg PCI) you should have the modules automatically loaded at boot after the card's been inserted. 

Anyhow, /lib/modules/your-kernelversion/net should contain a number of atheros-related modules; you'll need the majority of these to use your WIFI card, depending on what you want to do with it and where you wish to connect.

----------

## Smatt454

i dont know if i have an automatic kernel module or not....i'm fairly new to linux...so i kind of need it dumbed down for me...

i check in /lib/modules/2.6.22-gentoo-r9/net/ and i have these files

ath_hal.ko        

ath_pci.ko        

ath_rate_amrr.ko  

ath_rate_onoe.ko  

ath_rate_sample.ko  

wlan_acl.ko         

wlan_ccmp.ko        

wlan_scan_ap.ko   

wlan_scan_sta.ko

wlan_tkip.ko

wlan_wep.ko

wlan_xauth.ko

wlan.ko 

any ideas of what i should do (like i said...i kind of need my hand held through this)

----------

## erik258

each of those is a kernel module.  they can each be loaded with the utility 'modprobe'.  As root, specify the name of the module (without the '.ko' at the end) as an argument to modprobe:

modprobe ath_hal

modprobe ath_pci

& so on.

----------

## Smatt454

ok i did it for all of them....now what?

----------

## erik258

now your previous commands should work a little better.  see if 'ifconfig -a' gives you ath0 and wifi0 like it should.

----------

## Smatt454

no i get the same thing....

wait...i remember when installing i had to add net.eth0 to the runlevels...... dont i need to do that for ath0 and wifi0 too? there isnt a net.ath0 or net.wifi0 in the /etc/init.d folder...have any idea what i can do?

----------

## erik258

can you show the output of 'lspci' ?

----------

## xbmodder

can you show the output of:

lspci

wlanconfig

----------

## Smatt454

```
lspci
```

```

00:00.0 Host bridge: Intel Corporation 82850 850 (Tehama) Chipset Host Bridge (MCH) (rev 04)

00:01.0 PCI bridge: Intel Corporation 82850 850 (Tehama) Chipset AGP Bridge (rev 04)

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 04)

00:1f.0 ISA bridge: Intel Corporation 82801BA ISA Bridge (LPC) (rev 04)

00:1f.1 IDE interface: Intel Corporation 82801BA IDE U100 Controller (rev 04)

00:1f.2 USB Controller: Intel Corporation 82801BA/BAM USB Controller #1 (rev 04)

00:1f.3 SMBus: Intel Corporation 82801BA/BAM SMBus Controller (rev 04)

01:00.0 VGA compatible controller: nVidia Corporation NV10DDR [GeForce 256 DDR] (rev 10)

02:01.0 USB Controller: NEC Corporation USB (rev 41)

02:01.1 USB Controller: NEC Corporation USB (rev 41)

02:08.0 Ethernet controller: Intel Corporation 82801BA/BAM/CA/CAM Ethernet Controller (rev 03)

02:0a.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 07)

02:0a.1 Input device controller: Creative Labs SB Live! Game Port (rev 07) 
```

i will post the output of wlanconfig later (i thought earlier the lspci output would be useful to have , so i emailed it to myself, but i am at school now...so i cant do wlanconfig cant

----------

## erik258

I am looking for an atheros card in this output.  I am not seeing one.  Therefore, I am confused.  The only networking device I see is an intel ethernet controller

----------

## Monkeh

Your card isn't even showing up in lspci, and considering your PCI controller (82801BA, ICH2) is seven years old.. it's quite possible it won't work.

----------

## Smatt454

i thought that too, so i booted gentoo (live cd) my from another machine running windows with the same card  (it works fine in windows. Note that the card is the same model, not the same exact card) 

lspci still does not give any information about the wireless card on the windows box.

----------

## Monkeh

Indulge me and try running lsusb.

----------

## Smatt454

```
sudo lsusb
```

```
Bus 003 Device 001: ID 0000:0000

Bus 002 Device 001: ID 0000:0000

Bus 001 Device 001: ID 0000:0000
```

```
wlanconfig
```

```
usage: wlanconfig athX create [nounit] wlandev wifiY

            wlanmode [sta|adhoc|ap|monitor|wds|ahdemo] [bssid | -bssid] [nosbeacon]

usage: wlanconfig athX destroy

usage: wlanconfig athX list [active|ap|caps|chan|freq|keys|scan|sta|wme]
```

----------

## Smatt454

i really need help getting this set up =/

----------

## erik258

I don't understand why it isn't on your PCI bus.  the pic I've found ( http://www.netgear.com/Products/Adapters/RangeMaxAdapters/WPN311.aspx ) and site show that  the usb and pcmcia versions have different model name.  but I've not seen a card that doesn't show up in lspci.  that's really wierd.  perhaps it has an on-board pci-to-pcmcia converter or something?  But that seems unlikely.  

I've set atheros cards up many times, and what you're doing should work.  If you have a newer computer around you could try a newer pci bus.

----------

## albright

From looking around on google, I think you *should* be

getting something from lspci, something like this:

```
# lspci -v 

 02:02.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01) 
```

Are you sure this card isn't dead? (Have you tried it in a windows box?)

----------

## Smatt454

i have not tried the EXACT card in a windows box but my dad has the same model on his windows box, and it works just fine.

I do not think the card is dead for a couple reasons

          1) it has a blinking green light (i know this isnt a real indicator...but i DO know that it is getting power)

          2) the same model on the windows box still works fine. When I boot that box from a LiveCD...I get nothing about the card from lspci

----------

## Simba7

 *Monkeh wrote:*   

> Your card isn't even showing up in lspci, and considering your PCI controller (82801BA, ICH2) is seven years old.. it's quite possible it won't work.

 

Not true.. I've had a AR5212 card working in old Pentium 166MHz and 200MHz systems (430VX and 430FX Chipsets).. I recently upgraded to a Pentium II (440BX) Board and it works on that, too..

Some cards can be picky, but I guess I found a pair (Ralink RT2500 and a Atheros AR5212) that work in almost anything.

----------

## Monkeh

 *Simba7 wrote:*   

>  *Monkeh wrote:*   Your card isn't even showing up in lspci, and considering your PCI controller (82801BA, ICH2) is seven years old.. it's quite possible it won't work. 
> 
> Not true.. I've had a AR5212 card working in old Pentium 166MHz and 200MHz systems (430VX and 430FX Chipsets).. I recently upgraded to a Pentium II (440BX) Board and it works on that, too..
> 
> Some cards can be picky, but I guess I found a pair (Ralink RT2500 and a Atheros AR5212) that work in almost anything.

 

I was guessing. I have an old P1 I use with an Atheros card also. Just remember there are many more Atheros chips than the AR5212.

----------

## albright

 *Quote:*   

> Not true.. I've had a AR5212 card working in old Pentium 166MHz and 200MHz systems (430VX and 430FX Chipsets).. I recently upgraded to a Pentium II (440BX) Board and it works on that, too.. 

 

Is you lspci blank too?

----------

## Simba7

Nope.

```
00:09.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)

        Subsystem: D-Link System Inc Unknown device 3a95

        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-

        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

        Latency: 168 (2500ns min, 7000ns max), Cache Line Size: 32 bytes

        Interrupt: pin A routed to IRQ 11

        Region 0: Memory at de100000 (32-bit, non-prefetchable) [size=64K]

        Capabilities: [44] Power Management version 2

                Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0-,D1-,D2-,D3hot-,D3cold-)

                Status: D0 PME-Enable- DSel=0 DScale=2 PME-
```

----------

