# wireless network setup

## noup

hi.

i'm using the linksys broadband router wrt54g and a linksys wireless-g wireless card wmp54g.

there aren't any drivers available for this card under linux, so i'm using "driverloader" from linuxant.

the problem is, i can't get my network to work under gentoo.

i've installed the wireless-tools package and set up my wep key and essid. i've also edited /etc/resolv.conf with the ip's of the dns servers i use.

and i've also edited the /etc/conf.d/net and put in my ip adress, net mask and gateway ip. (i'm not sure about all the fields i have to define in here).

the thing is, i'm a little bit lost about the routine commands to perform to enable wireless networking.

any help?

thanks in advance.

----------

## Dracnor

when you type 

```
iwconfig
```

 does it show any wireless extensions?  does it show the mac address of your Access Point/Router?  also does 

```
ifconfig
```

 have any IP addresses associated with it, and can you ping your router?

----------

## Random Task

@noup

I'm trying to do the same thing with my wireless card, could you post what you've done and how you got there up to this point?  I'd appreciate it greatly.

Also, I remember someone making a script that would activate your wireless card, you simply had to specify the options.

----------

## Dracnor

what kind of wireless card do you have?  have you installed pcmcia-cs? or are you using the in kernel drivers?  (or a third party app?)  I also had to emerge wireless-tools to get iwconfig and all its utilities (not all cards use this afaik).  Then you can edit /etc/pcmcia/wireless.opts to get it to load settings automatically.

----------

## noup

 *Dracnor wrote:*   

> when you type 
> 
> ```
> iwconfig
> ```
> ...

 

```
#iwconfig

eth1      IEEE 802.11g  ESSID:"XXXXXXX"  Nickname:"unknown"

          Mode:Managed  Bit Rate=54Mb/s   Tx-Power=16 dBm   

          RTS thr:off   Fragment thr:off

          Encryption key:XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XX

          Power Management:off

          Link Quality:1/1  Signal level:-10 dBm  Noise level:-84 dBm

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

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

and

```
#ifconfig

eth0      Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:8A  

          inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0

          UP BROADCAST RUNNING 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:100 

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

          Interrupt:11 Base address:0x8800 

eth1      Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:CA  

          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:100 

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

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

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

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

          collisions:0 txqueuelen:0 

          RX bytes:1896 (1.8 Kb)  TX bytes:1896 (1.8 Kb)
```

----------

## noup

 *Dracnor wrote:*   

> what kind of wireless card do you have?  have you installed pcmcia-cs? or are you using the in kernel drivers?  (or a third party app?)  I also had to emerge wireless-tools to get iwconfig and all its utilities (not all cards use this afaik).  Then you can edit /etc/pcmcia/wireless.opts to get it to load settings automatically.

 

as stated above, the card is a linksys wireless-g pci card (wmp54g). the driver i'm using is "driverloader", which emulates windo** driver for this card, and is supposed to work (at least that's what "they" say). yes, i have set it loading automatically and manually compiled wireless-tools so this could work.

i've also enabled:

```

Network Device Support -> Wireless LAN (non-hamradio)

```

in the kernel.

i can't ping my router, only my card (192.168.1.100).

----------

## noup

 *Random Task wrote:*   

> @noup
> 
> I'm trying to do the same thing with my wireless card, could you post what you've done and how you got there up to this point?  I'd appreciate it greatly.
> 
> Also, I remember someone making a script that would activate your wireless card, you simply had to specify the options.

 

here's what i've done:

1 -  compiled the drivers from linuxant and configured them (from its web interface)

2 - compiled wireless-tools (so you can have iwconfig)

3 - eddited /etc/resolv.conf to include de ip's of the dns servers of my isp

```
nameserver 194.65.3.21

nameserver 194.65.3.20

```

4 - set up the network essid (wireless network id) and WEP key with:

```
iwconfig eth1 essid "XXXXXXXX"

iwconfig eth1 enc 1234567890ABCDEF1234567890

```

5 - run the following commands (you mat treat this as a script):

```

ifconfig eth1 up

ifconfig eth1 192.168.1.100 netmask 255.255.255.0

route add -net default gw 192.168.1.1 metric 1 eth1

```

hope this helps  :Smile: 

----------

## noup

btw, this is the "route" command output:

```
#route

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

192.168.1.0     *               255.255.255.0   U     0      0        0 eth1

192.168.0.0     *               255.255.255.0   U     0      0        0 eth0

loopback        localhost       255.0.0.0       UG    0      0        0 lo

default         192.168.1.1     0.0.0.0         UG    1      0        0 eth1

```

----------

## Dracnor

hmmm...in terms of your iwconfig output:

```
#iwconfig

eth1      IEEE 802.11g  ESSID:"XXXXXXX"  Nickname:"unknown"

          Mode:Managed  Bit Rate=54Mb/s   Tx-Power=16 dBm   

          RTS thr:off   Fragment thr:off

          Encryption key:XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XX

          Power Management:off

          Link Quality:1/1  Signal level:-10 dBm  Noise level:-84 dBm

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

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

