# problem with wpa

## concord

Hi Friends,

I have a x86 gentoo installed on USB hard disk. The USB hard disk is connected on a core intel notebook. The wireless connection is with wpa-pks. If no wpa, wireless is ok. But is with wpa, it doesn't work. So, what shall I do.?

----------

## d2_racing

Hi, can you post this :

```

# emerge --info

# cat /etc/conf.d/net

# ifconfig -a

# iwconfig

# cat /etc/wpa_supplicant/wpa_supplicant.conf

# iwlist scan

```

----------

## concord

Thanks very much for your help. 

My gentoo unit is generic system,which can be used on almost every kinds of x86 (32bit, 64bit, P3, P4, core, amd64...) computers.

emerge --info is:

```
merge --info

Portage 2.1.9.25 (default/linux/x86/10.0/desktop, gcc-4.4.4, glibc-2.11.2-r3, 2.6.35-gentoo-r12 i686)

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

System uname: Linux-2.6.35-gentoo-r12-i686-Genuine_Intel-R-_CPU_U2300_@_1.20GHz-with-gentoo-2.0.0

Timestamp of tree: Sat, 25 Dec 2010 09:45:01 +0000

ccache version 2.4 [enabled]

app-shells/bash:     4.1_p7

dev-java/java-config: 2.1.11-r1

dev-lang/python:     2.6.6-r1, 3.1.2-r4

dev-util/ccache:     2.4-r9

dev-util/cmake:      2.8.1-r2

sys-apps/baselayout: 2.0.0

sys-apps/openrc:     0.6.8

sys-apps/sandbox:    2.4

sys-devel/autoconf:  2.13::<unknown repository>, 2.65-r1

sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1

sys-devel/binutils:  2.20.1-r1

sys-devel/gcc:       4.4.4-r2

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.10

sys-devel/make:      3.81-r2

virtual/os-headers:  2.6.30-r1 (sys-kernel/linux-headers)

ACCEPT_KEYWORDS="x86"

ACCEPT_LICENSE="*"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-O2 -pipe -fomit-frame-pointer"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests binpkg-logs ccache distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"

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

LANG="en_US.UTF-8"

LC_ALL="en_US.UTF-8"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

LINGUAS="zh zh_CN en en_US en_GB"

MAKEOPTS="-j5"

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"

PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/portage/local/layman/gentoo-china /usr/portage/sys-fs"

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

USE="X a52 aac acl acpi alsa berkdb bluetooth branding bzip2 cairo cdr cjk cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gdu gif gpm gtk iconv jpeg kde lcms ldap libnotify lm_seneor mad mikmod mng modules mp3 mp4 mpeg mudflap mysql ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl pmu png policykit ppds pppd python qt3support qt4 readline sdl session spell sql ssl startup-notification svg sysfs tcpd tiff truetype unicode usb userlocales vorbis webkit x264 x86 xcb xml xorg xulrunner xv xvid zlib" ALSA_CARDS="*" 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 cgi cgid 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="zh zh_CN en en_US en_GB" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="apm ark ast chips cirrus dummy epson fbdev geode glint i128 i740 imstt intel mach64 mga neomagic nv r128 radeon radeonhd rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vermilion vesa via virtualbox vmware xgi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

```

cat /etc/conf.d/net is:

```
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 /usr/share/doc/openrc/net.example and save your configuration

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

# Prefer wpa_supplicant over wireless-tools

modules=("wpa_supplicant")

#rc_need=("wpa_supplicant")

# It's important that we tell wpa_supplicant which driver we should

# be using as it's not very good at guessing yet

wpa_supplicant_wlan2="-Dwext"

#essid_wlan2=("logintoconcord")

config_logintoconcord=("dhcp")

iwconfig_wlan0=("mode managed")

iwconfig_wlan2=("mode managed")

#config_eth0="210.73.9.174 netmask 255.255.255.128"

#route_eth0="default gw 210.73.9.254"

#dns_eth0="159.226.8.6"

```

ifconfig -a is

