# [SOLVED] Just another WPA connection problem

## 2lopez

Hi there!

I've just installed gentoo on a laptop and will need to use wpa for internet connections. I've used before debian and other distros so I'm reusing some config files. Anyway I've no connection with the ap at all, so could you help to debug it please??

Here is my /etc/conf.d/net file:

```
dns_domain_lo="mydomain"

modules=( "wpa_supplicant" )

wpa_supplicant_eth1="-Dwext"

config_eth1=( "192.168.1.1 netmask 255.255.255.0 netmask 255.255.255.0 brd 192.168.1.255" )

routes_eth1=( "default via 192.168.1.1" )

dns_servers_eth1=( "192.168.1.1" )
```

My wpa_supplicant.conf from the previous installation (Debian).

/etc/wpa_supplicant.conf

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=1

network={

   ssid="myssid"

   proto=WPA RSN

   key_mgmt=TKIP CCMP

   psk="..."

   priority=5

}
```

I've red that I need CONFIG_PACKET enabled:

cat /usr/src/linux/.config | grep CONFIG_PACKET

```
CONFIG_PACKET=y

CONFIG_PACKET_MMAP=y
```

The driver ipw2200 compiled at the kernel detects my card properly. In fact I've connected before to an ap without any encryption.

dmesg | grep ipw

```
ipw2200: Intel(R) PRO/Wireless 2200/2915 Network Driver, 1.2.2kmprq

ipw2200: Copyright(c) 2003-2006 Intel Corporation

ipw2200: Detected Intel PRO/Wireless 2200BG Network Connection

ipw2200: Detected geography ZZR...
```

But when I start my interface eth1, there's no connection.

/etc/conf.d/net.eth1 start

```
* Starting eth1

*   Starting wpa_supplicant on eth1 ... [OK]

*   Starting wpa_cli on eth1 ... [OK]

*   Backgrounding ...
```

```
Nov 10 21:02:48 bender ADDRCONF(NETDEV_UP): eth1: link is not ready
```

As you can see here, the card isn't associated to any ap:

iwconfig eth1

```
eth1 unassociated ESSID:"default"
```

Could anybody give me advice? I've searched through other posts with no success.

Thanks in advance...

----------

## raulpober

I found I needed to at the -w option (wait for interface to be added) to wpa_supplicant:

```

wpa_supplicant_eth2="-w -Dwext"

```

Might be worth a try.

----------

## 2lopez

I've tried as raulpober suggested and got the same result.

 *Quote:*   

> wpa_supplicant_eth2="-w -Dwext" 

 

```
Nov 11 21:00:40 bender ADDRCONF(NETDEV_UP): eth1: link is not ready
```

I've also tried to turn on some options in my kernel config as said in https://forums.gentoo.org/viewtopic-t-631265.html#4625396 but now it looks even worse:

```
bender roberto # iwconfig eth1

eth1      No such device

bender roberto # dmesg | grep ipw

ipw2200: Unknown symbol ieee80211_wx_get_encodeext

ipw2200: Unknown symbol ieee80211_wx_set_encode

ipw2200: Unknown symbol ieee80211_wx_get_encode

ipw2200: Unknown symbol ieee80211_txb_free

ipw2200: Unknown symbol ieee80211_wx_set_encodeext

ipw2200: Unknown symbol ieee80211_wx_get_scan

ipw2200: Unknown symbol escape_essid

ipw2200: Unknown symbol ieee80211_freq_to_channel

ipw2200: Unknown symbol ieee80211_set_geo

ipw2200: Unknown symbol ieee80211_rx

ipw2200: Unknown symbol ieee80211_channel_to_index

ipw2200: Unknown symbol ieee80211_rx_mgt

ipw2200: Unknown symbol ieee80211_get_geo

ipw2200: Unknown symbol free_ieee80211

ipw2200: Unknown symbol ieee80211_is_valid_channel

ipw2200: Unknown symbol alloc_ieee80211

ipw2200: Unknown symbol ieee80211_wx_get_encodeext

ipw2200: Unknown symbol ieee80211_wx_set_encode

ipw2200: Unknown symbol ieee80211_wx_get_encode

ipw2200: Unknown symbol ieee80211_txb_free

ipw2200: Unknown symbol ieee80211_wx_set_encodeext

ipw2200: Unknown symbol ieee80211_wx_get_scan

ipw2200: Unknown symbol escape_essid

ipw2200: Unknown symbol ieee80211_freq_to_channel

ipw2200: Unknown symbol ieee80211_set_geo

ipw2200: Unknown symbol ieee80211_rx

ipw2200: Unknown symbol ieee80211_channel_to_index

