You are not logged in.
I'm trying to connect to the WiFi, but my system doesn't seem to want to. I'm following this page, which points me here. I enter
wpa_supplicant -B -i wlp2s0 -c<(wpa_passphrase "mywifi" "mypassword")
and I get the output
Successfully initialized wpa_supplicant
nl80211: deinit ifname=wlp2s0 disabled_11b_rates=0
wlp2s0: Failed to initialize driver interface
The interface is up:
$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eno1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_code1 state UNKNOWN mode DEFAULT group default qlen 1000
link/ether 9c:5c:8e:95:c2:05 brd ff:ff:ff:ff:ff:ff
3: enp7s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_code1 state UNKNOWN mode DEFAULT group default qlen 1000
link/ether 68:05:ca:36:a9:21 brd ff:ff:ff:ff:ff:ff
4: wlp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/ether 68:1c:a2:14:13:c2 brd ff:ff:ff:ff:ff:ff
but not connected:
$ iw dev wlp2s0 link
Not connected.
dhcpcd doesn't report any problems:
$ sudo dhcpcd wlp2s0
sending commands to master dhcpcd process
But I can't ping anything and Firefox doesn't load websites.
$ ping 8.8.8.8
connect: Network is unreachable
systemctl says that dhcpcd is active, but the interfaces 'loses' the carrier..?
$ systemctl status dhcpcd
...
...: wlp2s0: waiting for carrier
...: wlp2s0: carrier acquired
...: wlp2s0: DUID 00:01:00:01:21:86:a5:4c:68:1c:a2:14:13:c2
...: wlp2s0: IAID a2:14:13:c2
...: wlp2s0: adding address fe80::d03f:2e22:b3a9:9e0
...: wlp2s0: carrier lost
...: wlp2s0: deleting address fe80::d03f:2e22:b3a9:9e0
...
and my card is using the ath9k driver:
$ dmesg | grep ath9k
... ath9k 0000:02:00.0: enabling device (0000 -> 0002)
... ath9k 0000:02:00.0: wlp2s0: renamed from wlan0
but I don't get any results for ath9k when I only grep for firmware.
Anyone know how I can connect to the internet?
Offline
4: wlp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/ether 68:1c:a2:14:13:c2 brd ff:ff:ff:ff:ff:ff
The interface is not UP, is in UNKOWN state.
Have you brought it UP?
sudo ip link set dev wlp2s0 up
Which Wireless Adapter is it?
lspci -k
Also, before running wpa_supplicant, you need to generate the wpa_passphrase like this:
wpa_passphrase myssid mypassword
have you done that?
EDIT: I should have RTFM, leave aside both my interface status and wpa_passphrase suggestions: they're misleading, sorry for that.
I'll try to suggest something better:
try connecting specifing the wext driver
wpa_supplicant -B -D wext -i wlp2s0 -c<(wpa_passphrase "mywifi" "mypassword")
check whether you're actually using IPV6, because your gateway is only providing you an IPV6 link-local address (which then gets lost due to losing the carrier). If the driver trick above doesn't help, you may consider disabling ipv6 and give it a try;
anyway, post lspci -k as I suggested above
Last edited by lo1 (2017-12-13 23:35:46)
Offline
According to the wiki, the state is not what defines whether the interface is up or down. The interface returns
<NO-CARRIER,BROADCAST,MULTICAST,UP>
emphasis on UP. That's also the only thing that changes with
$ ip link set wlp2s0 up
or
$ ip link set wlp2s0 down
(edit: same goes for ip link set dev wlp2s0 up/down. The inclusion of dev does nothing to the output.)
I already generated the wpa_passphrase, and it's listed as Qualcomm Atheros AR93xx. The kernel driver in use is ath9k.
Last edited by Kekker_ (2017-12-13 23:36:43)
Offline
Sorry for that, I edited my post just too late.
Offline
Alright just saw your edit. wpa_supplicant with -D wext gives a whole bunch of "Operation not permitted".
$ wpa_supplicant -B -D wext -i wlp2s0 -c<(wpa_passphrase "mywifi" "password")
Successfully initialized wpa_supplicant
ioctl[SIOCSIWPMKSA]: Operation not permitted
...
more ioctl operations not permitted
...
12_packet_init: socket(PF_PACKET): Operation not permitted
...
more ioctl operations not permitted
...
Could not set interface wlp2s0 flags (DOWN): Operation not permitted
lspci -k:
$ lspci -k
...
02:00.0 Network controller: Qualcomm Atheros AR93xx Wireless Network Adapter (rev 01)
Subsystem: Qualcomm Atheros AR93xx Wireless Network Adapter
Kernel driver in use: ath9k
Kernel modules: ath9k
Last edited by Kekker_ (2017-12-13 23:44:25)
Offline
wpa_supplicant with -D wext gives a whole bunch of "Operation not permitted"
That's because you need to run it as root (not just prepending "sudo").
P.S. Were you running it as root from the beginning?
Offline
As far as I know, you have to run wpa_supplicant as root, are you doing that?
Edit: @lo1, sudo should work I think, but if it doesn't try a root shell (e.g. su)
Last edited by progandy (2017-12-13 23:52:37)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Oh shoot. I misread the wiki. I read that as don't read as "don't use root".
Still doesn't work though.
$ su
Password:
$ wpa_supplicant -B -D wext -i wlp2s0 -c<(wpa_passphrase "mywifi" "password")
Successfully initialized wpa_supplicant
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
Offline
Mmh, try it like this (without a space between "D" and "wext")
wpa_supplicant -B -Dwext -i wlp2s0 -c<(wpa_passphrase "mywifi" "password")
EDIT: probably that won't do anyway, but you could also try the nl80211
wpa_supplicant -B -D nl80211 -i wlp2s0 -c<(wpa_passphrase "mywifi" "password")
and if this does not work, just set up a manual connection (set up the interface and manually add an ip address, your gateway and an ip route) and let's start over from there.
Last edited by lo1 (2017-12-14 01:02:28)
Offline
wpa_supplicant -B -D nl80211 -i wlp2s0 -c<(wpa_passphrase "mywifi" "password")
didn't give me the errors, but ping still can't connect to the network.
What do you mean by manual connection?
edit: Oh I think you meant this. Never tried that before. I'll get that set up in a few minutes.
Last edited by Kekker_ (2017-12-14 01:27:21)
Offline
Well, ping works now, but with 100% packet loss. My IP addresses are 10.0.0.x instead of the usual 192.168.x.x, so I did:
$ sudo ip addr add 10.0.0.5/24 broadcast 10.0.0.255 dev wlp2s0
$ sudo ip route add default via 10.0.0.1
$ ping -c 3 8.8.8.8
PING 8.8.8.8 (8.8.8.8_ 56(84) bytes of data.
From 10.0.0.5 icmp_seq=1 Destination Host Unreachable
...
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2020ms
pipe 3
Offline
Please undo the statip IP attempt and run "sudo dhcpcd -d", post the output.
Offline
Well, ping works now, but with 100% packet loss.
It couldn't work because you needed to start wpa_supplicant anyway (or iw if connecting without encryption) to establish a "layer 2" connection to your gateway, and then manually set up your ip address and the default route (without dhcp, ensuring the subnet is correct and the ip address is not being used by any other machine in your network).
Even if wpa_supplicant complains something about the "driver interface", I'm starting to think that most likely your router is refusing the connection for some reason (as I noticed before, the interface goes up and gets a ipv6 link-local address when dhcpcd starts, but flushes it immediately: being kicked out from the network?).
Probably I'm wrong, so before going much deeper into this, post the dhcpcd output that seth asked you.
Please undo the statip IP attempt and run "sudo dhcpcd -d", post the output.
Last edited by lo1 (2017-12-14 14:44:24)
Offline
Please undo the statip IP attempt and run "sudo dhcpcd -d", post the output.
$ sudo dhcpcd -d
sending commands to master dhcpcd process
send OK
Ping still doesn't work. I am dual booting with Windows, and the WiFi works fine there. Could using the same wireless adapter on both OSes cause conflict?
edit:
I did
sudo ip addr flush dev wlp2s0
sudo ip route flush dev wlp2s0
before runnning dhcpcd -d.
Last edited by Kekker_ (2017-12-14 17:25:27)
Offline
Could using the same wireless adapter on both OSes cause conflict?
I doubt that, I'm doing it since I installed Arch.
Assuming other devices can connect normally to your router, could you try to e.g. connect your PC to your smartphone via hotspot? If it works, consider investigating your router instead...
Offline
seth wrote:Please undo the statip IP attempt and run "sudo dhcpcd -d", post the output.
$ sudo dhcpcd -d sending commands to master dhcpcd process send OK
That looks like dhcpcd was already running. You should stop it first
dhcpcd -k
systemctl stop dhcpcd
killall dhcpcd
Then remove /var/lib/dhcpcd/*.lease to be sure to request a fresh ip.
Last edited by progandy (2017-12-14 17:54:31)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Then remove /var/lib/dhcpcd/*.lease to be sure to request a fresh ip.
I removed /var/lib/dhcpcd/*, what am I supposed to do after that? I don't understand what you mean there.
Offline
Assuming other devices can connect normally to your router, could you try to e.g. connect your PC to your smartphone via hotspot?
I don't have hotspot capabilities on my phone. I have a static IP address (10.0.0.5) reserved for my wireless adapter, which as I said earlier works fine with Windows. I'm not sure what else there is to do with the router.
Offline
progandy wrote:Then remove /var/lib/dhcpcd/*.lease to be sure to request a fresh ip.
I removed /var/lib/dhcpcd/*, what am I supposed to do after that? I don't understand what you mean there.
dhcpcd stores the IP you got from dhcpcd in a file in /var/lib/dhcpcd/, when you remove it, then you get a complete dhcp negotiation on the next start of dhcp.
I think this was unnecessary for you, I might have accidentally mixed it with another thread, but this did not harm anything (the directory /var/lib/dhcpcd should still exist and be empty)
After dhcp is stopped completely, you can run it again and should get better output than "sending commands to master"
$ sudo dhcpcd -d
Edit: Your steps should be something like this:
* stop any running dhcpcd and wpa_supplicant
* bring your network interface UP
* start wpa_supplicant with your options.
* start dhcpcd -d (or do manual setup with static IP)
Last edited by progandy (2017-12-14 19:15:30)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
I stopped wpa_supplicant and dhcpcd, then started wpa_supplicant the way I've been doing it.
$ sudo dhcpcd -d
dhcpcd-6.11.5 starting
dev: loaded udev
...
wlp2s0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
wlp2s0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' NOCARRIER
no interfaces have a carrier
forking to background
forked to background, child pid 14115
I'm not exactly sure what "NOCARRIER" means or why I don't have one, but that seems to be what dhcpcd is complaining about.
Offline
I'm not exactly sure what "NOCARRIER" means or why I don't have one, but that seems to be what dhcpcd is complaining about.
man dhcpcd-run-hooks
[...]
NOCARRIER dhcpcd lost the carrier. The cable may have been unplugged or
association to the wireless point lost.
[...]
Now I'm pretty sure: the router is refusing the connection (or we're overseeing something like a mistyped SSID/password).
After checking once again for any possible configuration mistakes (e.g. are your /etc/hostname and /etc/hosts right?) check if in Windows you get an Ipv6 address (cmd: ipconfig /all) when connecting to the router: if you don't, disable ipv6 by adding the kernel parameter. https://wiki.archlinux.org/index.php/IP … ctionality
Next: have a look here and see if it there's some other options in the router that need fixing.
Offline
(or we're overseeing something like a mistyped SSID/password).
Do you have some special characters in your password? Try to limit yourself to printable characters from the basic ASCII table (e.g. letters, numbers and a few special characters)
https://en.wikipedia.org/wiki/ASCII#Pri … characters
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
I got my hosts file from StevenBlack's github, which works fine over a wired connection back at my school, and my /etc/hostname is simply "home". The "Wireless LAN adapter Wi-Fi:" has an entry for an IPv6 address in Windows while I'm connected to the router.
The router isn't old, I don't see any options for mixed-mode auth, I don't think WPS is on by default (but I don't see a setting to toggle it), and I don't see any of the other settings the wiki page mentions. It's one of those crappy Comcast Xfinity routers, and it's not strictly mine so I don't want to mess with it too much.
The only special character in the password is an underscore, and I've never had problems inputting the password on any other device before, including this computer. I've used this network before (over this past summer, in fact) and everything worked fine.
Offline
Don't fork ("-B") but debug ("-dd") wpa_supplicant and post the output.
"-D nl80211" should btw. not be required, nl80211 is the default.
Offline
Kekker_ wrote:wpa_supplicant -B -D wext -i wlp2s0 -c<(wpa_passphrase "mywifi" "mypassword")
This solved the error with my RTL8188 USB WiFi adapter.
And changed the /usr/lib/systemd/system/wpa_supplicant@.service accordingly.
ExecStart=/usr/bin/wpa_supplicant -Dwext -c/etc/wpa_supplicant/wpa_supplicant-%I.conf -i%I
Thank you all..
Offline