SliTaz SliTaz Forum

You are not logged in.

#1 2013-11-24 18:17:36

nger
Member
Registered: 2013-07-05
Posts: 32

can't connect to wifi: stale wpa_supplicant socket

I checked a lot of related topics here in forum and could not find any solution.

The thing is - I see all of ESSIDs around me but can't connect.

I use usb stick adapter. It worked fine before, but then I tried another usb adapter from other vendror, got kernel panic (because I plugged it out while OS is running) and and after restart can't connect to wifi even with old one usb adapter.

I found this strange message in cli after /etc/init.d/network.sh stop and then start"

Starting udhcp client on: wlan0...

Selceted interface "wlan1"

Failed to connect to wpa_supplicant - wpa_ctrl_open: Connection refused

same message in the boot log:

Starting wpa_supplicant for WPA-PSK... ok

Starting udhcpc client on: wlan0

Selected interface "wlan1"

Failed to connect to wpa_supplicant - wpa_ctrl_open: Connection refused

Looks like Selceted interface "wlan1" is the problem because I don't find any wlan1 device, and I can't find the solution how to switch to wlan0.

yeah, and ls /sys/class/net output iis dummy0 eth0 lo wlan0

Offline

#2 2013-11-24 18:40:10

mojo
Administrator
Registered: 2011-03-29
Posts: 2,173

Re: can't connect to wifi: stale wpa_supplicant socket

To hot swap USB wifi adapters stop the network script,reconfigure /etc/network.conf, start the network script.

Terminal as root:

[c]/etc/init.d/network.sh stop[/c]

Edit /etc/network.conf with correct adapter alias.

[c]/etc/init.d/network.sh start[/c]

Restart on network script fails sometimes so use stop and start

If you can't connect post the /etc/network.conf

Offline

#3 2013-11-24 19:04:39

nger
Member
Registered: 2013-07-05
Posts: 32

Re: can't connect to wifi: stale wpa_supplicant socket

hey mojo,

thanks for the reply.

I guess nothing wrong with network.conf, here it is:

# /etc/network.conf: SliTaz system wide networking configuration.

# Config file used by: /etc/init.d/network.sh

#

# Set default interface.

INTERFACE="wlan0"

# Dynamic IP address.

# Enable/disable DHCP client at boot time.

DHCP="yes"

# Static IP address.

# Enable/disable static IP at boot time.

STATIC="no"

# Set IP address and netmask for a static IP.

IP="192.168.0.6"

NETMASK="255.255.255.0"

# Set route gateway for a static IP.

GATEWAY="192.168.0.1"

# Set DNS server for a static IP.

DNS_SERVER="192.168.0.1"

# Wifi connection.

# Enable/disable wireless connection at boot time.

WIFI="yes"

# Wifi interface (iwconfig) and ESSID.

WIFI_INTERFACE="wlan0"

WIFI_ESSID="my_essid"

WIFI_MODE="managed"

WIFI_KEY="my_pas"

WIFI_KEY_TYPE="any" (with WPA here same effect)

WPA_DRIVER=""

WIFI_CHANNEL=""

WIFI_IWCONFIG_ARGS=""

what do you mean by "edit  with correct adapter alias?"

Offline

#4 2013-11-24 19:53:33

mojo
Administrator
Registered: 2011-03-29
Posts: 2,173

Re: can't connect to wifi: stale wpa_supplicant socket

what do you mean by "edit with correct adapter alias?"

WIFI_INTERFACE and INTERFACE match wifi adapter name from [c]ls /sys/class/net[/c] or [c]cat /proc/net/dev[/c]

Your /etc/network.conf looks like it should work if the adapter alias is wlan0 and the wifi router credentials are correct.

Offline

#5 2013-11-24 20:22:18

nger
Member
Registered: 2013-07-05
Posts: 32

Re: can't connect to wifi: stale wpa_supplicant socket

there is no wlan1

but i still see message in boot log(boot scripts) "selected interface wlan1"

failed to connect to wpa_supplicant .... etc, see. my first post

http://i.imgur.com/yPoNYf2.jpg

Offline

#6 2013-11-24 21:19:47

mojo
Administrator
Registered: 2011-03-29
Posts: 2,173

Re: can't connect to wifi: stale wpa_supplicant socket

"Selected interface wlan1" is output from wpa_cli the text based front end client to wpa_supplicant

wpa_cli gets default interface from the first interface found in socket path of wpa_supplicant

/var/run/wpa_supplicant

Check for a stale wpa_supplicant PID

Stop networking:

[c]/etc/init.d/network.sh stop[/c]

Verify wpa_supplicant has stopped:

[c]pgrep wpa_supplicant[/c]

No PID number if stopped.

[c]pkill wpa_supplicant[/c] to force kill if PID indicates wpa_supplicant is still running.

[c]ls /var/run[/c]

Delete udhcpc.wlan1.pid and wpa_supplicant directory containing wlan1 if they exist.

Start network:

[c]/etc/init.d/network.sh start[/c]

Offline

#7 2013-11-24 21:55:53

nger
Member
Registered: 2013-07-05
Posts: 32

Re: can't connect to wifi: stale wpa_supplicant socket

thanks a lot!

I removed wlan1 from /var/run/wpa_supplicant and now it works perfectly.

Offline

#8 2015-04-08 07:56:01

pavani
Member
Registered: 2015-04-08
Posts: 1

Re: can't connect to wifi: stale wpa_supplicant socket

Greetings,

We are trying to test WPA enterprise functionality in client mode.

Have you tested the supplicant file with PFX format in linux.why because I am using a device as a client.and with android gui its working fine but with VSM its not working in pfx format.if i convert it from pfx to pem format its working fine. PFX have a support only in windows or linux??.If it have support in linux then what are the changes to be done to make it work on VSM along with PFX format.

I am attaching the supplicantconf file for my android device.please suggest what to do.

supplcant_conf.c---file for my android.

authentication_failure----failure case for my VSM

Thank you.

Attach is the wpa_supplicant.conf file that we edit for our device (VSM) that is not working due to authentication failure.

Result:

/var/tmp # /home/release/wpa_cli -iwlan0 status

bssid=00:21:94:38:46:d0

ssid=xx-xxx-xx

id=0

mode=station

pairwise_cipher=CCMP

group_cipher=CCMP

key_mgmt=WPA2/IEEE 802.1X/EAP

wpa_state=ASSOCIATED

Supplicant PAE state=AUTHENTICATING

suppPortStatus=Unauthorized

EAP state=IDLE

failure for our vsm device

ctrl_interface=/var/run/wpa_supplicant

network={

ssid="xx-xx-xxx"

key_mgmt=WPA-EAP

eap=TLS

identity="Administrator"

password="yyyyyy"

ca_cert="/pstore/data/wifi/cert/server_root.cer"

client_cert="/pstore/data/wifi/cert/user_certificate_export_key.pem"

private_key="/pstore/data/wifi/cert/user_certificate_export_key.pem"

private_key_passwd="yyyyyy"

pairwise=CCMP TKIP

group=CCMP TKIP

proto=WPA2 WPA

priority=20

}

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.022 seconds, 7 queries executed - Memory usage: 1.55 MiB (Peak: 1.77 MiB) ]