# Wireless setup conf can anyone spot the error? [solved]

## biehl

Hi,

I'm still somewhat unsure of what I need to get wifi working - so here's what I've done (and the unsatisfactory results  :Sad:  )

```

salt anders #uname -r

2.6.11-gentoo-r6

salt anders # modprobe ipw2100

salt anders # lsmod

Module                  Size  Used by

ieee80211_crypt_wep     3972  -

ipw2100               137664  -

ieee80211              45828  -

ieee80211_crypt         4808  -

nvidia               3916412  -

salt anders # cat /sys/bus/pci/drivers/ipw2100/*/rf_kill

0

salt anders # iwconfig eth1 mode Ad-Hoc

salt anders # iwconfig eth1 channel 11

salt anders # iwconfig eth1 key s:myKey

salt anders # iwconfig eth1 mode Managed

salt anders # iwconfig eth1 essid Hope

salt anders # ifconfig eth1 up

salt anders # iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

eth1      IEEE 802.11b  ESSID:"Hope"  Nickname:"ipw2100"

          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:14:BF:43:13:CD

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

          Retry min limit:7   RTS thr:off   Fragment thr:off

          Encryption key:4C65-6C73-6B65-7241-0000-0000-00   Security mode:open

          Power Management:off

          Link Quality=100/100  Signal level=-38 dBm

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

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

salt anders # ifconfig eth1 192.168.1.102

salt anders # route add default gw 192.168.1.1 dev eth1

salt anders # 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 eth0

192.168.1.0     *               255.255.255.0   U     0      0        0 eth1

loopback        localhost       255.0.0.0       UG    0      0        0 lo

default         192.168.1.1     0.0.0.0         UG    0      0        0 eth0

salt anders # iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

eth1      IEEE 802.11b  ESSID:"Hope"  Nickname:"ipw2100"

          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:14:BF:43:13:CD

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

          Retry min limit:7   RTS thr:off   Fragment thr:off

          Encryption key:4C65-6C73-6B65-7241-0000-0000-00   Security mode:open

          Power Management:off

          Link Quality=99/100  Signal level=-37 dBm

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

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

salt anders # ifconfig eth1 up

salt anders # ifconfig eth0 down

salt anders # ping google.com

ping: unknown host google.com

salt anders # ping 192.168.1.1

PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.

From 192.168.1.102 icmp_seq=2 Destination Host Unreachable

From 192.168.1.102 icmp_seq=3 Destination Host Unreachable

From 192.168.1.102 icmp_seq=4 Destination Host Unreachable

From 192.168.1.102 icmp_seq=6 Destination Host Unreachable

From 192.168.1.102 icmp_seq=7 Destination Host Unreachable

From 192.168.1.102 icmp_seq=8 Destination Host Unreachable

--- 192.168.1.1 ping statistics ---

9 packets transmitted, 0 received, +6 errors, 100% packet loss, time 8000ms

, pipe 3

salt anders # ifconfig

eth1      Link encap:Ethernet  HWaddr 00:04:23:65:5F:DF

          inet addr:192.168.1.102  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:13 errors:57 dropped:54 overruns:0 frame:0

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

          collisions:0 txqueuelen:1000

          RX bytes:3964 (3.8 Kb)  TX bytes:7012 (6.8 Kb)

          Interrupt:5 Base address:0xa000 Memory:faffc000-faffcfff

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:133 errors:0 dropped:0 overruns:0 frame:0

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

          collisions:0 txqueuelen:0

          RX bytes:11926 (11.6 Kb)  TX bytes:11926 (11.6 Kb)

salt anders # pump -i eth1

Operation failed.

```

Basic idea is taken from 

http://www.the-energy.net/gentoo-wiki/wireless.sh

I've also tried wpa supplicant with no luck. The AP is a WRT54G-EU and it works fine as a simple switch/hub - it also works with my girlfriends windows laptop.

Thanks in advance

Anders

----------

## UberLord

I would say that either the WEP key is incorrect or there is some other security on the AP stopping you.

A good first port of call is to disable all security to see if it's not something else, like a driver problem

----------

## biehl

OK - I try to disable security - and now it works  :Smile: 

