You are not logged in.

#1 2018-09-11 03:28:55

rivendellx
Member
Registered: 2018-09-11
Posts: 11

Wifi Connection Issue

Hi all

I am new to Arch Linux. I have been experiencing wifi connection problem since installation.

The problem is that during the installation, I attempted to connect my wifi using wifi-menu, which successfully established the connection. However, I couldn't ping my local gateway 192.168.1.1 and any other website or IPs.

I have explored for two days, tried all possible ways following arch wiki, but it just refuses to work.
Magically, I was able to connect to the hotspot established by my other laptop that was using the same wifi router, and hence successfully completed the installation.

After installation, I still could not connect to my wifi router directly, only indirectly through my other laptop, although the direct connection is shown as successful (interface up, profile active).

Does anyone have any ideas about what is going on here?

Much appreciate your help


Linuxer Wannabe

Offline

#2 2018-09-11 03:33:04

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Wifi Connection Issue

You'll need to provide a lot more information. Details about your card, driver, what exactly you have configured and emabled, journal entries/logs, etc.


Moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-09-11 03:50:14

rivendellx
Member
Registered: 2018-09-11
Posts: 11

Re: Wifi Connection Issue

jasonwryan wrote:

You'll need to provide a lot more information. Details about your card, driver, what exactly you have configured and emabled, journal entries/logs, etc.


Moving to NC...

Thanks for your reply.

my wifi card is Qualcomm Atheros AR928X Wireless Network Adapter
Kernel driver in use: ath9k
kernel modules: ath9k  (There was a ",wl" after ath9k module in the installation iso, but no longer here after I installed system)

I used to wifi-menu to establish the connection which didn't work, and still don't work.

BTW, I am using a Acer 4745G (Year 2010) laptop.

The thing is using wifi-menu can establish a usable connection with my other laptop hotspot, but cannot ping anything if connect to my router straight away.
Do you think a manual connection process would fix the problem? the wifi security setting is WPA-PSK


Linuxer Wannabe

Offline

#4 2018-09-11 03:52:40

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: Wifi Connection Issue

A manual connection will at least provide errors, if there are any.  Try connecting manually and post any steps that lead to an error.

Offline

#5 2018-09-11 04:24:23

rivendellx
Member
Registered: 2018-09-11
Posts: 11

Re: Wifi Connection Issue

circleface wrote:

A manual connection will at least provide errors, if there are any.  Try connecting manually and post any steps that lead to an error.

This is what I got using netctl

https://drive.google.com/file/d/1_HLlRS … sp=sharing


Linuxer Wannabe

Offline

#6 2018-09-11 05:20:19

rivendellx
Member
Registered: 2018-09-11
Posts: 11

Re: Wifi Connection Issue

After trying with NetworkManager, I am able to connect with my wifi.

I don't know why and how does it work through, so any ideas and comments are still more than welcome.


Linuxer Wannabe

Offline

#7 2018-09-11 05:39:14

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Wifi Connection Issue

It is impossible to diagnose unless you connect manually, ie., without any management abstractions (netctl, NM, etc).


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2018-09-11 12:58:38

rivendellx
Member
Registered: 2018-09-11
Posts: 11

Re: Wifi Connection Issue

jasonwryan wrote:

It is impossible to diagnose unless you connect manually, ie., without any management abstractions (netctl, NM, etc).

Could you please provide me with a link demonstrating manual wifi connection without using netctl, iw or any other management abstractions?


Linuxer Wannabe

Offline

#9 2018-09-11 13:26:15

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,104

Re: Wifi Connection Issue

iw is the direct connection tool: https://wiki.archlinux.org/index.php/Wi … uration#iw

Edit: I did initially hesitate to post the iw link in case a WPA connection was attempted, but for some reason forgot to check up again...

Last edited by V1del (2018-09-11 13:52:51)

Offline

#10 2018-09-11 13:31:30

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

Re: Wifi Connection Issue

In this case wpa_supplicant would be the tool as the OP already noted that it is a WPA-PSK network.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#11 2018-09-11 13:43:57

rivendellx
Member
Registered: 2018-09-11
Posts: 11

Re: Wifi Connection Issue

Trilby wrote:

In this case wpa_supplicant would be the tool as the OP already noted that it is a WPA-PSK network.

I was going to ask WPA2 support issue with iw mentioned by

V1del wrote:

iw is the direct connection tool.

Just figured I might need wpa-supplicant and here you are right on the point.

I will do some experiments, Thank you all.


Linuxer Wannabe

Offline

#12 2018-09-11 22:37:58

rivendellx
Member
Registered: 2018-09-11
Posts: 11

Re: Wifi Connection Issue

Trilby wrote:

In this case wpa_supplicant would be the tool as the OP already noted that it is a WPA-PSK network.