```

eth7      Link encap:Ethernet  HWaddr 00:23:81:0e:13:87  

          inet addr:192.168.1.101  Bcast:255.255.255.255  Mask:255.255.255.0

          inet6 addr: fe80::223:81ff:fe0e:1387/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000 

          RX bytes:193945220 (184.9 MiB)  TX bytes:9367744 (8.9 MiB)

          Interrupt:43 Base address:0x2000 

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

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

          collisions:0 txqueuelen:0 

          RX bytes:1018920 (995.0 KiB)  TX bytes:1018920 (995.0 KiB)

wlan2     Link encap:Ethernet  HWaddr 00:1e:64:54:55:2e  

          inet6 addr: fe80::21e:64ff:fe54:552e/64 Scope:Link

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000 

          RX bytes:27572 (26.9 KiB)  TX bytes:771 (771.0 B)

```

iwconfig is

```
lo        no wireless extensions.

eth7      no wireless extensions.

wlan2     IEEE 802.11bgn  ESSID:off/any  

          Mode:Managed  Frequency:2.437 GHz  Access Point: Not-Associated   

          Tx-Power=0 dBm   

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

          Encryption key:off

          Power Management:off

```

cat /etc/wpa_supplicant/wpa_supplicant.conf is:

```
cat /etc/wpa_supplicant/wpa_supplicant.conf

# The below line not be changed otherwise we refuse to work

ctrl_interface=/var/run/wpa_supplicant

# Ensure that only root can read the WPA configuration

ctrl_interface_group=0

# Let wpa_supplicant take care of scanning and AP selection

ap_scan=1

# Simple case: WPA-PSK, PSK as an ASCII passphrase, allow all valid ciphers

#network={

#  ssid="**************"

#  psk="********"

#  # The higher the priority the sooner we are matched

#  priority=5

#}

# Same as previous, but request SSID-specific scanning (for APs that reject

# broadcast SSID)

network={

  ssid="**************"

  scan_ssid=1

  psk="********"

  priority=2

}

# Only WPA-PSK is used. Any valid cipher combination is accepted

#network={

#  ssid="**************"

#  proto=WPA

#  key_mgmt=WPA-PSK

#  pairwise=CCMP TKIP

#  group=CCMP TKIP WEP104 WEP40

#  psk="********"

#  priority=2

#}

# Plaintext connection (no WPA, no IEEE 802.1X)

#network={

#  ssid="plaintext-test"

#  key_mgmt=NONE

#}

# Shared WEP key connection (no WPA, no IEEE 802.1X)

#network={

#  ssid="**************"

#  key_mgmt=NONE

#  # Keys in quotes are ASCII keys

#  wep_key0="********"

#  # Keys specified without quotes are hex keys

#  wep_key1=0102030405

#  wep_key2="1234567890123"

#  wep_tx_keyidx=0

#  priority=5

#}

# Shared WEP key connection (no WPA, no IEEE 802.1X) using Shared Key

# IEEE 802.11 authentication

#network={

#  ssid="static-wep-test2"

#  key_mgmt=NONE

#  wep_key0="abcde"

#  wep_key1=0102030405

#  wep_key2="1234567890123"

#  wep_tx_keyidx=0

#  priority=5

#  auth_alg=SHARED

#}

# IBSS/ad-hoc network with WPA-None/TKIP

#network={

#  ssid="test adhoc"

#  mode=1

#  proto=WPA

#  key_mgmt=WPA-NONE

#  pairwise=NONE

#  group=TKIP

#  psk="secret passphrase"

#}

```

iwlist scan is

