PORTEUS - can't connect to WIFI network via wpa_supplicant

Post here if you are a new Porteus member and you're looking for some help.
glestwid
Samurai
Samurai
Posts: 182
Joined: 09 Jan 2018, 20:05
Distribution: Porteus-XFCE 5.0 i586

PORTEUS - can't connect to WIFI network via wpa_supplicant

Post#1 by glestwid » 27 Oct 2018, 16:32

Hi,

I am trying to connect to wifi network from cmd line but no luck. NetwokManager, however, seems to be able to connect. Here's my k.config file:
network={
ssid="Keenetic-7777"
#psk="xxxxxx6767"
psk=c2db4fad5d6233a7f28023ca375f83a2eb2bac1b40d4bc57c4e78bfc565c80f8
}
Here are my commands and the outputs:
root@porteus:/mnt/sdd# iwconfig
wlan0 IEEE 802.11bg ESSIDff/any
Mode:Managed Frequency:2.437 GHz Access Point: Not-Associated
Tx-Power=20 dBm
Retry short limit:7 RTS thrff Fragment thrff
Encryption keyff
Power Managementff

lo no wireless extensions.

eth0 no wireless extensions.

wlan1 IEEE 802.11bg ESSIDff/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry short limit:7 RTS thrff Fragment thrff
Encryption keyff
Power Managementff
root@porteus:/mnt/sdd# rfkill list
0: eeepc-wlan: Wireless LAN
Soft blocked: no
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
2: phy1: Wireless LAN
Soft blocked: no
Hard blocked: no

root@porteus:/mnt/sdd# wpa_supplicant -c /mnt/sdc/k.conf -i wlan0
Successfully initialized wpa_supplicant
wlan0: Trying to associate with 11:22:5d:86:93:66 (SSID='Keenetic-7777' freq=2437 MHz)
ioctl[SIOCSIWFREQ]: Device or resource busy
wlan0: Association request to the driver failed
wlan0: Associated with 00:00:00:00:00:00
wlan0: CTRL-EVENT-DISCONNECTED bssid=11:22:5d:86:93:66 reason=0
ioctl[SIOCSIWSCAN]: Device or resource busy
wlan0: Failed to initiate AP scan
ioctl[SIOCSIWSCAN]: Device or resource busy
wlan0: Failed to initiate AP scan
wlan0: Trying to associate with 11:22:5d:86:93:66 (SSID='Keenetic-7777' freq=2437 MHz)
ioctl[SIOCSIWFREQ]: Device or resource busy
wlan0: Association request to the driver failed
wlan0: Associated with 00:00:00:00:00:00
wlan0: CTRL-EVENT-DISCONNECTED bssid=11:22:5d:86:93:66 reason=0
wlan0: Trying to associate with 11:22:5d:86:93:66 (SSID='Keenetic-7777' freq=2437 MHz)
ioctl[SIOCSIWFREQ]: Device or resource busy
wlan0: Association request to the driver failed
wlan0: Associated with 00:00:00:00:00:00
wlan0: CTRL-EVENT-DISCONNECTED bssid=11:22:5d:86:93:66 reason=0
wlan0: Trying to associate with 11:22:5d:86:93:66 (SSID='Keenetic-7777' freq=2437 MHz)
ioctl[SIOCSIWFREQ]: Device or resource busy
wlan0: Association request to the driver failed
wlan0: Associated with 00:00:00:00:00:00
wlan0: CTRL-EVENT-DISCONNECTED bssid=11:22:5d:86:93:66 reason=0
dbus: wpas_dbus_bss_signal_prop_changed: Unknown Property value 7
wlan0: Trying to associate with 11:22:5d:86:93:66 (SSID='Keenetic-7777' freq=2437 MHz)
ioctl[SIOCSIWFREQ]: Device or resource busy
wlan0: Association request to the driver failed
wlan0: Associated with 00:00:00:00:00:00
wlan0: CTRL-EVENT-DISCONNECTED bssid=11:22:5d:86:93:66 reason=0
wlan0: Trying to associate with 11:22:5d:86:93:66 (SSID='Keenetic-7777' freq=2437 MHz)
ioctl[SIOCSIWFREQ]: Device or resource busy
wlan0: Association request to the driver failed
wlan0: Associated with 00:00:00:00:00:00
wlan0: CTRL-EVENT-DISCONNECTED bssid=11:22:5d:86:93:66 reason=0
wlan0: Trying to associate with 11:22:5d:86:93:66 (SSID='Keenetic-7777' freq=2437 MHz)
ioctl[SIOCSIWFREQ]: Device or resource busy
wlan0: Association request to the driver failed
wlan0: Associated with 00:00:00:00:00:00
wlan0: CTRL-EVENT-DISCONNECTED bssid=11:22:5d:86:93:66 reason=0
wlan0: Trying to associate with 11:22:5d:86:93:66 (SSID='Keenetic-7777' freq=2437 MHz)
ioctl[SIOCSIWFREQ]: Device or resource busy
wlan0: Association request to the driver failed
wlan0: Associated with 00:00:00:00:00:00
wlan0: CTRL-EVENT-DISCONNECTED bssid=11:22:5d:86:93:66 reason=0
As a result I have no connection established. What am I doing wrong?

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3925
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