ipw2200: Unknown symbol ieee80211_rx_mgt

ipw2200: Unknown symbol ieee80211_get_geo

ipw2200: Unknown symbol free_ieee80211

ipw2200: Unknown symbol ieee80211_is_valid_channel

ipw2200: Unknown symbol alloc_ieee80211
```

----------

## dmpogo

Are you sure the device the driver creates is eth1 and not wlan0 ?

----------

## 2lopez

Yes, I'm sure... I've used it before on non encrypted wlans.

----------

## button

Try running ifconfig eth1 and see if init script really assigns ip address. Also, run wpa_supplicant with -dd and study the output.

I am also having issues with wpa. Sometimes wpa_supplicant on my Gentoo desktop can't find AP. Everything works on my Ubuntu laptop, also connecting to the same AP.

----------

## 2lopez

```
bender roberto # ifconfig eth1 192.168.1.15

SIOCSIFADDR: No such device

eth1: ERROR while getting interface flags: No such device
```

I'll try to rebuild my kernel without those options https://forums.gentoo.org/viewtopic-t-631265.html#4625396

----------

## dmpogo

 *2lopez wrote:*   

> Yes, I'm sure... I've used it before on non encrypted wlans.

 

Well, here you do not even have a device eth1. This is before any encryption or anything.

It is just driver level. Inserting the module should create the device. If it does not, then module is wrong/broken or

kernel is miscompiled.  look into dmesg - what does it say when module is inserted ?  And check ifconfig -a to see

all the devices  :Smile: 

----------

## 2lopez

```
# lsmod | grep ipw

# find /lib/modules/2.6.25-gentoo-r8/ -type f -iname '*.o' -or -iname '*.ko' | grep ipw/lib/modules/2.6.25-gentoo-r8/kernel/drivers/net/wireless/ipw2200.ko

# modprobe ipw2200

FATAL: Error inserting ipw2200 (/lib/modules/2.6.25-gentoo-r8/kernel/drivers/net/wireless/ipw2200.ko): Unknown symbol in module, or unknown parameter (see dmesg)

# dmesg | tail

ipw2200: Unknown symbol ieee80211_wx_get_encodeext

ipw2200: Unknown symbol ieee80211_wx_set_encode

ipw2200: Unknown symbol ieee80211_wx_get_encode

ipw2200: Unknown symbol ieee80211_txb_free

ipw2200: Unknown symbol ieee80211_wx_set_encodeext

ipw2200: Unknown symbol ieee80211_wx_get_scan

ipw2200: Unknown symbol escape_essid

ipw2200: Unknown symbol ieee80211_freq_to_channel

ipw2200: Unknown symbol ieee80211_set_geo

ipw2200: Unknown symbol ieee80211_rx

ipw2200: Unknown symbol ieee80211_channel_to_index

ipw2200: Unknown symbol ieee80211_rx_mgt

ipw2200: Unknown symbol ieee80211_get_geo

ipw2200: Unknown symbol free_ieee80211

ipw2200: Unknown symbol ieee80211_is_valid_channel

ipw2200: Unknown symbol alloc_ieee80211

# ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:11:25:b0:03:6d  

          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::211:25ff:feb0:36d/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000 

          RX bytes:24621092 (23.4 MiB)  TX bytes:4564463 (4.3 MiB)

          Interrupt:11 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

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

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

          collisions:0 txqueuelen:0 

          RX bytes:60272 (58.8 KiB)  TX bytes:60272 (58.8 KiB)

```

----------

## dmpogo

 *2lopez wrote:*   

> 
> 
> ```
> # lsmod | grep ipw
> 
> ...

 

Here we are.  Module was not loaded and device was not created.

Was the module compiled together with/for  kernel that you are using ?  What is your

cat /proc/version ?

----------

## 2lopez

Yes, I think so. But I can't understand why just changing those options could damage my ipw2200 driver...

```
# cat /proc/version 

Linux version 2.6.25-gentoo-r8 (root@livecd) (gcc version 4.1.2 (Gentoo 4.1.2 p1.1)) #2 Wed Nov 5 20:48:36 CET 2008
```

----------

## dmpogo

 *2lopez wrote:*   

> Yes, I think so. But I can't understand why just changing those options could damage my ipw2200 driver...
> 
> ```
> # cat /proc/version 
> 
> ...

 

OK, are you sure this is a correct module for you card ?   could you post the output of 'lspci'  ?

Otherwise, did you compile the kernel yourself ? You did not copy the modules from somewhere else or compiled them separately ?   Does ipw2200 require a firmware (as iwl4965 does) ?

----------

## 2lopez

I'm sure it's the correct module, some hours ago it worked like a charm... everything but wpa. You can see it at my first message: *Quote:*   

> The driver ipw2200 compiled at the kernel detects my card properly. In fact I've connected before to an ap without any encryption.
> 
> dmesg | grep ipw
> 
> ```
> ...

 

