You are not logged in.

#1 2015-12-25 20:36:52

Allexj
Member
Registered: 2015-07-11
Posts: 73

[SOLVED]Problems with dhcpcd in wlan.

Hi all.
I got a problem in wireless connection in my fresh installed arch distribution.
During the installation, i had to configure my connection for installing base system, but i found some problems with wifi connection. So i continued by using ethernet.
But once installed, i must resolve these problems... i can't attach cable every time...

One thing that i realize is that the output of "ip link show wlp4s0" (that is my wireless card) is this:

3: wlp4s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
    link/ether 30:10:b3:18:8b:fd brd ff:ff:ff:ff:ff:ff

Note the "NO-CARRIER"... and it shouldn't be printed... i saw it in the official guide.. the correct print is this:

3: wlp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
    link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff

so there's not the "no-carrier" print.


Anyway, this is the problem: in any way i try to connect by wifi i can't. for example, i tried with wifi-menu tool.

# ip link set wlp4s0 up
# wifi-menu wlp4s0

But nothing happends.

I tried with manually connection.

# wpa_supplicant -B -i wlp4s0 -c <(wpa_passphrase "ssid" "psk")
# dhcpcd wlp4s0

But it says me that it's waiting carrier for some seconds, when it goes on timeout.



I also tried to connect from the NetworkManager, but also this gives problems.. when I put the wifi password the loading idles...


have you got any advices?

p.s. sorry for my bad english



--UPDATE--

I also see that the problems presents il live too...... but if i run for example ubuntu live wireless works

Last edited by Allexj (2016-01-04 21:27:12)

Offline

#2 2015-12-26 01:27:59

twelveeighty
Member
From: Alberta, Canada
Registered: 2011-09-04
Posts: 1,096

Re: [SOLVED]Problems with dhcpcd in wlan.

Have you tried stepping through the instructions in the Wiki: https://wiki.archlinux.org/index.php/Wi … figuration ?

Most importantly, as explained in the "Wireless Management" section, you will have to first decide how you want to manage your wireless connections, since using both Network Manager and manual config (as you describe in your post) is typically a bad idea.

If you were already following that article, please describe the step/section where you get stuck.

Offline

#3 2015-12-26 12:23:27

Allexj
Member
Registered: 2015-07-11
Posts: 73

Re: [SOLVED]Problems with dhcpcd in wlan.

thx for the answer

i don't know how... but i solved, by these commands:

# ip link set wlp4s0 up
# wpa_supplicant -B -i wlp4s0 -c <(wpa_passphrase "ssid" "psk")
# dhcpcd wlp4s0

and says error... but if i write

# ip addr add 192.168.x.y/24 dev wlp4s0
# ip route add default via routerip
# dhcpcd wlp4s0

and it connects.......

But once i reboot pc i have to rewrite the precedent commands...

I really don't know what's the problem.

any other suggestions?

Last edited by Allexj (2015-12-26 15:32:50)

Offline

#4 2015-12-27 11:08:08

ayekat
Member
Registered: 2011-01-17
Posts: 1,590

Re: [SOLVED]Problems with dhcpcd in wlan.

What is the output of wpa_supplicant? Try not passing `-B` to it to get its output.
Once it authenticates with the access point properly (if it does), what is the output of dhcpcd?

To me, it seems pretty weird that it would require you to set an IP address and a route manually prior to requesting an IP address via DHCP.


pkgshackscfgblag

Offline

#5 2015-12-27 18:43:20

Allexj
Member
Registered: 2015-07-11
Posts: 73

Re: [SOLVED]Problems with dhcpcd in wlan.

ayekat wrote:

What is the output of wpa_supplicant? Try not passing `-B` to it to get its output.
Once it authenticates with the access point properly (if it does), what is the output of dhcpcd?

To me, it seems pretty weird that it would require you to set an IP address and a route manually prior to requesting an IP address via DHCP.

Yeah, it's actually weird.... xD

However, these are output of commands you ask to insert.

For the wpa_supplicant, if I don't write the -B option, it fails to connect. here output:

# wpa_supplicant -i wlp4s0 -c <(wpa_passphrase "NAMEROUTER" "PASSWORDWIFI")
Successfully initialized wpa_supplicant
wlp4s0: SME: Trying to authenticate with e8:74:e6:2c:f1:3a (SSID='NAMEROUTER' freq=2412 MHz)
wlp4s0: CTRL-EVENT-DISCONNECTED bssid=e8:74:e6:2c:f1:3a reason=2 locally_generated=1
wlp4s0: Trying to associate with e8:74:e6:2c:f1:3a (SSID='NAMEROUTER' freq=2412 MHz)
wlp4s0: Associated with e8:74:e6:2c:f1:3a
wlp4s0: CTRL-EVENT-DISCONNECTED bssid=e8:74:e6:2c:f1:3a reason=3 locally_generated=1
wlp4s0: SME: Trying to authenticate with e8:74:e6:2c:f1:3a (SSID='NAMEROUTER' freq=2412 MHz)
wlp4s0: SME: Authentication request to the driver failed
wlp4s0: Associated with e8:74:e6:2c:f1:3a
wlp4s0: CTRL-EVENT-DISCONNECTED bssid=e8:74:e6:2c:f1:3a reason=3 locally_generated=1
wlp4s0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="NAMEROUTER" auth_failures=1 duration=10 reason=CONN_FAILED
wlp4s0: CTRL-EVENT-SCAN-FAILED ret=-16 retry=1
wlp4s0: CTRL-EVENT-SCAN-FAILED ret=-16 retry=1
wlp4s0: CTRL-EVENT-DISCONNECTED bssid=e8:74:e6:2c:f1:3a reason=3 locally_generated=1
wlp4s0: CTRL-EVENT-DISCONNECTED bssid=e8:74:e6:2c:f1:3a reason=3 locally_generated=1
wlp4s0: CTRL-EVENT-SCAN-FAILED ret=-16 retry=1
wlp4s0: CTRL-EVENT-SCAN-FAILED ret=-16 retry=1
wlp4s0: CTRL-EVENT-SSID-REENABLED id=0 ssid="NAMEROUTER"
wlp4s0: SME: Trying to authenticate with e8:74:e6:2c:f1:3a (SSID='NAMEROUTER' freq=2412 MHz)

And this is the output of dhcpcd first the static commands:

# dhcpcd wlp4s0
control_open: Connection refused
DUID 00:01:00:01:1e:11:2e:c9:30:10:b3:18:8b:fd
wlp4s0: IAID b3:18:8b:fd
wlp4s0: soliciting a DHCP lease
wlp4s0: soliciting an IPv6 router
wlp4s0: probing address 192.168.1.103/24
wlp4s0: offered 192.168.1.103 from 192.168.1.254
wlp4s0: NAK: If you read this, DHCP will stop working from 192.168.1.254
wlp4s0: message: If you read this, DHCP will stop working
wlp4s0: soliciting a DHCP lease
wlp4s0: probing address 192.168.1.109/24
wlp4s0: offered 192.168.1.109 from 192.168.1.254
wlp4s0: NAK: If you read this, DHCP will stop working from 192.168.1.254
wlp4s0: message: If you read this, DHCP will stop working
wlp4s0: soliciting a DHCP lease
wlp4s0: probing address 192.168.1.110/24
wlp4s0: offered 192.168.1.110 from 192.168.1.254
wlp4s0: NAK: If you read this, DHCP will stop working from 192.168.1.254
wlp4s0: message: If you read this, DHCP will stop working
wlp4s0: soliciting a DHCP lease
wlp4s0: probing address 192.168.1.112/24
wlp4s0: offered 192.168.1.112 from 192.168.1.254
wlp4s0: NAK: If you read this, DHCP will stop working from 192.168.1.254
wlp4s0: message: If you read this, DHCP will stop working
wlp4s0: soliciting a DHCP lease
Segmentation fault (core dump created)

and then the static commands... it works.

# ip addr add 192.168.1.48/24 dev wlp4s0
# ip route add default via 192.168.1.254
# dhcpcd wlp4s0
control_open: Connection refused
DUID 00:01:00:01:1e:11:2e:c9:30:10:b3:18:8b:fd
wlp4s0: IAID b3:18:8b:fd
wlp4s0: soliciting an IPv6 router
wlp4s0: soliciting a DHCP lease
wlp4s0: probing address 192.168.1.103/24
wlp4s0: offered 192.168.1.103 from 192.168.1.254
wlp4s0: NAK: If you read this, DHCP will stop working from 192.168.1.254
wlp4s0: message: If you read this, DHCP will stop working
wlp4s0: soliciting a DHCP lease
wlp4s0: probing address 192.168.1.109/24
wlp4s0: offered 192.168.1.109 from 192.168.1.254
wlp4s0: leased 192.168.1.109 for 43320 seconds
wlp4s0: adding route to 192.168.1.0/24
wlp4s0: adding default route via 192.168.1.254
forked to background, child pid 8558

Offline

#6 2016-01-03 17:40:40

Allexj
Member
Registered: 2015-07-11
Posts: 73

Re: [SOLVED]Problems with dhcpcd in wlan.

UP...... Now I'm not able to connect  neither with the static commands... It's an big problem.  In fact I'm writing you from mobile phone, and not from my archlinux

Offline

#7 2016-01-03 18:48:16

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

Re: [SOLVED]Problems with dhcpcd in wlan.

Hello Allexj,

here is some input from me:

1.) wifi-menu is a utility for finding available routers and to automatically generate configuration files, which are used by network managers.

 wifi-menu <interface> 

has, to my knowledge, no meaning. You just need to type plain

 wifi-menu 