```
iwlist scan

lo        Interface doesn't support scanning.

eth7      Interface doesn't support scanning.

wlan2     Scan completed :

          Cell 01 - Address: 94:0C:6D:72:52:FE

                    Channel:6

                    Frequency:2.437 GHz (Channel 6)

                    Quality=49/70  Signal level=-61 dBm  

                    Encryption key:on

                    ESSID:"TP-LINK_chenyan"

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s

                              12 Mb/s; 24 Mb/s; 36 Mb/s

                    Bit Rates:9 Mb/s; 18 Mb/s; 48 Mb/s; 54 Mb/s

                    Mode:Master

                    Extra:tsf=0000000801c6b3c4

                    Extra: Last beacon: 380ms ago

                    IE: Unknown: 000F54502D4C494E4B5F6368656E79616E

                    IE: Unknown: 010882848B960C183048

                    IE: Unknown: 030106

                    IE: Unknown: 2A0100

                    IE: Unknown: 32041224606C

                    IE: IEEE 802.11i/WPA2 Version 1

                        Group Cipher : CCMP

                        Pairwise Ciphers (1) : CCMP

                        Authentication Suites (1) : PSK

                       Preauthentication Supported

                    IE: WPA Version 1

                        Group Cipher : CCMP

                        Pairwise Ciphers (1) : CCMP

                        Authentication Suites (1) : PSK

                    IE: Unknown: DD0900037F01010008FF7F

                    IE: Unknown: DD1A00037F0301000000940C6D7252FE960C6D7252FE64002C010808

          Cell 02 - Address: 00:0A:EB:E3:20:CC

                    Channel:6

                    Frequency:2.437 GHz (Channel 6)

                    Quality=39/70  Signal level=-71 dBm  

                    Encryption key:on

                    ESSID:""

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s

                              12 Mb/s; 24 Mb/s; 36 Mb/s

                    Bit Rates:9 Mb/s; 18 Mb/s; 48 Mb/s; 54 Mb/s

                    Mode:Master

                    Extra:tsf=0000000b9976d181

                    Extra: Last beacon: 1730ms ago

                    IE: Unknown: 000E0000000000000000000000000000

                    IE: Unknown: 010882848B960C183048

                    IE: Unknown: 030106

                    IE: Unknown: 050400010000

                    IE: Unknown: 0706434E20010D14

                    IE: Unknown: 2A0100

                    IE: Unknown: 32041224606C

                    IE: IEEE 802.11i/WPA2 Version 1

                        Group Cipher : TKIP

                        Pairwise Ciphers (2) : TKIP CCMP

                        Authentication Suites (1) : PSK

                       Preauthentication Supported

                    IE: WPA Version 1

                        Group Cipher : TKIP

                        Pairwise Ciphers (2) : TKIP CCMP

                        Authentication Suites (1) : PSK

                    IE: Unknown: DD0900037F01010008FF7F

                    IE: Unknown: DD1A00037F0301000000000AEBE320CC020AEBE320CC64002C010808

                    IE: Unknown: DD180050F2020101000003A4000027A4000042435E0062322F00

          Cell 03 - Address: 00:21:27:64:08:A2

                    Channel:11

                    Frequency:2.462 GHz (Channel 11)

                    Quality=30/70  Signal level=-80 dBm  

                    Encryption key:on

                    ESSID:"TP-LINK_6408A2"

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s

                              12 Mb/s; 24 Mb/s; 36 Mb/s

                    Bit Rates:9 Mb/s; 18 Mb/s; 48 Mb/s; 54 Mb/s

                    Mode:Master

                    Extra:tsf=0000003967b72e37

                    Extra: Last beacon: 6970ms ago

                    IE: Unknown: 000E54502D4C494E4B5F363430384132

                    IE: Unknown: 010882848B960C183048

                    IE: Unknown: 03010B

                    IE: Unknown: 050400010000

                    IE: Unknown: 2A0100

                    IE: Unknown: 32041224606C

                    IE: Unknown: DD0900037F01010008FF7F

                    IE: Unknown: DD1A00037F03010000000021276408A20221276408A264002C010808

          Cell 04 - Address: 00:1D:0F:59:84:34

                    Channel:6

                    Frequency:2.437 GHz (Channel 6)

                    Quality=24/70  Signal level=-86 dBm  

                    Encryption key:on

                    ESSID:"XR_Sparkle"

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s

                              12 Mb/s; 24 Mb/s; 36 Mb/s

                    Bit Rates:9 Mb/s; 18 Mb/s; 48 Mb/s; 54 Mb/s

                    Mode:Master

                    Extra:tsf=000000118480d181

                    Extra: Last beacon: 12470ms ago

                    IE: Unknown: 000A58525F537061726B6C65

                    IE: Unknown: 010882848B960C183048

                    IE: Unknown: 030106

                    IE: Unknown: 050400010000

                    IE: Unknown: 0706434E20010D14

                    IE: Unknown: 2A0100

                    IE: Unknown: 32041224606C

                    IE: IEEE 802.11i/WPA2 Version 1

                        Group Cipher : CCMP

                        Pairwise Ciphers (1) : CCMP

                        Authentication Suites (1) : PSK

                       Preauthentication Supported

                    IE: Unknown: DD0900037F01010008FF7F

                    IE: Unknown: DD1A00037F0301000000001D0F598434021D0F59843464002C010808

          Cell 05 - Address: 00:07:40:8B:FB:57

                    Channel:11

                    Frequency:2.462 GHz (Channel 11)

                    Quality=28/70  Signal level=-82 dBm  

                    Encryption key:off

                    ESSID:"000740B57FBE"

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s

                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s

                              36 Mb/s; 48 Mb/s; 54 Mb/s

                    Mode:Master

                    Extra:tsf=0000034b0a304189

                    Extra: Last beacon: 90ms ago

                    IE: Unknown: 000C303030373430423537464245

                    IE: Unknown: 010482848B96

                    IE: Unknown: 03010B

                    IE: Unknown: 2A0104

                    IE: Unknown: 2F0104

                    IE: Unknown: 32080C1218243048606C

                    IE: Unknown: DD050010180100

          Cell 06 - Address: 00:1E:58:86:B1:14

                    Channel:6

                    Frequency:2.437 GHz (Channel 6)

                    Quality=28/70  Signal level=-82 dBm  

                    Encryption key:on

                    ESSID:"zhubindewang"

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s

                              9 Mb/s; 12 Mb/s; 18 Mb/s

                    Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s

                    Mode:Master

                    Extra:tsf=00000013466fa19b

                    Extra: Last beacon: 360ms ago

                    IE: Unknown: 000C7A687562696E646577616E67

                    IE: Unknown: 010882848B960C121824

                    IE: Unknown: 030106

                    IE: Unknown: 050400010000

                    IE: Unknown: 2A0104

                    IE: Unknown: 32043048606C

                    IE: WPA Version 1

                        Group Cipher : TKIP

                        Pairwise Ciphers (1) : TKIP

                        Authentication Suites (1) : PSK

                    IE: Unknown: DD180050F2020101000003A4000027A4000042435E0062322F00

                    IE: Unknown: DD0700E04C01020300

          Cell 07 - Address: 00:19:E0:92:72:9A

                    Channel:13

                    Frequency:2.472 GHz (Channel 13)

                    Quality=23/70  Signal level=-87 dBm  

                    Encryption key:on

                    ESSID:"GU-TP-LINK"

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s

                              12 Mb/s; 24 Mb/s; 36 Mb/s

                    Bit Rates:9 Mb/s; 18 Mb/s; 48 Mb/s; 54 Mb/s

                    Mode:Master

                    Extra:tsf=00000007dc3ff181

                    Extra: Last beacon: 150ms ago

                    IE: Unknown: 000A47552D54502D4C494E4B

                    IE: Unknown: 010882848B960C183048

                    IE: Unknown: 03010D

                    IE: Unknown: 050400010000

                    IE: Unknown: 0706434E20010D14

                    IE: Unknown: 2A0100

                    IE: Unknown: 32041224606C

                    IE: Unknown: DD0900037F01010008FF7F

                    IE: Unknown: DD1A00037F03010000000019E092729A0219E092729A64002C010808

```

