# Using wpa_supplicant to connect with rtl8187se [solved]

## noaham

Hi everyone,

I have a fresh gentoo installation on my laptop. Initially I had some issues getting my wireless card to work but it now works fine (thanks to some advice from DONAHUE). I was able to connect to both unsecured networks and those using WEP encryption. However I have now set my router back to using WPA-PSK, TKIP because we have had problems with people in our area hacking into when it has only been using WEP encryption. However I am now having real trouble trying to connect.

I am sure I am probably just missing something really stupid and I am sorry for asking silly questions but networking is really where my knowledge of computers falls down. This is what I have been doing:

To get my wireless card up (will add to runlevel later):

```
effles ~ # ifconfig wlan0 up
```

I can then scan:

```
effles ~ # iwlist wlan0 scan

wlan0     Scan completed :

...

          Cell 02 - Address: 00:22:B0:98:F5:CE

                    ESSID:"43"

                    Protocol:IEEE 802.11bg

                    Mode:Master

                    Channel:6

                    Encryption key:on

                    Bit Rates:54 Mb/s

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

                    Quality=51/100  Signal level=-60 dBm  Noise level=-86 dBm

                    IE: WPA Version 1

                        Group Cipher : TKIP

                        Pairwise Ciphers (1) : TKIP

                        Authentication Suites (1) : PSK

                    Extra: Last beacon: 126ms ago

...
```

this is the one I want to connect to

my conf.d/net:

```
# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

```

my wpa_supplicant.conf:

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

network={

    ssid="43"

    proto=WPA

    key_mgmt=WPA-PSK

    pairwise=TKIP

    group=TKIP

    psk="XXXXXXXXX"

}

```

but when I try and activate wpa_supplicant but get this:

```
effles ~ # wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf

CTRL-EVENT-SCAN-RESULTS 

Trying to associate with 00:22:b0:98:f5:ce (SSID='43' freq=2437 MHz)

Association request to the driver failed

CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

Associated with 00:22:b0:98:f5:ce

WPA: Failed to set PTK to the driver.

WPA: EAPOL-Key Replay Counter did not increase - dropping packet

Associated with 00:22:b0:98:f5:ce

WPA: Failed to set PTK to the driver.

WPA: EAPOL-Key Replay Counter did not increase - dropping packet

Associated with 00:22:b0:98:f5:ce

WPA: Failed to set PTK to the driver.

WPA: EAPOL-Key Replay Counter did not increase - dropping packet

...

```

and just goes on like this, not finishing until I kill it.

EDIT - I should also say that this is interspersed with:

```
icotl[SIOCSIWENCODE]: Invalid argument
```

and

```
icotl[SICOSIWENCODEEXT]: Operation no supported
```

it just didn't print these to the file I created with 

```
wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf >> wpa_supplicant.txt
```

As I said, I'm sure its because I'm just doing something really stupid because I don't understand what I am doing properly, but I guess you can't learn without asking, right? I appreciate your help guys.

NoahLast edited by noaham on Wed Apr 14, 2010 5:00 am; edited 1 time in total

----------

## noaham

ok have slightly changed my wpa_supplicant.conf:

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

ap_scan=1

network={

   ssid="43"

   #psk="XXXXXXXXX"

   psk=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

}

```

This doesn't make a difference.