PORTEUS - can't connect to WIFI network via wpa_supplicant

Post#2 by ncmprhnsbl » 28 Oct 2018, 08:00

hi, welcome to porteus :)
first, you really shouldn't post your network name(SSID) or psk in a public forum..
any particular reason for wanting to use wpa_supplicant directly?
i don't know much about it, but maybe the networkmanager daemon is running and is interfering?
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

glestwid
Samurai
Samurai
Posts: 182
Joined: 09 Jan 2018, 20:05
Distribution: Porteus-XFCE 5.0 i586

PORTEUS - can't connect to WIFI network via wpa_supplicant

Post#3 by glestwid » 28 Oct 2018, 19:08

Hi, I have already obfuscated the name, the pwd and the hash as well, don't wory :) Regarding the NetworkManager how I can assure that it is not running? I mean by cmd line

donald
Full of knowledge
Full of knowledge
Posts: 2065
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

PORTEUS - can't connect to WIFI network via wpa_supplicant

Post#4 by donald » 28 Oct 2018, 19:51

/etc/rc.d/rc.networkmanager [option]

"start|stop|status|restart"

glestwid
Samurai
Samurai
Posts: 182
Joined: 09 Jan 2018, 20:05
Distribution: Porteus-XFCE 5.0 i586

PORTEUS - can't connect to WIFI network via wpa_supplicant

Post#5 by glestwid » 28 Oct 2018, 21:32

Ok, issued
/etc/rc.d/rc.networkmanager stop
,

got NetworkManager stopped , then issued my previous cmd:
root@porteus:/mnt/sdd# wpa_supplicant -c /mnt/sdc/k.conf -i wlan0
Got this
Successfully initialized wpa_supplicant
wlan0: Trying to associate with 11:22:5d:86:93:66 (SSID='Keenetic-7777' freq=2437 MHz)
ioctl[SIOCSIWFREQ]: Device or resource busy
wlan0: Association request to the driver failed
wlan0: Associated with 11:22:5d:86:93:66
wlan0: WPA: Key negotiation completed with 11:22:5d:86:93:66 [PTK=CCMP, GTK=CCMP]
wlan0: CTRL-EVENT-CONNECTED - Connection to 11:22:5d:86:93:66 completed [id=0 idstr=]
Right after that ifconfig displayed address inet6 assigned to my wlan0. But when I tried to issue ping 8.8.8.8 I got "Network is unreachable". What else should I do? The wifi router has access to the Internet, that's for sure.

donald
Full of knowledge
Full of knowledge
Posts: 2065
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

PORTEUS - can't connect to WIFI network via wpa_supplicant

Post#6 by donald » 29 Oct 2018, 01:03

What else should I do?
Run
dhcpcd wlan0
after your cmd....maybe add -Dwext at the end of your cmd-line.

Or try the pns-tool cmd to establish a connection.

glestwid
Samurai
Samurai
Posts: 182
Joined: 09 Jan 2018, 20:05
Distribution: Porteus-XFCE 5.0 i586

PORTEUS - can't connect to WIFI network via wpa_supplicant

Post#7 by glestwid » 29 Oct 2018, 06:02

Thank you, both steps are working, and now I have an internet connection!

Post Reply