there is no Access Point MAC address.  Is there a way you can log on to the router and view clients that are connecting?  You can assign your machine a nickname by 

```
iwconfig nick your_nickname
```

and see if that nickname pops up on your wireless router...to make sure that your are attached to the device.  

Also, do you have other clients using this router that are hard-wired?

----------

## UberLord

Is WEP enabled on the AP? If so, disable it.

Once wireless is working then enable WEP again

----------

## Random Task

I would just like to say thank you, the steps you posted worked very well.  I will try to help you with your issue, however I cannot promise anything.

As a side note, you could disable some of the securities on your router (currently I'm pretty sure I don't have any security to speak of but its a home network so I really don't care)

But again, thank you

----------

## noup

you're welcome  :Smile: 

about the security thing, i've thought about it since the begining but, even though this is a home network, i cannot change those settings at this time because it is being intensively used by other people.

i'll try it tomorrow and keep you posted then  :Smile: 

thanks

----------

## noup

done!

i've got it working, at last.

the reason of it all was simply because iwconfig does not implement wireless shared keys. (shared keys are a known issue concerning wireless security since they can facilitate one in the process of getting the key).

so, i switched the router to open key (auto mode) and it's working.

my only concern now is what i'm going to do when my linuxant driver free license expires, which will happen in... 10 days   :Mad: 

----------

## MaGuS

Hi all,

I got a Intel mini-pci wlan card. driverloader loaded, but iwconfig tells me that eth1 got no wireless extensions. I got a Toshiba M30 Notebook if this helps.

Anybody got a solution, gentoo without internet is boring.  :Smile: 

Best regards,

Magnus

----------

## noup

i don't know exactly what the driverloader setup does, cause it just worked for me, but i think your problem would be in the driverloader setup. do you have everything correctly set up when you connect to the driverloader web interface?

----------

## MaGuS

@home it works ... but iwconfig still say "no wireless extension".

But how to set up web encryption without iwconfig? At work we got web encryption running and here (at home) I truned it off.

Best regards,

Magnus

----------

## noup

i found this in the wireless-tools project homepage, which is what i was just about to say:

```
# In the rare cases where your kernel isn't compiled with Wireless Extensions (/proc/net/wireless non-existent), you need to recompile it with Wireless Extensions (CONFIG_NET_RADIO enabled).

# After recompiling a kernel with Wireless Extension, you have to recompile your driver or the Pcmcia package as well (and restart it).

# Compilation of the Wireless Tools used to be tricky, especially in the header area. I believe this has been fixed for good.

# For kernels before 2.2.14/2.3.30, use Wireless Tools version 19.

# For kernel after 2.2.14/2.3.30 use Wireless Tools version 20 or greater.
```

basicaly, do you have "wireless extensions" activated in the kernel?

----------

## MaGuS

not realy. I playing with 2.6 .. I will ty it. Thanks for the idea!

EDIT: You made my day! Stupid mistake.

----------

## noup

eheh you're welcome   :Cool: 

----------

## mutex

I've done all of the above and have gotten the setup to work without WEP, but as soon as I try to enable WEP and use the 'key' option in iwconfig there's no way I can get the laptop to connect.

I'm using an hp integrated card which uses the broadcom bcm94306 802.11g rev 02 chipset (broadcom 54g).

I've also tried the open mode with iwconfig to no avail. Anyone have any clues?

----------

## Orion13

Yes, I too have tried to get my WLAN up and running to no avail.  I've downloaded the Linuxant driver wrapper, set up my kernel for wireless support, and re-emerged pcmcia-cs...still nothing. When I run the web based version of the Linuxant program, it says that no card is detected, however I have no problem running a standard 10/100 card in the notebook.

I have a Compaq Presario 1247 if this helps, and so far the only thing I use the wireless for is WinXP.  From the looks of these forums, a lot of us are getting the same problem.  No answers though.  Could someone please help me, I am rather new to Linux (new enough I can't get it to work, but not new enough to enter the code req'd).

I don't want to have to buy another WLAN card just for using Linux...

Any help would be greatly appreciated.

Orion

========

Behold, a man who sat on a pale horse...his name was death 

and hell followed with him...

----------

## vleisbom

First, use the driver ndiswrapper.sf.net.

Follow the instructions in the Readme that comes with the package.

emerge wireless-tools.

type:

iwconfig

NOTE: eth1 below could be something else.

You should see something like this:

eth1      IEEE 802.11g  ESSID:""

          Mode:Managed  Frequency:2.462GHz  Access Point: xx:xx:xx:xx:xx:xx

          Bit Rate=11Mb/s   Tx-Power:off

          RTS thr=2347 B   Fragment thr=2346 B

          Encryption key:off

          Power Management:off

          Link Quality:0  Signal level:199  Noise level:0

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

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

type :

iwconfig eth1 essid "YourEssid"

now give it an ip address. if you have a dhcp server it is as easy as:

dhcpcd eth1

otherwise do a search on ifconfig on the board. lots of examples.

have fun

----------

