You are not logged in.

#1 2016-10-18 10:22:05

Hackedia
Member
Registered: 2016-05-12
Posts: 69

[SOLVED] Can't set up my wifi interface.

Hi everyone,

Im experiencing some issues with my wifi interface,
Im following the official wiki guide, but i found nothing who could help correcting this,
Neither on the internet nor in the wiki,

Maybe someone has already had this problem before and could help me in any way ? ^^

Here are some output who could help,

wpa_supplicant -B -i wlp4s0 -c <(wpa_passphrase '****' '****') :

Successfully initialized wpa_supplicant
Could not read interface p2p-dev-wlp4s0 flags: No such device
nl80211: Could not set interface 'p2p-dev-wlp4s0' UP
nl80211: deinit ifname=p2p-dev-wlp4s0 disabled_11b_rates=0
p2p-dev-wlp4s0: Failed to initialize driver interface
P2P: Failed to enable P2P Device interface

dmesg :

[    3.981821] iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-7260-17.ucode failed with error -2
[    3.987562] iwlwifi 0000:04:00.0: loaded firmware version 16.242414.0 op_mode iwlmvm
[    4.014965] iwlwifi 0000:04:00.0: Detected Intel(R) Wireless N 7260, REV=0x144
[    4.015056] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[    4.015322] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[    4.286937] iwlwifi 0000:04:00.0 wlp4s0: renamed from wlan0
[    4.400706] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[    4.400998] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[    4.589732] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[    4.590004] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[ 9201.586949] iwlwifi 0000:04:00.0: RF_KILL bit toggled to enable radio.
[ 9201.588234] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[ 9201.588486] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[ 9201.775782] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[ 9201.776038] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[ 9733.801646] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[ 9733.801923] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[ 9734.101871] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[ 9734.102129] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled

I dont really know how to troubleshot on linux, is dmesg the log file where i can find the source of all my problems ?
Im probably searching the bad way with it.

Thanks for reading me,
Have a nice day !

Last edited by Hackedia (2016-10-19 19:22:48)

Offline

#2 2016-10-18 10:43:40

Starfish
Member
From: Germany
Registered: 2015-10-21
Posts: 134

Re: [SOLVED] Can't set up my wifi interface.

Hackedia wrote:

is dmesg the log file where i can find the source of all my problems ?

it's not a log file, it's a program that basically dumps /proc/kmsg.

cat /proc/kmsg

has the same effect. It is also not the source of all problems, but only of those relating the kernel, for example everything concerning hardware and drivers. For application errors

journalctl -xe

is quite useful.

But back to your problem:
What's the output of

ip link

(you might want to leave out the MAC addresses for privacy reasons...)
?

Last edited by Starfish (2016-10-18 10:47:52)


"Yesterday is history, tomorrow is a mystery, but today is a gift. That is why it is called the present." - Master Oogway

Offline

#3 2016-10-18 12:34:39

pediocore
Member
From: Malaysia
Registered: 2014-06-12
Posts: 9

Re: [SOLVED] Can't set up my wifi interface.

I am sorry, are you running with sudo? Which you cannot.
You need to perform the command in root shell


"Software is like sex; it's better when it's free.", Linus

Offline

#4 2016-10-18 12:35:06

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [SOLVED] Can't set up my wifi interface.

You haven't shown us any signs of anything going wrong.  What leads you to the conclusion that your interface is not up?   `ip link` or `ip a` output would be useful.

First, note that piping the output of wpa_passphrase to wpa_supplicant the way you are doing frequently fails.  I don't know why this is in the wiki, I believe it's been edited out and put back in many times.  You are not - however - getting the error that this commonly leads to, but still it'd be a safer test to generate a config file with wpa_passprhase then pass that to wpa_supplicant.

Second, if you only think the interface is not up because you can't ping or connect via web browsers, then that is not to be expected yet.  You also need to run dhcpcd or dhclient after wpa_supplicant (or *maybe* set up a static IP, I have no experience with this option.)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2016-10-19 12:38:00

Hackedia
Member
Registered: 2016-05-12
Posts: 69

Re: [SOLVED] Can't set up my wifi interface.

Hi,

Thanks for your support !
Indeed, i forgot to link the output of iplink, sorry ^^

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp5s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 80:fa:5b:13:55:a5 brd ff:ff:ff:ff:ff:ff
3: wlp4s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
    link/ether d8:fc:93:08:93:32 brd ff:ff:ff:ff:ff:ff

