2

I am unable to connect to a wireless network in Debian Linux.

I begin by typing the following command:

iwconfig

This is my output:

wlan0     IEEE 802.11abgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on

Next I type:

ifconfig wlan0 up

Then I scan for the networks with this command:

iwlist scan | more

I see the network that I want to connect too so I know that it is at least visible from my computer.

I then type in this command:

cat /etc/wpa_supplicant.conf

This is my output:

ctrl_interface=/var/run/wpa_supplicant

network={
    ssid="wireless_network_name"
    key_mgmt=WPA-PSK
    psk="wireless_network_password"
}

In order to change the ssid and key I use this command:

wpa_passphrase "My Network Name" "Password" > /etc/wpa_supplicant.conf

I review the contents of the file and see that they have actually changed to the correct ssid and password.

I then type (this is where the error occurs):

wpa_supplicant -B -Dwext -c /etc/wpa_supplicant.conf -i wlan0

The output I get is:

Successfully initialized wpa_supplicant
ioct1[SIOCSIWENCODEEXT]: Invalid argument
ioct1[SIOCSIWENCODEEXT]: Invalid argument

I tried kill the process in wpa_supplicant and retrying as well as rebooting. I am at a lost of what to do and would love some direction.

Suggestion 1 (did not work for me)

Input:

wpa_supplicant -B -D nl80211 -c /etc/wpa_supplicant.conf -i wlan0

Output:

Successfully initialized wpa_supplicant

Input:

ifconfig wlan0

Output:

flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::3ea3:8ff:fec8:5a87 prefixlem 64 scopeid 0x20<link>
ether 3c:a3:08:c8:5a:87 txqueuelen 1000 (Ethernet)
RX packets 4 bytes 380 (380.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7 bytes 806 (806.6 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Input:

iwconfig wlan0

Output:

 wlan0         IEEE 802.11abgn EESID:"My Network Name"
                  Mode: Managed Frequency: 2.437 GHz Access Point: AC:86:74:86:D6:CA
                  Bit Rate=72.2 Mb/s     Tx-Power=20 dBm
                  Retry short limit:7     RTS thr:off       Fragment thr:off
                  Encryption key:off
                  Power Management:on
                  Link Quality=68/70 Signal level=-42 dBm
                  Rx invalid nwid:0  Rx invalid crpyt:0  Rx invalid frag:0
                  Tx excessive retries:0  Invalid misc:0  Missed beacon:0

Suggestion 2

Add update_config=1 to wpa_supplicant.conf

Input

echo 'update_config=1' >> /etc/wpa_supplicant.conf

Now run wpa_supplicant command with no -B or -D.

Successfully initialized wpa_supplicant
wlan0: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
nl80211: send_and_recv->nl_recvmsgs failed: -33
wlan0: SME: Trying to authenticate with ac:86:74:92:fc:8a (SSID='My Network Name' freq=2347 MHz)
wlan0: CTRL-EVENT-DISCONNECTED bssid=ac:86:74:92:fc:8a reason=2 locally_generated=1
wlan0: Trying to associate with ac:86:74:92:fc:8a (SSID='My Network Name' freq=2347 MHz)
wlan0: Associated with ac:86:74:92:fc:8a
wlan0: WPA: Invalid EAPOL-Key MIC when using TPIK - ignoring TPIK
wlan0: WPA: Could not verify EAPOL-KEY MIC - dropping packet
Authentication with ac:86:74:92:fc:8a timed out.

Input

dhclient wlan0 

This input just loads command forever. Until I press CTRL+C. If I try to ping I get ping: unknown host www.google.com

13
  • You want a space between the option -D and the value wext you are passing to it.
    – jasonwryan
    Commented Jun 18, 2018 at 21:24
  • @jasonwryan this did not fix my issue
    – Berchell
    Commented Jun 19, 2018 at 13:27
  • @GAD3R the output is literally nothing. Just goes to the next line.
    – Berchell
    Commented Jun 19, 2018 at 13:59
  • 1
    I am using a uPC and the wifi card is the WL1837MOD is a WiLink™ 8 based Dual-Band industrial module. I typed lspci -knn and again no output just went to the next line. Do I need to navigate to a certain directory?
    – Berchell
    Commented Jun 19, 2018 at 14:09
  • 1
    I have been in and out of contact with them. I ran the command wpa_supplicant -dd -D wext -c /etc/wpa_supplicant.conf -i wlan0 which runs a debug of wpa_supplicant. They told me to continue using D wext They suggested uninstalling and then reinstalling the kernel. Something that I am not looking forward to attempting. I will attach the debug file to this post. I do not know what I am looking at.
    – Berchell
    Commented Jun 21, 2018 at 18:36

1 Answer 1

2

The wireless extensions wext have been deprecated in favor of nl80211.

Could you please try the command

sudo wpa_supplicant -B -D nl80211 -c /etc/wpa_supplicant.conf -i wlan0

Note that using wpa_supplicant directly in the way you intend to do will only work, when no frontend program (such as networkmanager) using wpa_supplicant is already running.

11
  • 1
    wext is a valid argument, and while it has been deprecated it is still a necessary option for older cards.
    – jasonwryan
    Commented Jun 18, 2018 at 21:58
  • sure agreed, but judging by the output posted by OP I assume this will fix the problem
    – oh.dae.su
    Commented Jun 18, 2018 at 22:02
  • The output says "invalid argument"...
    – jasonwryan
    Commented Jun 18, 2018 at 22:10
  • 1
    I get the same output as OP on my system using wext. However using nl80211 everything works fine.
    – oh.dae.su
    Commented Jun 18, 2018 at 22:13
  • 1
    you could try this sequence before calling wpa_supplicant (not sure this is the solution, but worth a try): 1)sudo ifconfig wlan0 down 2)sudo ip addr flush dev wlan0 3)sudo ifconfig wlan0 up
    – oh.dae.su
    Commented Jun 19, 2018 at 14:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .