6

From my Raspberry Pi 2, I can't connect to my wifi college: sudo ifup wlan0 returns:

ioctl[SIOCSIWAP]: Operation not permitted
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/00:0b:81:94:e7:e1
Sending on   LPF/wlan0/00:0b:81:94:e7:e1
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

Here's lsusb:

Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter

And lsmod:

...
8192cu                528429  0 
...

So it seems that my RPi detected my wifi dongle with success.

These are my /etc/network/interfaces:

# Loopback network interface
auto lo
iface lo inet loopback

# auto eth0
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp

pre-up wpa_supplicant -B -Dwext -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -f /var/log/wpa_supplicant.log
post-down killall -q wpa_supplicant
iface default inet dhcp

And my /etc/wpa_supplicant/wpa_supplicant.conf:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="wifiname"
    scan_ssid=1
    identity="student.name@collegedomain"                
# I got this password by using wpa_passphrase ssid mypassword 
    password="mypassword"    
    proto=RSN
    eap=PEAP
    key_mgmt=WPA-EAP
    pairwise=CCMP
    auth_alg=OPEN
    phase2="auth=MSCHAPV2"
}

iwconfig wlan0:

wlan0     unassociated  Nickname:"<WIFI@REALTEK>"
      Mode:Managed  Frequency=2.462 GHz  Access Point: Not-Associated   
      Sensitivity:0/0  
      Retry:off   RTS thr:off   Fragment thr:off
      Power Management:off
      Link Quality:0  Signal level:0  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

ifconfig wlan0:

wlan0     Link encap:Ethernet  HWaddr 00:0b:81:94:e7:e1  
      UP 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)

If my wifi dongle is detected, maybe I'm mistaken about the configuration.

My college's wifi security is WPA/WPA2, EAP-PEAP, MSCHAPV2.

What am I doing wrong?

Edit 1: added infos about iwconfig wlan0 and ifconfig wlan0.

Edit 2: tried to execute ~ $ wpa_supplicant -dd -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf, it says :

wpa_supplicant v1.0
random: Trying to read entropy from /dev/random
Initializing interface 'wlan0' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' -> '/etc/wpa_supplicant/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf'
Failed to read or parse configuration '/etc/wpa_supplicant/wpa_supplicant.conf'.
Failed to add interface wlan0
: Cancelling scan request
: Cancelling authentication timeout

Edit 3: ls -ltr /etc/wpa_supplicant/wpa_supplicant.conf:

-rw------- 1 root root 576 Feb 16 22:27 /etc/wpa_supplicant/wpa_supplicant.conf