In fact, i write the wpa file, i put this output to show the error,
I configured a dhcp, a dns, and all the stuff is informed in the wiki,
My ethernet interface is going well, it just about my wifi interface who weirdly dont want to be set up at all.
Im wondering if its not a problem about the drivers !
Afterall in the wiki the first step is about setting up the interface, and i couldnt from the beginning !

Thanks starfish for this explanation !

Thanks for your answer !
Im from france, sorry for the gap !

Last edited by Hackedia (2016-10-19 12:43:51)

Offline

#6 2016-10-19 12:41:57

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [SOLVED] Can't set up my wifi interface.

Your wireless interface looks to be up.  That output shows what is to be expected when wpa_supplicant works.  What is the output from the following:

dhcpcd wlp4s0

(edit: I suppose the same output could also come from a failed wpa_supplicant attempt - this is why I asked the other questions in my previous post.)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2016-10-19 12:46:57

Hackedia
Member
Registered: 2016-05-12
Posts: 69

Re: [SOLVED] Can't set up my wifi interface.

"sending commands to master dhcpcd process"

But yet wlp4s0 is down, it might be a driver problem ?

Offline

#8 2016-10-19 13:00:17

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [SOLVED] Can't set up my wifi interface.

Hackedia wrote:

sending commands to master dhcpcd process

So dhcpcd was already running.  First, stop *all* other networking services, then start again with wpa_supplicant.  Multiple networking services running at the same time is a common problem.

Hackedia wrote:

But yet wlp4s0 is down, it might be a driver problem ?

What?  It *might* be a driver problem, or there are a dozen other things that it's far more likely to be.  So far we have not seen evidence of anything out of the ordinary.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#9 2016-10-19 13:05:34

Starfish
Member
From: Germany
Registered: 2015-10-21
Posts: 134

Re: [SOLVED] Can't set up my wifi interface.

I got something:

Hackedia wrote:
nl80211: Could not set interface 'p2p-dev-wlp4s0' UP

It is possible that wpa_supplicant wants to set the interface up but can't, since it already is, and then exits with an error.
Try to set it down

ip link set wlp4s0 down

and *then* run wpa_supplicant.

I had this problem with netctl: https://wiki.archlinux.org/index.php/ne … ice_failed


"Yesterday is history, tomorrow is a mystery, but today is a gift. That is why it is called the present." - Master Oogway

Offline

#10 2016-10-19 13:10:47

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [SOLVED] Can't set up my wifi interface.

The p2p errors are normal and are not relevant to establishing an internet connection (p2p is for setting up a software access point).

Can we stop taking random stabs in the dark and actually get the diagnostic information needed to take intelligent steps?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#11 2016-10-19 13:19:47

Hackedia
Member
Registered: 2016-05-12
Posts: 69

Re: [SOLVED] Can't set up my wifi interface.

Here are my services up :

autovt@.service                            enabled 
dbus-org.freedesktop.network1.service      enabled 
dbus-org.freedesktop.resolve1.service      enabled 
dhcpcd.service                             enabled 
display-manager.service                    enabled 
gdm.service                                enabled 
getty@.service                             enabled 
systemd-networkd.service                   enabled 
systemd-resolved.service                   enabled 
wpa_supplicant@.service                    enabled 

I had this problem before, i had systemd-networkd and network manager running together,
I stoped network manager to avoid this, it worked a time.. ^^

So i'll stop networkd and see if its working

Last edited by Hackedia (2016-10-19 13:22:01)

Offline

#12 2016-10-19 13:26:13

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [SOLVED] Can't set up my wifi interface.

You have 6 different networking services in there.  There's a fair chance that several of them may be intended to work together (I'd not be surprised if the dbus-* and systemd-* ones worked together) but wpa_supplicant@.service is a problem.  If that is running, you'll likely have problems running wpa_supplicant manually.

So again, stop *all* of those network related services and start wpa_supplicant again with 1 step for wpa_passphrase and a separate step to start wpa_supplicant using the generated config.  Then run dhcpcd on the wireless interface.

Certainly this will not be the way you will always need to connect wirelessly, but when you are trying to identify a problem, eliminate as many variables as possible.  All those other networking services and the piping of wpa_passphrase to wpa_supplicant are all variables that might on their own prevent a successful connection.