Thanks again!

----------

## jcTux

Can you also post the output of 

```
# rc-config show --all | grep started
```

----------

## concord

 *jcTux wrote:*   

> Can you also post the output of 
> 
> ```
> # rc-config show --all | grep started
> ```
> ...

 

Yes. It shows:

```
rc-config show --all | grep started

  acpid                     [started]

  autofs                    [started]

  cupsd                     [started]

  dbus                      [started]

  hald                      [started]

  hdparm                    [started]

  local                     [started]

  mysql                     [started]

  syslog-ng                 [started]

  vixie-cron                [started]

  xdm                       [started]

  alsasound                 [started]

  bootmisc                  [started]

  consolefont               [started]

  device-mapper             [started]

  fsck                      [started]

  hibernate-cleanup         [started]

  hostname                  [started]

  hwclock                   [started]

  keymaps                   [started]

  localmount                [started]

  lvm                       [started]

  modules                   [started]

  mtab                      [started]

  net.lo                    [started]

  network                   [started]

  procfs                    [started]

  root                      [started]

  staticroute               [started]

  swap                      [started]

  sysctl                    [started]

  termencoding              [started]

  urandom                   [started]

  acpid                     [started]

  autofs                    [started]

  cupsd                     [started]

  dbus                      [started]

  hald                      [started]

  hdparm                    [started]

  local                     [started]

  mkxf86config              [started]

  mysql                     [started]

  NetworkManager            [started]

  syslog-ng                 [started]

  udev-postmount            [started]

  vixie-cron                [started]

  xdm                       [started]

  local                     [started]

  devfs                     [started]

  dmesg                     [started]

  udev                      [started]

```