Hi Trilby, I followed How to connect to a WPA/WPA2 Wifi network using Linux command line

everything was alright, except for step 5. After running

wpa_supplicant -B -D wext -i wlp3s0 -c /etc/wpa_supplicant.conf

I got

 Successfully initialized wpa_supplicant
 ioctl[SIOCSIWENCODEEXT]: invalid argument
 ioctl[SIOCSIWENCODEEXT]: invalid argument

And step 7, after

 ip route add default via 192.168.1.254 dev wlp3s0

I got

 Error: either "to" is duplicate, or "192.168.1.254" is a garbage

And ping 8.8.8.8 or 192.168.1.1 does no go through.


Any ideas about my mistakes?
BTW, I checked my system service, there was only one "dhcpcd@enp2s0.service" which is for ethernet interface I believe and failed.

Last edited by rivendellx (2018-09-11 22:38:33)


Linuxer Wannabe

Offline

#13 2018-09-11 23:37:22

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

Re: Wifi Connection Issue

Please use our wiki (the wpa_supplicant page was linked from the manual steps you were provided a link to above).  The link your provided goes to a blank page - so I can't even see what you did.

Remove the '-D wext' from the wpa_supplicant command line.  I have yet to ever see a case where specifying the driver was needed or helpful - but I've seen countless cases where explicitly specifying it caused problems.  Ensure you have a proper config file (e.g., what's in /etc/wpa_supplicant/wpa_supplicant.conf?).

Do not move on to the next steps until wpa_supplicant succeeds.  If/when it does succeed, you likely want to just use `dhcpcd wlp3s0` rather than trying to use `ip` to assign a route.

If wpa_supplicant fails again, the try again without the -B flag and add a -v flag, then paste the verbose output it provides into the forums (in code tags).

Last edited by Trilby (2018-09-11 23:38:39)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#14 2018-09-12 00:24:21

rivendellx
Member
Registered: 2018-09-11
Posts: 11

Re: Wifi Connection Issue

Trilby wrote:

Please use our wiki (the wpa_supplicant page was linked from the manual steps you were provided a link to above).  The link your provided goes to a blank page - so I can't even see what you did.

Remove the '-D wext' from the wpa_supplicant command line.  I have yet to ever see a case where specifying the driver was needed or helpful - but I've seen countless cases where explicitly specifying it caused problems.  Ensure you have a proper config file (e.g., what's in /etc/wpa_supplicant/wpa_supplicant.conf?).

Do not move on to the next steps until wpa_supplicant succeeds.  If/when it does succeed, you likely want to just use `dhcpcd wlp3s0` rather than trying to use `ip` to assign a route.

If wpa_supplicant fails again, the try again without the -B flag and add a -v flag, then paste the verbose output it provides into the forums (in code tags).