So go back to the most basic approach.  Once that works, you can start adding complexity back (if needed).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#13 2016-10-19 14:10:40

Hackedia
Member
Registered: 2016-05-12
Posts: 69

Re: [SOLVED] Can't set up my wifi interface.

Ok, thanks !
I disable both systemd and dbus but, wich are the 2 other services potentially conficting with wpa ?

Last edited by Hackedia (2016-10-19 14:16:02)

Offline

#14 2016-10-19 14:36:20

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [SOLVED] Can't set up my wifi interface.

dbus-org.freedesktop.network1.service      enabled 
dbus-org.freedesktop.resolve1.service      enabled 
dhcpcd.service                             enabled 
systemd-networkd.service                   enabled 
systemd-resolved.service                   enabled 
wpa_supplicant@.service                    enabled 

These are all networking services.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#15 2016-10-19 15:26:39

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: [SOLVED] Can't set up my wifi interface.

As a quick sanity check, what happens with sudo iw wlp4s0 scan

Do we see a site survey that includes the AP to which you are trying to associate?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#16 2016-10-19 18:28:33

Hackedia
Member
Registered: 2016-05-12
Posts: 69

Re: [SOLVED] Can't set up my wifi interface.

Hi,


"Do we see a site survey that includes the AP to which you are trying to associate?"
Yes, i can find him in the list !

"stop *all* of those network related services and start wpa_supplicant again with 1 step for wpa_passphrase and a separate step to start wpa_supplicant using the generated config"
So i stop all of thoses 6 services, then i started up wpa_supplicant.service and use "wpa_supplicant -B -i wlp4s0 -c <(wpa_passphrase '****' '****')",
i tryed also "wpa_supplicant -B -i /etc/wpa_supplicant/wpa_supplicant-wlp4s0.conf", but both didnt work !

I think i did all what you told me to do (or maybe i didnt understand well), but it still didnt work, maybe there is some other problems around.

Any way, a great thanks for your patience Trilby !
Have a good night !

Last edited by Hackedia (2016-10-19 18:30:12)

Offline

#17 2016-10-19 18:46:45

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [SOLVED] Can't set up my wifi interface.

What does "didn't work" mean?  Also if you ran those commands in sequence, you now have multiiple wpa_supplicant processes running in the background.  The first might fail due to trying to pipe the wpa_passphrase output: stop doing that - it is known to not work reliably.  The second one would fail because wpa_supplicant was already running - and also because of the typo of leaving out the interface name unless that was just here on the forums.

Try this:

sudo killall wpa_supplicant dhcpcd
sudo wpa_supplicant -B -i wlp4s0 -c /etc/wpa_supplicant/wpa_supplicant-wlp4s0.conf
sudo dhcpcd wlp4s0
ping google.com

Post any output from each of these commands.

(I'm assuming /etc/wpa_supplicant/wpa_supplicant-wlp4s0.conf is a file you've just created with wpa_passphrase - is this correct?)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#18 2016-10-19 19:21:24

Hackedia
Member
Registered: 2016-05-12
Posts: 69

Re: [SOLVED] Can't set up my wifi interface.

I kill all thoses processus, and im happy to say : its working !
My interface is finally up, and now i can ping google !
Thanks for all !

I'll do a little script to automate all this stuff,
And put this post as solved,

I understand better how it work now,
A great thanks to you Trilby ! wink
Good continuation !

Last edited by Hackedia (2016-10-19 19:25:00)

Offline

#19 2016-10-19 19:24:52

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [SOLVED] Can't set up my wifi interface.

Your welcome.  There are better ways of automating this though that trying to script it yourself.

If you are happy with wpa_supplicant and dhcpcd, then just enable the wpa_supplicant hook for dhcpcd, move your wpa_supplicant-wlp4s0.conf settings into the main wpa_supplicant.conf file (you can overwrite it completely if you want), then just enable dhcpcd@wlp4s0.service.  Systemd will then run wpa_supplicant and dhcpcd at boot every time you boot up.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#20 2016-10-19 19:28:01

Hackedia
Member
Registered: 2016-05-12
Posts: 69

Re: [SOLVED] Can't set up my wifi interface.

Done, thanks !

Offline

Board footer

Powered by FluxBB