```
# lspci

00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller (rev 03)

00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)

00:02.1 Display controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)

00:1c.0 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 1 (rev 03)

00:1c.2 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 3 (rev 03)

00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 03)

00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 03)

00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 03)

00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 03)

00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 03)

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

00:1e.2 Multimedia audio controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 03)

00:1e.3 Modem: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Modem Controller (rev 03)

00:1f.0 ISA bridge: Intel Corporation 82801FBM (ICH6M) LPC Interface Bridge (rev 03)

00:1f.2 IDE interface: Intel Corporation 82801FBM (ICH6M) SATA Controller (rev 03)

00:1f.3 SMBus: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller (rev 03)

02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5751M Gigabit Ethernet PCI Express (rev 11)

04:00.0 CardBus bridge: Texas Instruments PCI4510 PC card Cardbus Controller (rev 03)

04:00.1 FireWire (IEEE 1394): Texas Instruments PCI4510 IEEE-1394 Controller (rev 01)

04:02.0 Network controller: Intel Corporation PRO/Wireless 2200BG Network Connection (rev 05)

```

I compiled the kernel by myself, just looked over the internet for the right modules for my lspci output. The driver is from the kernel. It needs the ipw2200-firmware ebuild and I have installed it...

----------

## dmpogo

[quote="2lopez"]I'm sure it's the correct module, some hours ago it worked like a charm... everything but wpa. You can see it at my first message: *Quote:*   

> The driver ipw2200 compiled at the kernel detects my card properly. In fact I've connected before to an ap without any encryption.
> 
> dmesg | grep ipw
> 
> ```
> ...

 

Can you actually post all dmesg related to the card, when you insert the module, not just tails and heads ?

 *Quote:*   

> 
> 
> In fact I've connected before to an ap without any encryption.
> 
> 

 

That could not happen if module is not being inserted successfully, forget about it.

 Something has changed between now and then that does not allow loading the module. 

Did you upgrade the kernel and are using newer ipw module ?

 If yes, perhaps you need to upgrade the  firmware ?

----------

## 2lopez

 *dmpogo wrote:*   

> 
> 
>  *Quote:*   
> 
> In fact I've connected before to an ap without any encryption.
> ...

 

 *Quote:*   

>  forget about it

 

I finally got it working. My mistake -> I hadn't copied the new bzImage to /boot/ so it was just a slip-up (before, I had CONFIG_IEEE80211 as a module and now I changed it to CONFIG_IEEE80211=y). The driver is ipw2200, it detects the card properly and I've even succeeded in connecting via WPA with my old wpa_supplicant.conf file. The only problem is that I can't get the network up at boot time... I need to type those commands:

```
# wpa_supplicant -Dwext -ieth1 -dd -c/etc/wpa_supplicant.conf

# ifconfig eth1 192.168.1.10

# route add default gateway 192.168.1.1

# echo nameserver 192.168.1.1 > /etc/resolv.conf
```

 *button wrote:*   

> Also, run wpa_supplicant with -dd and study the output. 

  Thanks button, that helped me a lot.

Could you please help me to get it up at boot time? I've already executed rc-update add net.eth1 default My /etc/conf.d/net file:

```
dns_domain_lo="mydomain"

modules=( "wpa_supplicant" )

wpa_supplicant_eth1="-Dwext"

config_eth1=( "192.168.1.10 netmask 255.255.255.0 netmask 255.255.255.0 brd 192.168.1.255" )

routes_eth1=( "default via 192.168.1.1" )

dns_servers_eth1=( "192.168.1.1" )
```

Thanks in advance!!!

----------

## dmpogo

 *Quote:*   

> 
> 
> My mistake -> I hadn't copied the new bzImage to /boot/ so it was just a slip-up
> 
> 

 

That explains it. (BTW "forget it" was refering to thinking about encryption issues)

Your /etc/conf.d/net looks fine as long as you indeed want a statics IP address and it agrees with

the configuration of your network.  The only thing is that I have wap_supplicant config file explicitly in the options

```

wpa_supplicant_wlan0="-Dwext -c /etc/wpa_supplicant/wpa_supplicant.conf"

```

----------

## 2lopez

Thanks for your help dmpogo, today I came back into my problem an solved it: just added a new parameter to the wpa_supplicant_eth1 line:

```
wpa_supplicant_eth1="-Dwext -ieth1 -c/etc/wpa_supplicant.conf"
```

and it began to work perfectly  :Smile: 

----------