Hi Trilby, this is the original link (https://linuxcommando.blogspot.com/2013 … twork.html), what I followed. it looks like that website has problems with external linking. if you still cannot see it, just type "WPA" in the search bar, you should be able to see the article.

SO, back to your question, there was nothing under /etc/wpa_supplicant, I generated the conf file to /etc as being demonstrated by the article. Does that really matter?

I rebooted my laptop and followed your way. Generating the conf file into /etc/wpa_supplicant. Then run the wpa_supplicant command, successful. Run dhcpcd wlp3s0, no problem, assigned with 192.168.1.6
Also iw wlp3s0 link shows connected.

Then I ping my gateway 192.168.1.1, here is what i got

 ping: sendmsg: Network is unreachable

What should I do next?

Much appreciate your help

*********************************************************************************
Update Additional Info
The journalctl -f kept showing this
my screen

Last edited by rivendellx (2018-09-12 00:39:32)


Linuxer Wannabe

Offline

#15 2018-09-12 00:38:38

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Wifi Connection Issue

Trilby wrote:

Please use our wiki

Relying on third party websites is a fool's errand. Either use the wiki you have been repeatedly linked to, or ask the blogger that wrote that tutorial for help.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#16 2018-09-12 00:52:00

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

Re: Wifi Connection Issue

rivendellx wrote:

this is the original link (https://linuxcommando.blogspot.com/2013 … twork.html), what I followed.

Thanks - that link worked.  While there is a lot of needless cruft in that guide those steps should work provided that you drop the "-D wext".  The guides in our wiki would streamline that process a lot which would likely make it easier to remember and learn from.

rivendellx wrote:

there was nothing under /etc/wpa_supplicant, I generated the conf file to /etc as being demonstrated by the article. Does that really matter?

Nope, that's fine, poor reading on my part.  That file can technically be anywhere at all provided you write the config file and pass the same file to wpa_supplicant's -c flag.  I'm just used to that being at /etc/wpa_supplicant/wpa_supplicant.conf.  My question was just directed at whether you properly generated the content of that file with wpa_passphrase (or similar).  If you followed the steps you linked to, you generated that file appropriately with wpa_passphrase.

rivendelix wrote:

I rebooted my laptop and followed your way. Generating the conf file into /etc/wpa_supplicant. Then run the wpa_supplicant command, successful.

So one problem solved... Can you please post the output from `ip a` just after a succesfull run of wpa_supplicant?

rivendelix wrote:

Run dhcpcd wlp3s0, no problem, assigned with 192.168.1.6
Also iw wlp3s0 link shows connected.

Then I ping my gateway 192.168.1.1, here is what i got

 ping: sendmsg: Network is unreachable

So you're definitely many steps closer, and we've worked through all the basics.  If everything was successful, you definitely shouldn't get that error, though.  So the `ip a` output would be a good next step.

Last edited by Trilby (2018-09-12 00:53:22)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#17 2018-09-12 00:52:35

rivendellx
Member
Registered: 2018-09-11
Posts: 11

Re: Wifi Connection Issue

While I was exploring and waiting for the solutions, I left my laptop ping 192.168.1.1. And guess what, This is what happened Surprise One
Then I immediately Ctrl+z and ping archlinux.org. Surprise Two

It looks like my laptop is too old, and it takes time for my router to recognize what kind of "Grandpa" it is.

However, I intend to keep this discussion open. Please continue to provide any new ideas and I would be happy to try relentlessly until I figured out the underlying mechanism.

Thank you all for your kind help.

**************************************************
Update 1

Trilby wrote:

output of 'ip a'

This is the output, although it is not after wpa_supplicant, hope it offers some insights


****************
Update 2

The newest journalctl -f
The last line says ***** Synchronized to time serever******. I remembered I changed my timezone setting to my right location while I was ping 192.168.1.1. Do you think that was the original sin?

****************
Update 3

I tried to install Arch Linux "pacstrap /mnt base". It started to download a few packages, but all of sudden connection errors popped out again.

Now, iw wlp3s0 link shows connected, but ping 192.168.1.1 keeps showing  Network is unreachable. And journalctl -f is is a loop of authenticated,deauthenticated.

What really is the problem?

********************
Update 4

Trilby wrote:

output for 'ip a'

Hi Trilby, I have formatted my disk and back to the installation. Here is the output after for 'ip a' after wap_supplicant succeeded before I ran dhcpcd wlp3s0.
It still doesn't work, please refer to Update 3.
I am really curious about why it worked for a very short (refer to the beginning of this reply) period of time, and all of sudden went down again.
(Another piece of information which I probably shouldn't post here but for sake of fixing the problem, is I tried a different distro, using the same way to build wifi connection (Thank god, there are some commonalities in linux), it showed the same thing--in a loop of authenticate and deauthenticate

Last edited by rivendellx (2018-09-14 01:49:46)


Linuxer Wannabe

Offline

#18 2018-09-12 08:38:32

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Wifi Connection Issue

rivendellx wrote:

all of sudden connection errors popped out again.

Try:

sysctl -w net.ipv4.tcp_ecn=2

When debugging, I like to take ipv6 out of the equation, using the kernel commandline option:

ipv6.disable_ipv6=1

Offline

#19 2018-09-12 11:12:46

rivendellx
Member
Registered: 2018-09-11
Posts: 11

Re: Wifi Connection Issue

brebs wrote:
rivendellx wrote:

all of sudden connection errors popped out again.

Try:

sysctl -w net.ipv4.tcp_ecn=2

When debugging, I like to take ipv6 out of the equation, using the kernel commandline option:

ipv6.disable_ipv6=1

Thank you for your information. I have run the first command.
Could you be more specific about the second one? it does not go through as what you typed


Linuxer Wannabe

Offline

#20 2018-09-12 11:24:14

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Wifi Connection Issue

If you're using Grub, then the steps are:

1. Add kernel commandline - in /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable_ipv6=1"

2. Update Grub - run:

grub-mkconfig -o /boot/grub/grub.cfg

3. Reboot

The purpose is to remove the confusion of mixing ipv4 and ipv6 together.

Offline

#21 2018-09-14 01:31:53

rivendellx
Member
Registered: 2018-09-11
Posts: 11

Re: Wifi Connection Issue

brebs wrote:

If you're using Grub, then the steps are:

1. Add kernel commandline - in /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable_ipv6=1"

2. Update Grub - run:

grub-mkconfig -o /boot/grub/grub.cfg

3. Reboot

The purpose is to remove the confusion of mixing ipv4 and ipv6 together.

Thank you for your explanation brebs. I have formatted my disk and currently back to the installation stage. Let me finish installation using hotspot connection and try your command.


Linuxer Wannabe

Offline

Board footer

Powered by FluxBB