I have also put the first minute or so of results of the following up on pastbin (http://pastebin.com/fdRjJmAY)

```
effles ~ # wpa_supplicant -dd -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
```

I have checked all the relevent parts of the kernel and they have all been compiled in. Hope the debug info helps.

----------

## d2_racing

Ok, can you post this :

```

# emerge --info

# lspci -v

# lspci -n

# cat /etc/conf.d/net

# cd /etc/init.d && ls -la

# cat /etc/wpa_supplicant/wpa_supplicant.conf

# rc-update show

```

What happen when you run this :

```

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

# dmesg | tail

# iwconfig

# ifconfig -a

```

----------

## noaham

Thanks here is the info:

```
effles / # emerge --info

Portage 2.1.7.17 (default/linux/amd64/10.0, gcc-4.3.4, glibc-2.10.1-r1, 2.6.31-gentoo-r10 x86_64)

=================================================================

System uname: Linux-2.6.31-gentoo-r10-x86_64-AMD_Athlon-tm-_X2_Dual-Core_QL-67-with-gentoo-1.12.13

Timestamp of tree: Sat, 10 Apr 2010 09:45:01 +0000

app-shells/bash:     4.0_p37

dev-lang/python:     2.6.4-r1

sys-apps/baselayout: 1.12.13

sys-apps/sandbox:    1.6-r2

sys-devel/autoconf:  2.63-r1

sys-devel/automake:  1.10.3

sys-devel/binutils:  2.18-r3

sys-devel/gcc:       4.3.4

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.6b

virtual/os-headers:  2.6.30-r1

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="* -@EULA"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=k8-sse3 -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-march=k8-sse3 -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"

GENTOO_MIRRORS="http://distfiles.gentoo.org"

LDFLAGS="-Wl,-O1"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"

USE="3dnow X acl acpi alsa amd64 berkdb bzip2 cdr cli cracklib crypt cups cxx dri dvd emacs fortran ftp gdbm gif gpm hal iconv ipv6 latex mmx modules mp3 mudflap multilib ncurses nls nptl nptlonly openmp pam pcre perl php pppd python readline reflection samba session spl sse sse2 ssl sysfs tcpd unicode usb wifi xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo" 

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

```

```
effles / # lspci -v

00:00.0 Host bridge: Advanced Micro Devices [AMD] RS780 Host Bridge

   Subsystem: Toshiba America Info Systems Device ff00

   Flags: bus master, 66MHz, medium devsel, latency 64

   Capabilities: [c4] HyperTransport: Slave or Primary Interface

   Capabilities: [54] HyperTransport: UnitID Clumping

   Capabilities: [40] HyperTransport: Retry Mode

   Capabilities: [9c] HyperTransport: #1a

   Capabilities: [f8] HyperTransport: #1c

00:01.0 PCI bridge: Toshiba America Info Systems Device 9602 (prog-if 00 [Normal decode])

   Flags: bus master, 66MHz, medium devsel, latency 66

   Bus: primary=00, secondary=01, subordinate=01, sec-latency=68

   I/O behind bridge: 00009000-00009fff

   Memory behind bridge: cfd00000-cfefffff

   Prefetchable memory behind bridge: 00000000d0000000-00000000dfffffff

   Capabilities: [44] HyperTransport: MSI Mapping Enable+ Fixed+

   Capabilities: [b0] Subsystem: Toshiba America Info Systems Device ff00

00:04.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 0) (prog-if 00 [Normal decode])

   Flags: bus master, fast devsel, latency 0

   Bus: primary=00, secondary=04, subordinate=06, sec-latency=0

   Capabilities: [50] Power Management version 3

   Capabilities: [58] Express Root Port (Slot+), MSI 00

   Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit-

   Capabilities: [b0] Subsystem: Toshiba America Info Systems Device ff00

   Capabilities: [b8] HyperTransport: MSI Mapping Enable+ Fixed+

   Capabilities: [100] Vendor Specific Information <?>

   Capabilities: [110] Virtual Channel <?>

   Kernel driver in use: pcieport-driver

00:06.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 2) (prog-if 00 [Normal decode])

   Flags: bus master, fast devsel, latency 0

   Bus: primary=00, secondary=0e, subordinate=0e, sec-latency=0

   I/O behind bridge: 0000a000-0000afff

   Memory behind bridge: f0200000-f02fffff

   Capabilities: [50] Power Management version 3

   Capabilities: [58] Express Root Port (Slot+), MSI 00

   Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit-

   Capabilities: [b0] Subsystem: Toshiba America Info Systems Device ff00

   Capabilities: [b8] HyperTransport: MSI Mapping Enable+ Fixed+

   Capabilities: [100] Vendor Specific Information <?>

   Capabilities: [110] Virtual Channel <?>

   Kernel driver in use: pcieport-driver

00:07.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 3) (prog-if 00 [Normal decode])

   Flags: bus master, fast devsel, latency 0

   Bus: primary=00, secondary=14, subordinate=14, sec-latency=0

   I/O behind bridge: 0000b000-0000bfff

   Memory behind bridge: c8000000-c80fffff

   Prefetchable memory behind bridge: 00000000f0400000-00000000f04fffff

   Capabilities: [50] Power Management version 3

   Capabilities: [58] Express Root Port (Slot+), MSI 00

   Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit-

   Capabilities: [b0] Subsystem: Toshiba America Info Systems Device ff00

   Capabilities: [b8] HyperTransport: MSI Mapping Enable+ Fixed+

   Capabilities: [100] Vendor Specific Information <?>

   Capabilities: [110] Virtual Channel <?>

   Kernel driver in use: pcieport-driver

00:11.0 SATA controller: ATI Technologies Inc SB700/SB800 SATA Controller [AHCI mode] (prog-if 01 [AHCI 1.0])

   Subsystem: Toshiba America Info Systems Device ff00

   Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 22

   I/O ports at 8430 [size=8]

   I/O ports at 8424 [size=4]

   I/O ports at 8428 [size=8]

   I/O ports at 8420 [size=4]

   I/O ports at 8400 [size=16]

   Memory at f0308000 (32-bit, non-prefetchable) [size=1K]

   Capabilities: [60] Power Management version 2

   Capabilities: [70] SATA HBA <?>

   Kernel driver in use: ahci

00:12.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller (prog-if 10 [OHCI])

   Subsystem: Toshiba America Info Systems Device ff00

   Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 16

   Memory at f0304000 (32-bit, non-prefetchable) [size=4K]

   Kernel driver in use: ohci_hcd

00:12.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller (prog-if 10 [OHCI])

   Subsystem: Toshiba America Info Systems Device ff00

   Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 16

   Memory at f0305000 (32-bit, non-prefetchable) [size=4K]

   Kernel driver in use: ohci_hcd

00:12.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller (prog-if 20 [EHCI])

   Subsystem: Toshiba America Info Systems Device ff00

   Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 17

   Memory at f0308400 (32-bit, non-prefetchable) [size=256]

   Capabilities: [c0] Power Management version 2

   Capabilities: [e4] Debug port: BAR=1 offset=00e0

   Kernel driver in use: ehci_hcd

00:13.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller (prog-if 10 [OHCI])

   Subsystem: Toshiba America Info Systems Device ff00

   Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 18

   Memory at f0306000 (32-bit, non-prefetchable) [size=4K]

   Kernel driver in use: ohci_hcd

00:13.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller (prog-if 10 [OHCI])

   Subsystem: Toshiba America Info Systems Device ff00

   Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 18

   Memory at f0307000 (32-bit, non-prefetchable) [size=4K]

   Kernel driver in use: ohci_hcd

00:13.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller (prog-if 20 [EHCI])

   Subsystem: Toshiba America Info Systems Device ff00

   Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 19

   Memory at f0308800 (32-bit, non-prefetchable) [size=256]

   Capabilities: [c0] Power Management version 2

   Capabilities: [e4] Debug port: BAR=1 offset=00e0

   Kernel driver in use: ehci_hcd

00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 3a)

   Subsystem: Toshiba America Info Systems Device ff00

   Flags: 66MHz, medium devsel

   Capabilities: [b0] HyperTransport: MSI Mapping Enable- Fixed+

00:14.1 IDE interface: ATI Technologies Inc SB700/SB800 IDE Controller (prog-if 8a [Master SecP PriP])

   Subsystem: Toshiba America Info Systems Device ff00

   Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 16

   I/O ports at 01f0 [size=8]

   I/O ports at 03f4 [size=1]

   I/O ports at 0170 [size=8]

   I/O ports at 0374 [size=1]

   I/O ports at 8410 [size=16]

   Capabilities: [70] MSI: Enable- Count=1/2 Maskable- 64bit-

   Kernel driver in use: ATIIXP_IDE

00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)

   Subsystem: Toshiba America Info Systems Device ff00

   Flags: bus master, slow devsel, latency 64, IRQ 16

   Memory at f0300000 (64-bit, non-prefetchable) [size=16K]

   Capabilities: [50] Power Management version 2

   Kernel driver in use: HDA Intel

00:14.3 ISA bridge: ATI Technologies Inc SB700/SB800 LPC host controller

   Subsystem: Toshiba America Info Systems Device ff00

   Flags: bus master, 66MHz, medium devsel, latency 0

00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge (prog-if 01 [Subtractive decode])

   Flags: bus master, 66MHz, medium devsel, latency 64

   Bus: primary=00, secondary=28, subordinate=2a, sec-latency=64

00:18.0 Host bridge: Advanced Micro Devices [AMD] Mobile K10 [Turion X2, Athlon X2, Sempron] HyperTransport Configuration (rev 40)

   Flags: fast devsel

   Capabilities: [80] HyperTransport: Host or Secondary Interface

00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 11h [Turion X2, Athlon X2, Sempron] Address Map

   Flags: fast devsel

00:18.2 Host bridge: Advanced Micro Devices [AMD] Mobile K10 [Turion X2, Athlon X2, Sempron] DRAM Controller

   Flags: fast devsel

00:18.3 Host bridge: Advanced Micro Devices [AMD] Mobile K10 [Turion X2, Athlon X2, Sempron] Miscellaneous Control

   Flags: fast devsel

   Capabilities: [f0] Secure device <?>

00:18.4 Host bridge: Advanced Micro Devices [AMD] Mobile K10 [Turion X2, Athlon X2, Sempron] Link Control

   Flags: fast devsel

01:05.0 VGA compatible controller: ATI Technologies Inc RS780MC [Radeon HD 3100 Graphics] (prog-if 00 [VGA controller])

   Subsystem: Toshiba America Info Systems Device ff80

   Flags: bus master, fast devsel, latency 0, IRQ 18

   Memory at d0000000 (32-bit, prefetchable) [size=256M]

   I/O ports at 9000 [size=256]

   Memory at cfdf0000 (32-bit, non-prefetchable) [size=64K]

   Memory at cfe00000 (32-bit, non-prefetchable) [size=1M]

   Expansion ROM at <unassigned> [disabled]

   Capabilities: [50] Power Management version 3

   Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+

0e:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8187SE Wireless LAN Controller (rev 22)

   Subsystem: Realtek Semiconductor Co., Ltd. Device 8181

   Flags: bus master, fast devsel, latency 0, IRQ 18

   I/O ports at a000 [size=256]

   Memory at f0200000 (32-bit, non-prefetchable) [size=16K]

   Capabilities: [40] Power Management version 3

   Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+

   Capabilities: [70] Express Legacy Endpoint, MSI 00

   Capabilities: [100] Advanced Error Reporting

   Capabilities: [140] Virtual Channel <?>

   Capabilities: [160] Device Serial Number 00-00-a2-e7-1a-04-1a-70

   Kernel driver in use: r8180

14:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)

   Subsystem: Toshiba America Info Systems Device ff00

   Flags: bus master, fast devsel, latency 0, IRQ 19

   I/O ports at b000 [size=256]

   Memory at f0410000 (64-bit, prefetchable) [size=4K]

   Memory at f0400000 (64-bit, prefetchable) [size=64K]

   [virtual] Expansion ROM at f0420000 [disabled] [size=128K]

   Capabilities: [40] Power Management version 3

   Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+

   Capabilities: [70] Express Endpoint, MSI 01

   Capabilities: [ac] MSI-X: Enable- Count=2 Masked-

   Capabilities: [cc] Vital Product Data

   Capabilities: [100] Advanced Error Reporting

   Capabilities: [140] Virtual Channel <?>

   Capabilities: [160] Device Serial Number 01-00-00-00-00-00-00-00

   Kernel driver in use: r8169

```

 Hmmm.. I've just realised that it says the kernel driver in use for my wireless card is r8180 and not rtl8187? Is this the problem? Although I can connect to unencrypted networks no problem.

```
effles /# lspci -n

00:00.0 0600: 1022:9600

00:01.0 0604: 1179:9602

00:04.0 0604: 1022:9604

00:06.0 0604: 1022:9606

00:07.0 0604: 1022:9607

00:11.0 0106: 1002:4391

00:12.0 0c03: 1002:4397

00:12.1 0c03: 1002:4398

00:12.2 0c03: 1002:4396

00:13.0 0c03: 1002:4397

00:13.1 0c03: 1002:4398

00:13.2 0c03: 1002:4396

00:14.0 0c05: 1002:4385 (rev 3a)

00:14.1 0101: 1002:439c

00:14.2 0403: 1002:4383

00:14.3 0601: 1002:439d

00:14.4 0604: 1002:4384

00:18.0 0600: 1022:1300 (rev 40)

00:18.1 0600: 1022:1301

00:18.2 0600: 1022:1302

00:18.3 0600: 1022:1303

00:18.4 0600: 1022:1304

01:05.0 0300: 1002:9613

0e:00.0 0280: 10ec:8199 (rev 22)

14:00.0 0200: 10ec:8136 (rev 02)

```

```
effles / # cat /etc/conf.d/net 

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext" 

```

```
effles / # cd /etc/init.d && ls -la 

total 164

drwxr-xr-x  2 root root  4096 Apr 10 23:49 .

drwxr-xr-x 34 root root  4096 Apr 13 07:10 ..

-rwxr-xr-x  1 root root  3614 Apr 10 23:55 bootmisc

-rwxr-xr-x  1 root root  1232 Apr 10 23:55 checkfs

-rwxr-xr-x  1 root root  3226 Apr 10 23:55 checkroot

-rwxr-xr-x  1 root root  3054 Apr 10 23:55 clock

-rwxr-xr-x  1 root root  1419 Apr 10 23:55 consolefont

-rwxr-xr-x  1 root root  1729 Apr 10 23:55 crypto-loop

lrwxrwxrwx  1 root root    21 Apr 11 03:44 depscan.sh -> ../../sbin/depscan.sh

lrwxrwxrwx  1 root root    23 Apr 11 03:44 functions.sh -> ../../sbin/functions.sh

-rwxr-xr-x  1 root root  5606 Apr 10 23:55 halt.sh

-rwxr-xr-x  1 root root   433 Apr 10 23:55 hostname

-rwxr-xr-x  1 root root  1855 Apr 10 23:55 keymaps

-rwxr-xr-x  1 root root   620 Apr 10 23:55 local

-rwxr-xr-x  1 root root  2088 Apr 10 23:55 localmount

-rwxr-xr-x  1 root root  2947 Apr 10 23:55 modules

lrwxrwxrwx  1 root root     6 Apr 11 03:43 net.eth0 -> net.lo

-rwxr-xr-x  1 root root 30689 Apr 10 23:55 net.lo

-rwxr-xr-x  1 root root  3307 Apr 10 23:55 netmount

-rwxr-xr-x  1 root root  1526 Apr 10 23:55 nscd

-rwxr-xr-x  1 root root   670 Apr 10 23:55 numlock

-rwxr-xr-x  1 root root  1871 Apr 10 23:55 pciparm

-rwxr-xr-x  1 root root   666 Apr 10 23:55 pydoc-2.6

-rwxr-xr-x  1 root root   304 Apr 10 23:55 reboot.sh

-rwxr-xr-x  1 root root   276 Apr 10 23:55 rmnologin

-rwxr-xr-x  1 root root   558 Apr 10 23:55 rsyncd

lrwxrwxrwx  1 root root    23 Apr 11 03:44 runscript.sh -> ../../sbin/runscript.sh

-rwxr-xr-x  1 root root   385 Apr 10 23:55 shutdown.sh

-rwxr-xr-x  1 root root  2159 Apr 10 23:55 sshd

-rwxr-xr-x  1 root root  1882 Apr 10 23:55 syslog-ng

-rwxr-xr-x  1 root root  6386 Apr 10 23:55 udev

-rwxr-xr-x  1 root root  2585 Apr 10 23:55 udev-dev-tarball

-rwxr-xr-x  1 root root  2869 Apr 10 23:55 udev-mount

-rwxr-xr-x  1 root root   805 Apr 10 23:55 udev-postmount

-rwxr-xr-x  1 root root   942 Apr 10 23:55 urandom

-rwxr-xr-x  1 root root   530 Apr 10 23:55 vixie-cron

```

```
effles / # cat /etc/wpa_supplicant/wpa_supplicant.conf 

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

ap_scan=1

network={

   ssid="43"

   #psk="XXXXXXXXXXXX"

   psk=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

}

```

```
effles /# rc-update show

 [31;01m*[0m ERROR:  runlevel update does not exist; exiting ...

 
```

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

-bash: /etc/init.d/net: no such file or directory

```

```
effles / # dmesg | tail 

[    7.398870] sd 4:0:0:0: [sdb] Mode Sense: 45 00 00 08

[    7.398872] sd 4:0:0:0: [sdb] Assuming drive cache: write through

[    7.400491] sd 4:0:0:0: [sdb] Assuming drive cache: write through

[    7.400494]  sdb: sdb1

[    7.402490] sd 4:0:0:0: [sdb] Assuming drive cache: write through

[    7.402496] sd 4:0:0:0: [sdb] Attached SCSI removable disk

[   10.048599] EXT3 FS on sda6, internal journal

[   10.390131] NTFS volume version 3.1.

[   11.919762] Adding 6289408k swap on /dev/sda7.  Priority:-1 extents:1 across:6289408k 

[   17.046362] r8169: eth0: link down

```

```
effles / # iwconfig

lo           no wireless extensions

dummy0 no wireless extensions

eth0       no wireless extensions

wlan0     802.11b/g  Mode:Managed  Access Point: Not-Associated   

          Bit Rate:11 Mb/s   

          Retry:on   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management timeout:0us  mode:All packets received

          Link Quality=0/100  Signal level=0 dBm  Noise level=0 dBm

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

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

```

I accidentally ran ifconfig without the -a flag and am at work now. I will try and post it asap.

```
effles / # ifconfig

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

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

          collisions:0 txqueuelen:0 

          RX bytes:1584 (1.5 KiB)  TX bytes:1584 (1.5 KiB)

```

Many thanks!

----------

## d2_racing

Hi, when you have the time, post this :

```

# cd /etc/init.d

# ln -s net.lo net.wlan0

```

```

# iwconfig

# ifconfig -a

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

# iwconfig

# dmesg | tail

# ifconfig -a

```

----------

## noaham

OK, thanks, will do. Do I have to make sure I have my network card is up first, before I create the net.wlan0 file? ie:

```
# ifconfig wlan0 up
```

----------

## d2_racing

Yeah, make sure the interface is up.

----------

## noaham

OK, the following is all of the code, do you mind explaining why I did that (if its too long or complicated don't worry):

```
effles / # iwconfig

lo        no wireless extensions

dummy0    no wireless extensions

eth0      no wireless extensions

wlan0     802.11b/g  Mode:Managed  Frequency=2.422 GHz  

          Access Point: Not-Associated   Bit Rate:11 Mb/s   

          Retry:on   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=0/100  Signal level=0 dBm  Noise level=0 dBm

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

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

effles / # ifconfig -a

dummy0    Link encap:Ethernet  HWaddr ee:c0:22:b2:d4:4a  

          BROADCAST NOARP  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:0 

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

eth0      Link encap:Ethernet  HWaddr 00:26:22:35:a2:8c  

          BROADCAST 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:1000 

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

          Interrupt:19 Base address:0xc000 

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

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

          collisions:0 txqueuelen:0 

          RX bytes:1584 (1.5 KiB)  TX bytes:1584 (1.5 KiB)

wlan0     Link encap:Ethernet  HWaddr 70:1a:04:1a:e7:a2  

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:1008 (1008.0 B)

          Interrupt:18 Memory:ffffc90002a88000-ffffc90002a88100

effles / # /etc/init.d/net.wlan0 start

 * Checking service dependencies ...                                        [ok]

 * Starting wlan0

 *   Starting wpa_supplicant on wlan0 ...                                  [ok]

 *   Starting wpa_cli on wlan0 ...                                         [ok]

 *     Backgrounding ...

effles / # iwconfig

lo        no wireless extensions

dummy0    no wireless extensions

eth0      no wireless extensions

wlan0     802.11b/g  link  ESSID:"43"  

          Mode:Managed  Frequency=2.437 GHz  Access Point: 00:22:B0:98:F5:CE   

          Bit Rate=54 Mb/s   

          Retry:on   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=54/100  Signal level=-58 dBm  Noise level=-89 dBm

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

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

effles / # dmesg | tail

[  763.451821] ieee80211_crypt_tkip: could not allocate crypto API michael_mic

[  771.491952] Associated successfully

[  771.491957] Using G rates

[  772.503021] ieee80211_crypt_tkip: could not allocate crypto API michael_mic

[  780.544537] Associated successfully

[  780.544542] Using G rates

[  781.553919] ieee80211_crypt_tkip: could not allocate crypto API michael_mic

[  789.589657] Associated successfully

[  789.589662] Using G rates

[  790.596834] ieee80211_crypt_tkip: could not allocate crypto API michael_mic

effles / # ifconfig -a

dummy0    Link encap:Ethernet  HWaddr ee:c0:22:b2:d4:4a  

          BROADCAST NOARP  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:0 

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

eth0      Link encap:Ethernet  HWaddr 00:26:22:35:a2:8c  

          BROADCAST 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:1000 

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

          Interrupt:19 Base address:0xc000 

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

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

          collisions:0 txqueuelen:0 

          RX bytes:1584 (1.5 KiB)  TX bytes:1584 (1.5 KiB)

wlan0     Link encap:Ethernet  HWaddr 70:1a:04:1a:e7:a2  

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000 

          RX bytes:13922 (13.5 KiB)  TX bytes:16894 (16.4 KiB)

          Interrupt:18 Memory:ffffc90002a88000-ffffc90002a88100 
```

----------

## d2_racing

Ok, your wpa_supplicant seems to be working.

All the commands where to see if you wpa_supplicant and the wireless card were doing something.

Can you post this :

```

# cd /usr/src/linux

# cat .config | grep -i CRYPTO

```

----------

## noaham

here are the relevent parts of my .config:

```
effles / # cat .config | grep -i CRYPTO

# CONFIG_BLK_DEV_CRYPTOLOOP is not set

CONFIG_CRYPTO=y

# Crypto core or helper

# CONFIG_CRYPTO_FIPS is not set

CONFIG_CRYPTO_ALGAPI=y

CONFIG_CRYPTO_ALGAPI2=y

CONFIG_CRYPTO_AEAD=y

CONFIG_CRYPTO_AEAD2=y

CONFIG_CRYPTO_BLKCIPHER=y

CONFIG_CRYPTO_BLKCIPHER2=y

CONFIG_CRYPTO_HASH=y

CONFIG_CRYPTO_HASH2=y

CONFIG_CRYPTO_RNG2=y

CONFIG_CRYPTO_PCOMP=y

CONFIG_CRYPTO_MANAGER=y

CONFIG_CRYPTO_MANAGER2=y

# CONFIG_CRYPTO_NULL is not set

CONFIG_CRYPTO_WORKQUEUE=y

# CONFIG_CRYPTO_CRYPTD is not set

CONFIG_CRYPTO_AUTHENC=y

# CONFIG_CRYPTO_TEST is not set

# CONFIG_CRYPTO_CCM is not set

# CONFIG_CRYPTO_GCM is not set

# CONFIG_CRYPTO_SEQIV is not set

CONFIG_CRYPTO_CBC=y

# CONFIG_CRYPTO_CTR is not set

# CONFIG_CRYPTO_CTS is not set

CONFIG_CRYPTO_ECB=y

# CONFIG_CRYPTO_PCBC is not set

CONFIG_CRYPTO_HMAC=y

# CONFIG_CRYPTO_CRC32C is not set

# CONFIG_CRYPTO_CRC32C_INTEL is not set

# CONFIG_CRYPTO_MD4 is not set

CONFIG_CRYPTO_MD5=y

# CONFIG_CRYPTO_MICHAEL_MIC is not set

# CONFIG_CRYPTO_RMD128 is not set

# CONFIG_CRYPTO_RMD160 is not set

# CONFIG_CRYPTO_RMD256 is not set

# CONFIG_CRYPTO_RMD320 is not set

CONFIG_CRYPTO_SHA1=y

# CONFIG_CRYPTO_SHA256 is not set

# CONFIG_CRYPTO_SHA512 is not set

# CONFIG_CRYPTO_TGR192 is not set

# CONFIG_CRYPTO_WP512 is not set

CONFIG_CRYPTO_AES=y

# CONFIG_CRYPTO_AES_X86_64 is not set

# CONFIG_CRYPTO_AES_NI_INTEL is not set

# CONFIG_CRYPTO_ANUBIS is not set

CONFIG_CRYPTO_ARC4=y

# CONFIG_CRYPTO_BLOWFISH is not set

# CONFIG_CRYPTO_CAMELLIA is not set

# CONFIG_CRYPTO_CAST5 is not set

# CONFIG_CRYPTO_CAST6 is not set

CONFIG_CRYPTO_DES=y

# CONFIG_CRYPTO_FCRYPT is not set

# CONFIG_CRYPTO_KHAZAD is not set

# CONFIG_CRYPTO_SEED is not set

# CONFIG_CRYPTO_SERPENT is not set

# CONFIG_CRYPTO_TEA is not set

# CONFIG_CRYPTO_TWOFISH is not set

# CONFIG_CRYPTO_TWOFISH_X86_64 is not set

CONFIG_CRYPTO_DEFLATE=y

# CONFIG_CRYPTO_ZLIB is not set

# CONFIG_CRYPTO_LZO is not set

# CONFIG_CRYPTO_ANSI_CPRNG is not set

CONFIG_CRYPTO_HW=y

# CONFIG_CRYPTO_DEV_PADLOCK is not set

# CONFIG_CRYPTO_DEV_HIFN_795X is not set
```

is this the part that's causing trouble?

```
# CONFIG_CRYPTO_MICHAEL_MIC is not set
```

Its weird, because I left the crypto part as is when i configured the kernel as I thought dependencies would take care of it. Maybe I accidentally changed something.

----------

## d2_racing

Indeed, you need these :

```

CONFIG_CRYPTO_MICHAEL_MIC

CONFIG_CRYPTO_RMD160 

CONFIG_CRYPTO_RMD256 

CONFIG_CRYPTO_RMD320 

CONFIG_CRYPTO_SHA1

CONFIG_CRYPTO_SHA256 

CONFIG_CRYPTO_SHA512 

CONFIG_CRYPTO_AES

CONFIG_CRYPTO_AES_X86_64 

CONFIG_CRYPTO_AES_NI_INTEL 

```

Recompile your kernel, copy it to your /boot and reboot your box and retry  :Razz: 

```

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

# iwconfig

# dmesg | tail

# ifconfig -a 

# wpa_cli status

```

----------

## noaham

It works! Fantastic, thanks for all your help and for bearing with me.

Just a few follow up questions, wlan0 starts during boot, is this fine (it works so i assume it is) and if i need to add another network (say the net work at uni) can I just add that to my wpa_supplicant.conf and it'll work automatically?

Also, eth0 starts during boot as well and tries to find a connection (but obviously can't) when I try and remove it with rc-update del net.eth0 default, it says it can't find net.eth0. How do i remove this so that gentoo boots without trying to start this interface?

Cheers!

----------

## noaham

Dont worry! Figured it all out for myself  :Very Happy: 

Thanks for all the help, this is such a fantastic forum. I was thinking, today, that if I was having problems with my windows install and rang Microsoft or Toshiba, I would neither get help of the quality I get here nor as quickly as I get it here. So much for "support" being reason to use proprietry software (for personal use, i guess).

Anyway, hopefully soon I'll be able to contribute back!

----------

## d2_racing

 *noaham wrote:*   

> It works! Fantastic, thanks for all your help and for bearing with me.
> 
> Just a few follow up questions, wlan0 starts during boot, is this fine (it works so i assume it is) and if i need to add another network (say the net work at uni) can I just add that to my wpa_supplicant.conf and it'll work automatically?
> 
> Also, eth0 starts during boot as well and tries to find a connection (but obviously can't) when I try and remove it with rc-update del net.eth0 default, it says it can't find net.eth0. How do i remove this so that gentoo boots without trying to start this interface?
> ...

 

Hi, can you post this file :

```

# cat /etc/conf.d/rc

```

----------

## noaham

Well I had a read of some material online and also read throught the conf.d/rc file comments and simply edited the file to say the following:

```
RC_PLUG_SERVICES="!net.eth0"
```

thanks for the help though, I really appreciate it!

Noah

----------