for it to work.
2.) dhcp (dynamic host configuration protocol) is, as the name says, a dynamic way to assign ip addresses and configurations to one or multiple hosts within a network. dhcpcd is one particular program which implements dhcp
3.) multiple network configuration tools, such as dhcpcd and wpa_supplicant, cause problems if they run simultaneously. You should stick to one and disable all the others.

I can give you a suggestion how to make your wlan work using netctl (or at least how it worked for me):
a) switch to root
b) disable all network configuration tools (dhcpcd, wpa_supplicant, ...)
c) type

 iw dev wlp4s0 scan | grep SSID 

This should give you all available networks, including yours
d) go into /etc/netctl/examples
e) if your router uses wpa encryption, copy the "wireless-wpa" file one folder higher and  rename it (to "my_wireless" or whatever...)
f) open this copied file, change the interface name (wlp4s0), the network name to whatever your network is called and the Key to the passphrase given by your provider (should be a long number). Save and close the file.
g) set your network interface down via

 ip link set wlp4s0 down 

h) type

 netctl start my_wireless 

. Now your connection should be established. Check it by typing

 ping www.google.com 

and see if some bytes are returned
i) type

 netctl enable my_wireless 

to create a daemon which automatically connects at every boot.

I hope this helps,

Cheers,
Starfish

Last edited by Starfish (2016-01-03 19:12:12)


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

Offline

#8 2016-01-03 22:17:44

Allexj
Member
Registered: 2015-07-11
Posts: 73

Re: [SOLVED]Problems with dhcpcd in wlan.

Starfish wrote:

Hello Allexj,

here is some input from me:

.................................................

I hope this helps,

Cheers,
Starfish

thx bro... I fcking solved! I love you man lol

However, I think that my current wireless card isn't fully compatible with achlinux so gives these problems.. In fact, I can't connect with wifi-menu neither I don't write "wlp4s0"....

The following that I used are these:

1)installed netctl
2)disabled and stopped dhcpcd and wpa_supplicant service
3)ip link set wlp4s0orwhatyouhave down
4)cp /etc/netctl/examples/wireless-wpa /etc/netctl
5)mv /etc/netctl/wireless-wpa nameyouwant
6)cd /etc/netctl
7)nano nameyouwant and edited for my own wifi
8)netctl start directoryofnameyouwant
9)systemctl disable netctl.service... yeah I'm not drunk..... it's just you can't have active both netctl.service and netctl@nameyouwant.service

If it doesn't work immediatly, you have to mess around (I don't know if the translation is correct xD) with various configuration... For me it works after 3 reboots with some changes I did. Anyway... for make it works you have to start it at every reboot because if you enable the service to boot automatically, usually it doesn't work... so you have to connect manually.

Thx to all again, peace



-UPDATE-


I don't completely fix.... Yeah it connects, and after reboot the connection is automatic... But if I stay online for a while i see that in some minutes my network goes down and i'm not able to surf.... and after other minutes it restore and I can surf again... What's this? Is there a way to fix it?

Last edited by Allexj (2016-01-05 00:43:47)

Offline

#9 2016-01-04 05:49:56

likeahundredninjas
Banned
Registered: 2015-12-13
Posts: 23

Re: [SOLVED]Problems with dhcpcd in wlan.

i can probably figure out the wifi problems, but seriously wifi-menu won't even work?

didn't realize you got that far... yeah, there's a way to fix it. delete all your profiles and redo it.

Last edited by likeahundredninjas (2016-01-04 05:51:02)

Offline

#10 2016-01-04 09:58:32

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

Re: [SOLVED]Problems with dhcpcd in wlan.

Allexj wrote:

I don't completely fix.... Yeah it connects, and after reboot the connection is automatic... But if I stay online for a while i see that in some minutes my network goes down and i'm not able to surf.... and after other minutes it restore and I can surf again... What's this? Is there a way to fix it?

This could be a lousy connection. Check your internet speed, if its something below 100K/s then this is probably the reason it crashes sometimes and then restarts.


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

Offline

#11 2016-01-04 21:26:55

Allexj
Member
Registered: 2015-07-11
Posts: 73

Re: [SOLVED]Problems with dhcpcd in wlan.

No prob.... I reboot router and it connects without issues. Maybe the poor router was just stressed. It's obvius... It's on 24h/24
Thx all.

-UPDATE-

Other problems with netctl... I post a simple script that I used for fix the issue... just edit it for your configuration.. for example in place of wlp4s0 (my wirelss card) insert yours, and in place of enp3s0 (my eth card) insert yours... and it should work.

http://pastebin.com/N62quWJw

Remember to save the file with .sh extension.
If it doesn't work immediatly, you have to run this sh script for x times until it works.

Good luck

-UPDATE-

Finally completly solved by using wicd. See this page: https://wiki.archlinux.org/index.php/Wicd

Last edited by Allexj (2016-01-10 00:11:27)

Offline

Board footer

Powered by FluxBB