Merry Christmas!

----------

## jcTux

Try to connect manually.

Activate de the interface :

```
# ifconfig wlan2 up
```

Run wpa_supplicant :

```
# wpa_supplicant -B -Dwext -i wlan2 -c /etc/wpa_supplicant.conf 
```

Get an ip adress by DHCP :

```
# dhcpcd wlan0
```

Tell us if it works.

----------

## concord

Thanks very much for your help. The problem maybe from wlan2.

when start wlan2 first:

```
 /etc/init.d/net.wlan2 restart

 * Bringing up interface wlan2

 *   Starting wpa_supplicant on wlan2 ...                                                    [ ok ]

 *   Starting wpa_cli on wlan2 ...                                                           [ ok ]

 *   Backgrounding ... ...

 * WARNING: net.wlan2 has started, but is inactive
```

then up wlan2

```
ifconfig wlan2 up
```

then wpa

```
wpa_supplicant -B -Dwext -i wlan2 -c /etc/wpa_supplicant/wpa_supplicant.conf

ctrl_iface exists and seems to be in use - cannot override it

Delete '/var/run/wpa_supplicant/wlan2' manually if it is not used anymore

Failed to initialize control interface '/var/run/wpa_supplicant'.

You may have another wpa_supplicant process already running or the file was

left by an unclean termination of wpa_supplicant in which case you will need

to manually remove this file before starting wpa_supplicant again.

```

when stop wlan2 first:

```
/etc/init.d/net.wlan2 stop

 * Bringing down interface wlan2

 *   Removing addresses

 *     Stopping wpa_cli on wlan2 ...                                                         [ ok ]

 *     Stopping wpa_supplicant on wlan2 ...                                                  [ ok 
```

then up wlan2

```

 ifconfig wlan2 up

SIOCSIFFLAGS: Unknown error 132
```

then wpa

```
wpa_supplicant -B -Dwext -i wlan2 -c /etc/wpa_supplicant/wpa_supplicant.conf

Could not set interface wlan2 flags: Unknown error 132

Failed to initialize driver interface

```

Thanks again!

----------

## d2_racing

Is this on your laptop ?

 ifconfig wlan2 up

SIOCSIFFLAGS: Unknown error 132 

is often when the wifi switch is off.

Can you post this :

```

# cd /usr/src/linux 

# cat .config | grep -i kill

```

----------

## ewaller

 *d2_racing wrote:*   

> ...is often when the wifi switch is off.
> 
> ...

 

Except his iwlist scan looks pretty good.

I agree that this should be flown by hand before turning on an autopilot.

You can see the near by access points.  Good.