Edit 4: sudo iwlist wlan0 scan (you may read something significant which I couldn't get):

wlan0     Scan completed :
      Cell 01 - Address: 00:3A:99:48:18:20
                Channel:11
                Frequency:2.462 GHz (Channel 11)
                Quality=66/70  Signal level=-44 dBm  
                Encryption key:on
                ESSID:"ALMAWIFI"
                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=0000000000000000
                Extra: Last beacon: 12ms ago
                IE: Unknown: 0008414C4D4157494649
                IE: Unknown: 01088C9298243048606C
                IE: Unknown: 03010B
                IE: Unknown: 0706495420010D14
                IE: Unknown: 0B0503003A8D5B
                IE: Unknown: 2A0100
                IE: IEEE 802.11i/WPA2 Version 1
                    Group Cipher : TKIP
                    Pairwise Ciphers (1) : CCMP
                    Authentication Suites (1) : 802.1x
                IE: Unknown: 7F06001000000040
                IE: Unknown: 851E01008F000F00FF03590041502D424F2D3030303030313735310003000027
                IE: Unknown: 9606004096000800
                IE: WPA Version 1
                    Group Cipher : TKIP
                    Pairwise Ciphers (1) : TKIP
                    Authentication Suites (1) : 802.1x
                IE: Unknown: DD180050F2020101800003A4000027A4000042435E0062322F00
                IE: Unknown: DD06004096010104
                IE: Unknown: DD050040960305
                IE: Unknown: DD050040960B09
                IE: Unknown: DD050040961401
      Cell 02 - Address: 00:3A:99:2C:5F:40
                Channel:11
                Frequency:2.462 GHz (Channel 11)
                Quality=28/70  Signal level=-82 dBm  
                Encryption key:on
                ESSID:"ALMAWIFI"
                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=0000000000000000
                Extra: Last beacon: 12ms ago
                IE: Unknown: 0008414C4D4157494649
                IE: Unknown: 01088C9298243048606C
                IE: Unknown: 03010B
                IE: Unknown: 0706495420010D14
                IE: Unknown: 0B0503000A8D5B
                IE: Unknown: 2A0100
                IE: IEEE 802.11i/WPA2 Version 1
                    Group Cipher : TKIP
                    Pairwise Ciphers (1) : CCMP
                    Authentication Suites (1) : 802.1x
                IE: Unknown: 7F06001000000040
                IE: Unknown: 851E04008F000F00FF03590041502D424F2D3030303030313834390003000027
                IE: Unknown: 9606004096000B00
                IE: WPA Version 1
                    Group Cipher : TKIP
                    Pairwise Ciphers (1) : TKIP
                    Authentication Suites (1) : 802.1x
                IE: Unknown: DD180050F2020101800003A4000027A4000042435E0062322F00
                IE: Unknown: DD06004096010104
                IE: Unknown: DD050040960305
                IE: Unknown: DD050040960B09
                IE: Unknown: DD050040961401
 ...
Cell 05 - Address: 00:3A:99:5C:FF:F0
                Channel:1
                Frequency:2.412 GHz (Channel 1)
                Quality=42/70  Signal level=-68 dBm  
                Encryption key:on
                ESSID:"ALMAWIFI"
                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=0000000000000000
                Extra: Last beacon: 12ms ago
                IE: Unknown: 0008414C4D4157494649
                IE: Unknown: 01088C9298243048606C
                IE: Unknown: 030101
                IE: Unknown: 0706495420010D14
                IE: Unknown: 0B050400238D5B
                IE: Unknown: 2A0100
                IE: IEEE 802.11i/WPA2 Version 1
                    Group Cipher : TKIP
                    Pairwise Ciphers (1) : CCMP
                    Authentication Suites (1) : 802.1x
                IE: Unknown: 7F06001000000040
                IE: Unknown: 851E03008F000F00FF03590041502D424F2D3030303030313830310004000027
                IE: Unknown: 9606004096000800
                IE: WPA Version 1
                    Group Cipher : TKIP
                    Pairwise Ciphers (1) : TKIP
                    Authentication Suites (1) : 802.1x
                IE: Unknown: DD180050F2020101800003A4000027A4000042435E0062322F00
                IE: Unknown: DD06004096010104
                IE: Unknown: DD050040960305
                IE: Unknown: DD050040960B09
                IE: Unknown: DD050040961401

Edit 5: I forgot to look here; cat /var/log/wpa_supplicant.log:

rfkill: Cannot open RFKILL control device
wlan0: Trying to associate with 00:3a:99:48:18:20 (SSID='ALMAWIFI' freq=2462 MHz)
wlan0: Association request to the driver failed
wlan0: CTRL-EVENT-DISCONNECTED bssid=00:3a:99:48:18:20 reason=0
wlan0: Trying to associate with 00:3a:99:5c:ff:f0 (SSID='ALMAWIFI' freq=2412 MHz)
wlan0: Association request to the driver failed
wlan0: CTRL-EVENT-DISCONNECTED bssid=00:3a:99:5c:ff:f0 reason=0
wlan0: Trying to associate with 00:3a:99:5c:ff:f0 (SSID='ALMAWIFI' freq=2412 MHz)
wlan0: Association request to the driver failed
wlan0: CTRL-EVENT-DISCONNECTED bssid=00:3a:99:5c:ff:f0 reason=0
wlan0: Trying to associate with 00:3a:99:48:18:20 (SSID='ALMAWIFI' freq=2462 MHz)
wlan0: Association request to the driver failed
wlan0: CTRL-EVENT-DISCONNECTED bssid=00:3a:99:48:18:20 reason=0
wlan0: Trying to associate with 00:3a:99:2c:5f:40 (SSID='ALMAWIFI' freq=2462 MHz)
wlan0: Association request to the driver failed
wlan0: CTRL-EVENT-DISCONNECTED bssid=00:3a:99:2c:5f:40 reason=0

...and so on, always the same three unsuccessful attempts.

10
  • I find using wicdcurses is much easier. It also reconnect to WiFi much better. I never got supplicant to work properly for my self.
    – Piotr Kula
    Commented May 13, 2015 at 11:08
  • can you run wpa_supplicant without -B? I'm confused as to why it's not showing which line it can't read... Also: run ls -ltr /etc/wpa_supplicant/wpa_supplicant.conf to check permissions
    – Doug Edey
    Commented May 13, 2015 at 11:16
  • @DougEdey let me edit my question in order to make my answer more readable.
    – elmazzun
    Commented May 13, 2015 at 11:19
  • @DougEdey calling wpa_supplicant without -B returns a huge amounts of lines, I could pass them through a pastebin. @ppumkin I want to get it right with wpa_supplicant :)
    – elmazzun
    Commented May 13, 2015 at 11:31
  • 1
    So the pastebin implies that you're being rejected. askubuntu.com/questions/422714/… This isn't a RPi specific question however, you'd be better off in a linux/wifi stackexchange.
    – Doug Edey
    Commented May 13, 2015 at 14:48

1 Answer 1

3

Just a suggestion, but I recently discovered wicd-curses, which I've found to be more intuitive to work with than editing the various config files. It's kind of nicely in between a desktop GUI and editing config files.

http://blog.ubidots.com/setup-wifi-on-raspberry-pi-using-wicd

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.