```
salt anders # iwlist scan

lo        Interface doesn't support scanning.

eth0      Interface doesn't support scanning.

eth1      Scan completed :

          Cell 01 - Address: 00:0F:66:5B:25:C4

                    ESSID:"VIX"

                    Protocol:IEEE 802.11bg

                    Mode:Master

                    Channel:11

                    Encryption key:on

                    Bit Rate:54 Mb/s

                    Extra: Rates (Mb/s): 1 2 5.5 6 9 11 12 18 24 36 48 54

                    Quality=53/100  Signal level=-69 dBm

                    Extra: Last beacon: 148ms ago

          Cell 02 - Address: 00:14:BF:43:13:CD

                    ESSID:"Hope"

                    Protocol:IEEE 802.11bg

                    Mode:Master

                    Channel:11

                    Encryption key:off

                    Bit Rate:54 Mb/s

                    Extra: Rates (Mb/s): 1 2 5.5 6 9 11 12 18 24 36 48 54

                    Quality=91/100  Signal level=-38 dBm

                    Extra: Last beacon: 136ms ago

```

I'm not exactly sure why (I tried with no encryption earlier) BUT....

```
salt anders # iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

eth1      IEEE 802.11b  ESSID:"Hope"  Nickname:"ipw2100"

          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:14:BF:43:13:CD

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

          Retry min limit:7   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=100/100  Signal level=-50 dBm

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

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

salt anders # ifconfig eth1 up

salt anders # 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 eth0

192.168.1.0     *               255.255.255.0   U     0      0        0 eth1

loopback        localhost       255.0.0.0       UG    0      0        0 lo

default         192.168.1.1     0.0.0.0         UG    0      0        0 eth0

salt anders # pump -i eth1

salt anders # ifconfig

eth0      Link encap:Ethernet  HWaddr 00:0B:DB:E7:66:8C

          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000

          RX bytes:6259683 (5.9 Mb)  TX bytes:2506128 (2.3 Mb)

          Interrupt:11

eth1      Link encap:Ethernet  HWaddr 00:04:23:65:5F:DF

          inet addr:192.168.1.102  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000

          RX bytes:1755656 (1.6 Mb)  TX bytes:344113 (336.0 Kb)

          Interrupt:5 Base address:0xa000 Memory:faffc000-faffcfff

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:152 errors:0 dropped:0 overruns:0 frame:0

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

          collisions:0 txqueuelen:0

          RX bytes:13729 (13.4 Kb)  TX bytes:13729 (13.4 Kb)

salt anders # ifconfig eth0 down

salt anders # ping google.com

PING google.com (216.239.37.99) 56(84) bytes of data.

64 bytes from 216.239.37.99: icmp_seq=1 ttl=242 time=102 ms

64 bytes from 216.239.37.99: icmp_seq=2 ttl=242 time=111 ms

--- google.com ping statistics ---

2 packets transmitted, 2 received, 0% packet loss, time 1001ms

rtt min/avg/max/mdev = 102.466/107.135/111.804/4.669 ms

```

----------

## biehl

Ok - now it works perfectly with wpa_supplicant.

Ive flollowed Uberlords suggestion (from other threads) and use a minimal /etc/wpa_supplicant.conf

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=1

network={

        ssid="Hope"

        psk="9qygerveu3t7r2"        <--- my code

}

```

Now all I have to run is

```
wpa_supplicant -ieth1 -c/etc/wpa_supplicant.conf -Dipw -d
```

and 

```
pump -i eth1
```

   // pump is my dhcp client

-Anders

----------

## PChaos

The nasty little trick with the linksys APs seems to be in the "ap_scan = 1"

For me, my wpa_supplicant works well on other wlans also with other values than 1 and therefore slightly different behavior. But at home with my Linksys WAP54G (Same AP as in the router Type WRT54G but without router and switch) it only works with ap_scan = 1. Btw, my WLAN card is an micro-PCI Intel ipw2200, works fine if you dont mind to set up the secured connection manually.

----------

## never147

I had the same problem as this using a Dell Latitute D600 laptop with a Intel PRO/Wireless 2100 3B Mini Pci adapter and a Linksys WRT54G router. Connection would only work if i set WEP encryption on the router to 128 Bit 26 Hex digits not 64 bit. This is using iwconfig with a config just listing the ESSID and key in /etc/conf.d/wireless.

----------