Next, try to associate with the AP with which you are interested.  Unless iwconfig shows you as being associated with an AP, there is no point in proceeding further.  Using iwconfig, assign your SSID, ensure your Tx power is on, and that you want a managed as opposed to ad-hoc system.  Unless you can get iwconfig to show your NIC as associated with the IP's SSID, you are wasting your time going any further.  The rfkill utility might be helpful at this step if you are unable to turn on your transceiver.  You have the ability to see APs in your area, so I think you are okay.

Once you succeed with associating, then try wpa_cli (as root) to control wpa_supplicant.  You should be able to establish a WPA connection by providing the appropriate credentials.  If you cannot establish a connection, check your kernel configuration to ensure you have provided AES encryption (WPA2) and TCIP (WPA).  

Last, after all of the above prerequisites are established, you should be able to obtain an IP using dhcpcd or dhconfig.  Once this works, move on to automating the process.

My starting questions are, what is the output of iwconfig ??

And, with which of the APs in your iwscan list do you want to connect?

edit: fixed tags

----------

## concord

 *d2_racing wrote:*   

> Is this on your laptop ?
> 
>  ifconfig wlan2 up
> 
> SIOCSIFFLAGS: Unknown error 132 
> ...

 

Thanks for your help. the switch is turned on. and

```
cat .config | grep -i kill

CONFIG_RFKILL=m

CONFIG_RFKILL_LEDS=y

CONFIG_RFKILL_INPUT=y

CONFIG_TOSHIBA_BT_RFKILL is not set

```

----------

## concord

 *ewaller wrote:*   

>  *d2_racing wrote:*   ...is often when the wifi switch is off.
> 
> ... 
> 
> Except his iwlist scan looks pretty good.
> ...

 

Thanks very much for your help.

AES=m is in kernel. But I can't find where is TCIP. 

My AP is the hid ESSID. iwconfig is:

```
iwconfig

lo        no wireless extensions.

eth7      no wireless extensions.

wlan2     IEEE 802.11bgn  ESSID:off/any  

          Mode:Managed  Frequency:2.437 GHz  Access Point: Not-Associated   

          Tx-Power=14 dBm   

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

          Encryption key:off

          Power Management:off

```

That's mean no essid can be set with iwconfig wlan2 essid XXXXXXXXX

----------

## ewaller

I am not sure I understand.  You are trying to connect to an AP with a hidden ESSID ?

That is okay, but you need to provide the ESSID in the configuration file in place of the **********  (I assume when you posted you did obfuscate the ESSID by changing it to asterisks )

----------

## concord

 *ewaller wrote:*   

> I am not sure I understand.  You are trying to connect to an AP with a hidden ESSID ?
> 
> That is okay, but you need to provide the ESSID in the configuration file in place of the **********  (I assume when you posted you did obfuscate the ESSID by changing it to asterisks )

 

Yes, I have set essid in /etc/wpa_supplicant/wpa_supplicant.conf. The ********** in config file is same as AP.

----------

## d2_racing

Is this possible to do a quick test and recompile your kernel without these :

```

CONFIG_RFKILL=m

CONFIG_RFKILL_LEDS=y

CONFIG_RFKILL_INPUT=y

CONFIG_TOSHIBA_BT_RFKILL is not set 

```

I know in the past that the RFKILL switch can cause a lot of trouble.

----------

## concord

 *d2_racing wrote:*   

> Is this possible to do a quick test and recompile your kernel without these :
> 
> ```
> 
> CONFIG_RFKILL=m
> ...

 

Thanks! I have re-compiled the kernel as above. But the problem still there.

----------

## concord

 *d2_racing wrote:*   

> Is this possible to do a quick test and recompile your kernel without these :
> 
> ```
> 
> CONFIG_RFKILL=m
> ...

 

Thanks! I have re-compiled the kernel as above. But the problem still there.

----------

## WendyB

I had exact the same messages with a Ralink 3070 USB WLAN which seems to refuse to work with wpa_supplicant or wext

The only way to make it work was using iwpriv commands

I have to say this was on a very specific ARM-architecture

----------

