How to connect to Wi-Fi through wpa_supplicant, dhcpcd or nmcli?
Clash Royale CLAN TAG#URR8PPP
I use Funtoo Linux, clone of Gentoo with git instead of rsync and some bug-fixes (as I read).
I've installed LXDE desktop, NetworkManager but the applet does not connect when I type Wi-Fi password. So I need to connect in command line to continue installation and configuration.
Here it is the instruction: How to conect wi-fi network without using GUI?
It does not work, giving this:
# ifconfig wlan0
wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
...
# wpa_passphrase WIFI222 20172017 > /etc/wpa_supplicant.conf
# cat /etc/wpa_supplicant.conf
network=
ssid="WIFI222"
#psk="20172017"
psk=7.it975ot8o686f8fo86ff...
# wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dwext && dhclient wlan0
Successfully initialized wpa_supplicant
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
# wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf && dhclient wlan0
Successfully initialized wpa_supplicant
# ping -c 3 www.stackexchange.com
ping: unknown host www.stackexchange.com
I have dhcpcd in rc-update, wlan0 is up, interface is not blocked. But this turn is unsuccessful too:
# rc-update show
NetworkManager | default
binfmt | boot
bootmisc | boot
dbus | default
devfs | sysinit
dhcpcd | default
dmesg | sysinit
fsck | boot
hostname | boot
hwclock | boot
keymaps | boot
killprocs | shutdown
kmod-static-nodes | sysinit
local | default
localmount | boot
loopback | boot
modules | boot
mount-ro | shutdown
mtab | boot
netmount | default
procfs | boot
root | boot
savecache | shutdown
sshd | default
swap | boot
sysctl | boot
sysfs | sysinit
termencoding | boot
udev | sysinit
urandom | boot
xdm | default
localhost ~ # rfkill list all
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
1: asus-wlan: Wireless LAN
Soft blocked: no
Hard blocked: no
2: asus-bluetooth: Bluetooth
Soft blocked: no
Hard blocked: no
3: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
localhost ~ # cat wpa
wpa_supplicant -B -i wlan0 -c<(wpa_passphrase 'WIFI222' '20172017') && dhcpcd wlan0
localhost ~ # ./wpa
Successfully initialized wpa_supplicant
sending commands to master dhcpcd process
localhost ~ # rc
* WARNING: netmount will start when NetworkManager has started
localhost ~ # ./wpa
Successfully initialized wpa_supplicant
sending commands to master dhcpcd process
localhost ~ # ping -c 3 funtoo.org
ping: unknown host funtoo.org
Nmcli does not help:
# nmcli device wifi connect WIFI222 password 20172017
Error: Timeout 90 sec expired.
My other notebook funtoo+ xfce is connected to this network with nm-applet and I can see network has security WPA/WPA2. I just want to connect and install nm-applet on LXDE.
Please, what is not working ?
networking wifi nmcli funtoo
add a comment |
I use Funtoo Linux, clone of Gentoo with git instead of rsync and some bug-fixes (as I read).
I've installed LXDE desktop, NetworkManager but the applet does not connect when I type Wi-Fi password. So I need to connect in command line to continue installation and configuration.
Here it is the instruction: How to conect wi-fi network without using GUI?
It does not work, giving this:
# ifconfig wlan0
wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
...
# wpa_passphrase WIFI222 20172017 > /etc/wpa_supplicant.conf
# cat /etc/wpa_supplicant.conf
network=
ssid="WIFI222"
#psk="20172017"
psk=7.it975ot8o686f8fo86ff...
# wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dwext && dhclient wlan0
Successfully initialized wpa_supplicant
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
# wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf && dhclient wlan0
Successfully initialized wpa_supplicant
# ping -c 3 www.stackexchange.com
ping: unknown host www.stackexchange.com
I have dhcpcd in rc-update, wlan0 is up, interface is not blocked. But this turn is unsuccessful too:
# rc-update show
NetworkManager | default
binfmt | boot
bootmisc | boot
dbus | default
devfs | sysinit
dhcpcd | default
dmesg | sysinit
fsck | boot
hostname | boot
hwclock | boot
keymaps | boot
killprocs | shutdown
kmod-static-nodes | sysinit
local | default
localmount | boot
loopback | boot
modules | boot
mount-ro | shutdown
mtab | boot
netmount | default
procfs | boot
root | boot
savecache | shutdown
sshd | default
swap | boot
sysctl | boot
sysfs | sysinit
termencoding | boot
udev | sysinit
urandom | boot
xdm | default
localhost ~ # rfkill list all
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
1: asus-wlan: Wireless LAN
Soft blocked: no
Hard blocked: no
2: asus-bluetooth: Bluetooth
Soft blocked: no
Hard blocked: no
3: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
localhost ~ # cat wpa
wpa_supplicant -B -i wlan0 -c<(wpa_passphrase 'WIFI222' '20172017') && dhcpcd wlan0
localhost ~ # ./wpa
Successfully initialized wpa_supplicant
sending commands to master dhcpcd process
localhost ~ # rc
* WARNING: netmount will start when NetworkManager has started
localhost ~ # ./wpa
Successfully initialized wpa_supplicant
sending commands to master dhcpcd process
localhost ~ # ping -c 3 funtoo.org
ping: unknown host funtoo.org
Nmcli does not help:
# nmcli device wifi connect WIFI222 password 20172017
Error: Timeout 90 sec expired.
My other notebook funtoo+ xfce is connected to this network with nm-applet and I can see network has security WPA/WPA2. I just want to connect and install nm-applet on LXDE.
Please, what is not working ?
networking wifi nmcli funtoo
I don't know what wifi module do you have. Try this:wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dnl80211
– BlueManCZ
Sep 16 '17 at 10:57
add a comment |
I use Funtoo Linux, clone of Gentoo with git instead of rsync and some bug-fixes (as I read).
I've installed LXDE desktop, NetworkManager but the applet does not connect when I type Wi-Fi password. So I need to connect in command line to continue installation and configuration.
Here it is the instruction: How to conect wi-fi network without using GUI?
It does not work, giving this:
# ifconfig wlan0
wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
...
# wpa_passphrase WIFI222 20172017 > /etc/wpa_supplicant.conf
# cat /etc/wpa_supplicant.conf
network=
ssid="WIFI222"
#psk="20172017"
psk=7.it975ot8o686f8fo86ff...
# wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dwext && dhclient wlan0
Successfully initialized wpa_supplicant
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
# wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf && dhclient wlan0
Successfully initialized wpa_supplicant
# ping -c 3 www.stackexchange.com
ping: unknown host www.stackexchange.com
I have dhcpcd in rc-update, wlan0 is up, interface is not blocked. But this turn is unsuccessful too:
# rc-update show
NetworkManager | default
binfmt | boot
bootmisc | boot
dbus | default
devfs | sysinit
dhcpcd | default
dmesg | sysinit
fsck | boot
hostname | boot
hwclock | boot
keymaps | boot
killprocs | shutdown
kmod-static-nodes | sysinit
local | default
localmount | boot
loopback | boot
modules | boot
mount-ro | shutdown
mtab | boot
netmount | default
procfs | boot
root | boot
savecache | shutdown
sshd | default
swap | boot
sysctl | boot
sysfs | sysinit
termencoding | boot
udev | sysinit
urandom | boot
xdm | default
localhost ~ # rfkill list all
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
1: asus-wlan: Wireless LAN
Soft blocked: no
Hard blocked: no
2: asus-bluetooth: Bluetooth
Soft blocked: no
Hard blocked: no
3: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
localhost ~ # cat wpa
wpa_supplicant -B -i wlan0 -c<(wpa_passphrase 'WIFI222' '20172017') && dhcpcd wlan0
localhost ~ # ./wpa
Successfully initialized wpa_supplicant
sending commands to master dhcpcd process
localhost ~ # rc
* WARNING: netmount will start when NetworkManager has started
localhost ~ # ./wpa
Successfully initialized wpa_supplicant
sending commands to master dhcpcd process
localhost ~ # ping -c 3 funtoo.org
ping: unknown host funtoo.org
Nmcli does not help:
# nmcli device wifi connect WIFI222 password 20172017
Error: Timeout 90 sec expired.
My other notebook funtoo+ xfce is connected to this network with nm-applet and I can see network has security WPA/WPA2. I just want to connect and install nm-applet on LXDE.
Please, what is not working ?
networking wifi nmcli funtoo
I use Funtoo Linux, clone of Gentoo with git instead of rsync and some bug-fixes (as I read).
I've installed LXDE desktop, NetworkManager but the applet does not connect when I type Wi-Fi password. So I need to connect in command line to continue installation and configuration.
Here it is the instruction: How to conect wi-fi network without using GUI?
It does not work, giving this:
# ifconfig wlan0
wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
...
# wpa_passphrase WIFI222 20172017 > /etc/wpa_supplicant.conf
# cat /etc/wpa_supplicant.conf
network=
ssid="WIFI222"
#psk="20172017"
psk=7.it975ot8o686f8fo86ff...
# wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dwext && dhclient wlan0
Successfully initialized wpa_supplicant
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
# wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf && dhclient wlan0
Successfully initialized wpa_supplicant
# ping -c 3 www.stackexchange.com
ping: unknown host www.stackexchange.com
I have dhcpcd in rc-update, wlan0 is up, interface is not blocked. But this turn is unsuccessful too:
# rc-update show
NetworkManager | default
binfmt | boot
bootmisc | boot
dbus | default
devfs | sysinit
dhcpcd | default
dmesg | sysinit
fsck | boot
hostname | boot
hwclock | boot
keymaps | boot
killprocs | shutdown
kmod-static-nodes | sysinit
local | default
localmount | boot
loopback | boot
modules | boot
mount-ro | shutdown
mtab | boot
netmount | default
procfs | boot
root | boot
savecache | shutdown
sshd | default
swap | boot
sysctl | boot
sysfs | sysinit
termencoding | boot
udev | sysinit
urandom | boot
xdm | default
localhost ~ # rfkill list all
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
1: asus-wlan: Wireless LAN
Soft blocked: no
Hard blocked: no
2: asus-bluetooth: Bluetooth
Soft blocked: no
Hard blocked: no
3: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
localhost ~ # cat wpa
wpa_supplicant -B -i wlan0 -c<(wpa_passphrase 'WIFI222' '20172017') && dhcpcd wlan0
localhost ~ # ./wpa
Successfully initialized wpa_supplicant
sending commands to master dhcpcd process
localhost ~ # rc
* WARNING: netmount will start when NetworkManager has started
localhost ~ # ./wpa
Successfully initialized wpa_supplicant
sending commands to master dhcpcd process
localhost ~ # ping -c 3 funtoo.org
ping: unknown host funtoo.org
Nmcli does not help:
# nmcli device wifi connect WIFI222 password 20172017
Error: Timeout 90 sec expired.
My other notebook funtoo+ xfce is connected to this network with nm-applet and I can see network has security WPA/WPA2. I just want to connect and install nm-applet on LXDE.
Please, what is not working ?
networking wifi nmcli funtoo
networking wifi nmcli funtoo
edited Sep 16 '17 at 9:03
znavko
asked Sep 16 '17 at 8:56
znavkoznavko
316
316
I don't know what wifi module do you have. Try this:wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dnl80211
– BlueManCZ
Sep 16 '17 at 10:57
add a comment |
I don't know what wifi module do you have. Try this:wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dnl80211
– BlueManCZ
Sep 16 '17 at 10:57
I don't know what wifi module do you have. Try this:
wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dnl80211
– BlueManCZ
Sep 16 '17 at 10:57
I don't know what wifi module do you have. Try this:
wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dnl80211
– BlueManCZ
Sep 16 '17 at 10:57
add a comment |
1 Answer
1
active
oldest
votes
I don't know exactly what goes wrong in your setup, but at least do the testing in steps. Trying to do everything at once doesn't help in figuring out where the problem is.
So.
1) Test that Wifi is working and you can see WIFI222
:
# iw wlan0 scan
2) Add control interface to /etc/wpa_supplicant.conf
:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network=
ssid="WIFI222"
psk="your_wlan_key"
Adapt the path and group to your system, I don't know what Funtoo uses.
3) Start wpa_supplicant in an extra terminal window in foreground, so you can see messages, and uses the nl80211
driver (nearly all modern adapters use this, you didn't say what adapter you have ...).
wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -Dnl80211,wext
4) Use wpa_cli
to see what's going on:
# wpa_cli list_networks
should show the networks from the config file,
# wpa_cli status
shows the current status, and
# wpa_cli help | less
shows you other commands.
If you see wpa_state=COMPLETED
, then you can run dhclient
and try to ping
.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f392590%2fhow-to-connect-to-wi-fi-through-wpa-supplicant-dhcpcd-or-nmcli%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I don't know exactly what goes wrong in your setup, but at least do the testing in steps. Trying to do everything at once doesn't help in figuring out where the problem is.
So.
1) Test that Wifi is working and you can see WIFI222
:
# iw wlan0 scan
2) Add control interface to /etc/wpa_supplicant.conf
:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network=
ssid="WIFI222"
psk="your_wlan_key"
Adapt the path and group to your system, I don't know what Funtoo uses.
3) Start wpa_supplicant in an extra terminal window in foreground, so you can see messages, and uses the nl80211
driver (nearly all modern adapters use this, you didn't say what adapter you have ...).
wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -Dnl80211,wext
4) Use wpa_cli
to see what's going on:
# wpa_cli list_networks
should show the networks from the config file,
# wpa_cli status
shows the current status, and
# wpa_cli help | less
shows you other commands.
If you see wpa_state=COMPLETED
, then you can run dhclient
and try to ping
.
add a comment |
I don't know exactly what goes wrong in your setup, but at least do the testing in steps. Trying to do everything at once doesn't help in figuring out where the problem is.
So.
1) Test that Wifi is working and you can see WIFI222
:
# iw wlan0 scan
2) Add control interface to /etc/wpa_supplicant.conf
:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network=
ssid="WIFI222"
psk="your_wlan_key"
Adapt the path and group to your system, I don't know what Funtoo uses.
3) Start wpa_supplicant in an extra terminal window in foreground, so you can see messages, and uses the nl80211
driver (nearly all modern adapters use this, you didn't say what adapter you have ...).
wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -Dnl80211,wext
4) Use wpa_cli
to see what's going on:
# wpa_cli list_networks
should show the networks from the config file,
# wpa_cli status
shows the current status, and
# wpa_cli help | less
shows you other commands.
If you see wpa_state=COMPLETED
, then you can run dhclient
and try to ping
.
add a comment |
I don't know exactly what goes wrong in your setup, but at least do the testing in steps. Trying to do everything at once doesn't help in figuring out where the problem is.
So.
1) Test that Wifi is working and you can see WIFI222
:
# iw wlan0 scan
2) Add control interface to /etc/wpa_supplicant.conf
:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network=
ssid="WIFI222"
psk="your_wlan_key"
Adapt the path and group to your system, I don't know what Funtoo uses.
3) Start wpa_supplicant in an extra terminal window in foreground, so you can see messages, and uses the nl80211
driver (nearly all modern adapters use this, you didn't say what adapter you have ...).
wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -Dnl80211,wext
4) Use wpa_cli
to see what's going on:
# wpa_cli list_networks
should show the networks from the config file,
# wpa_cli status
shows the current status, and
# wpa_cli help | less
shows you other commands.
If you see wpa_state=COMPLETED
, then you can run dhclient
and try to ping
.
I don't know exactly what goes wrong in your setup, but at least do the testing in steps. Trying to do everything at once doesn't help in figuring out where the problem is.
So.
1) Test that Wifi is working and you can see WIFI222
:
# iw wlan0 scan
2) Add control interface to /etc/wpa_supplicant.conf
:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network=
ssid="WIFI222"
psk="your_wlan_key"
Adapt the path and group to your system, I don't know what Funtoo uses.
3) Start wpa_supplicant in an extra terminal window in foreground, so you can see messages, and uses the nl80211
driver (nearly all modern adapters use this, you didn't say what adapter you have ...).
wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -Dnl80211,wext
4) Use wpa_cli
to see what's going on:
# wpa_cli list_networks
should show the networks from the config file,
# wpa_cli status
shows the current status, and
# wpa_cli help | less
shows you other commands.
If you see wpa_state=COMPLETED
, then you can run dhclient
and try to ping
.
answered Sep 17 '17 at 13:26
dirktdirkt
17k31337
17k31337
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f392590%2fhow-to-connect-to-wi-fi-through-wpa-supplicant-dhcpcd-or-nmcli%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I don't know what wifi module do you have. Try this:
wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dnl80211
– BlueManCZ
Sep 16 '17 at 10:57