LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-11-2017, 12:51 AM   #1
terook
LQ Newbie
 
Registered: Jul 2017
Posts: 5

Rep: Reputation: Disabled
Laptop Wifi, problems with wpa_supplicant and dhcpcd


Hello everyone.
I am running Slackware64 14.2 on an Acer Travelmate B115-M and its wireless card is a Broadcom BCM43228. I'm confident that I could have been just fine using wicd, because previously I ran Slackware64 14.1 with it and was ok. However now I'd like to use only wpa_supplicant and dhcpcd and do everything manually when need wifi. So I installed broadcom-sta drivers and blacklisted the conflicting ones(well explained here https://slackbuilds.org/slackbuilds/...com-sta/README), woke up my wlan0 interface with ifconfig, scanned my network with iwlist and configured my /etc/wpa_supplicant.conf with psk obtained by wpa_passphrase. Everything's fine, in fact now I can connect through wlan0 running
Code:
wpa_supplicant -B -i wlan0 -D wext -c /etc/wpa_supplicant.conf
(I verified that with iwconfig); at this point I know I need an address so I run
Code:
dhcpcd wlan0
and it's output doesn't seem to be different from the eth0 wired one, but after that I am still offline. I don't understand what's wrong, but I think it could be some kind of lacking configuration of dhcpcd in interfacing with wpa_supplicant, so I read man pages for both dhcpcd and dhcpcd-run-hooks, I looked at both /lib/dhcpcd/dhcpcd-run-hooks and /lib/dhcpcd/dhcpcd-hooks/10-wpa_supplicant, but I still can't figure it out. I tried to use dhclient, but its output is null; however in this case the config file is almost empty so it is not surprising. I prefer to learn how to use dhcpcd properly instead of learning how to configure dhclient, because it worked with wired and because there is something I am really missing. On a side note, I even tried following http://alien.slackbook.org/dokuwiki/...ckware:network editing /etc/rc.d/rc.inet1.conf, but it seems to me that it does the same thing I do manually, automatically, and needless to say it doesn't work.
 
Old 07-11-2017, 03:18 PM   #2
brobr
Senior Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 1,030

Rep: Reputation: 251Reputation: 251Reputation: 251
Sorry I do not know whether this makes any sense but maybe you need to change some settings in the /etc/dhcpcd.conf (for example I had to change interface settings from 'duid' to 'clientid' to get online at work (via eth0)). For the "nohook" option on the last line of dhcpcd.conf, comments refer to wpa_supplicant being started from rc.inet1 or NM; could that be relevant?
 
Old 07-11-2017, 04:36 PM   #3
Loomx
Member
 
Registered: Sep 2012
Distribution: Slackware
Posts: 211

Rep: Reputation: Disabled
What happens if you run (as root):
Code:
/etc/rc.d/rc.inet1 restart
And what is in your /etc/rc.d/rc.inet1.conf file?
 
Old 07-11-2017, 05:36 PM   #4
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672
Can you provide the output from your wpa_supplicant and dhcpcd commands? As well as the output of the following (after you've run the wpa_supplicant and dhcpcd commands):

Code:
iwconfig
ifconfig
 
Old 07-12-2017, 12:11 AM   #5
terook
LQ Newbie
 
Registered: Jul 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thanks everyone for your help!

@brobr: I tried to comment that line; unfortunately nothing has changed.

@Loomx: I think it simply restart my services; I didn't understand exactly when to run that, but I did (after getting the output below), and it gave me the same output when I start the system. My /etc/rc.d/rc.inet1.conf is the same as it was after installing Slackware (I played with that trying to follow AlienBOB's instructions, but then I commented every line I uncommented earlier) so it is:link.

@bassmadrigal: Here's the output:link.

Last edited by terook; 07-15-2017 at 10:30 AM.
 
Old 07-12-2017, 01:12 AM   #6
Loomx
Member
 
Registered: Sep 2012
Distribution: Slackware
Posts: 211

Rep: Reputation: Disabled
Well, it looks nearly there :-)
Can you ping the router? 192.168.1.1
Can you ping google on 8.8.8.8?
If so it would indicate a DNS issue.
What is in your /etc/resolv.conf file?

========

ps If it was me, I would uncomment these lines in your /etc/rc.d/rc.inet1.conf and restart the machine to let the Slackware network scripts do their thing:
Code:
IFNAME[4]="wlan0"
USE_DHCP[4]="yes"
WLAN_WPA[4]="wpa_supplicant"
But if you want to do it all manually, I can understand that too :-)
 
Old 07-12-2017, 01:21 AM   #7
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672
Ok, so based on your output, you are connected to the access point and getting an IP address, but you still can't ping a domain name after that. Let's try to see if it is a DNS issue or an overall connectivity issue. Can you try pinging 8.8.8.8? Do you get a response or does it still error out? If it errors out, let's see if you can ping the router (192.168.1.1).

Once you have run wpa_supplicant and dhcpcd, can you provide the output of the following?

Code:
ifconfig
cat /etc/resolv.conf
traceroute 192.138.1.1
traceroute 8.8.8.8
And can you remove the -B from your wpa_supplicant command? That will ensure any output is displayed on the command prompt (which means you'll want to open up another terminal to run the other commands). If it is a connectivity issue, wpa_supplicant might provide us beneficial output.

For now, personally, I'd leave your /etc/rc.d/rc.inet1.conf file as is until we figure out the actual connection issue, but if you really wanted to use it, remove the 'yes' from the USE_DHCP[0] entry so it just has opening and closing quotes (this prevents the computer from trying to find an IP from your ethernet connection). Then under the 5th item (which shows up as IFNAME[4] since arrays start at 0), uncomment the IFNAME, USE_DHCP (add 'yes' between the quotes), WLAN_WPA, and WLAN_WPADRIVER variables.

EDIT: Loomx was much faster than me as well as being more succinct with pretty much the exact same info.
 
Old 07-12-2017, 02:28 AM   #8
terook
LQ Newbie
 
Registered: Jul 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Ok:
1)link
2)link
3)I did not understand why ping 8.8.8.8 does nothing so i try
Code:
bash-4.3# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data
but same results.
So, is it DNS issue? Why does not happen the same thing with wired eth0? I do not remember setting DNS during system installation. However what do I do now?
[EDIT]Just to be clear, after 2):
Code:
^C
--- 8.8.8.8 ping statistics ---
0 packets transmitted, 0 received
[EDIT2] I forgot ifconfig cat and traceroute, so I rebooted and did it again:link

Last edited by terook; 07-15-2017 at 10:31 AM.
 
Old 07-12-2017, 03:22 PM   #9
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672
Do you have a firewall up? If so, try shutting that down. That seems to be the only logical explanation since everything else seems to be as it should. You might have your firewall to only allow internet through eth0 so wlan0 is being blocked.

And pinging the IP address bypasses the DNS server (as DNS servers are used to translate the web address into the IP address), so if you can't ping 8.8.8.8, then it isn't related to the DNS (especially since you can't even ping your router).
 
1 members found this post helpful.
Old 07-12-2017, 05:27 PM   #10
terook
LQ Newbie
 
Registered: Jul 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Yes, it was the firewall. All this time and never thought about it... Shame on me. However thank you so much for your help. Hope some other n00b will benefit from this post.
Regards.
 
Old 07-12-2017, 07:32 PM   #11
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672Reputation: 6672
No worries. Sometimes we overlook the simplest things
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A few wifi problems, both with wpa_supplicant/dhcpcd and NetworkManager theactionindex Slackware 7 08-21-2015 05:03 PM
Quick and Easy wpa_supplicant / dhcpcd Script blumbri Linux From Scratch 1 10-19-2011 12:37 PM
dhcpcd not getting ip adderss w/ wpa_supplicant jim_fields Linux - Wireless Networking 1 07-07-2008 10:23 PM
[wifi][debian] Wpa_supplicant problems .. Mycado Linux - Newbie 7 10-03-2006 07:45 AM
"wpa_supplicant and dhcpcd" known problems? the_mich Linux - Networking 0 03-13-2006 09:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:33 PM.

Contact Us - Advertising Info - Rules - Privacy - Donations - Contributing Member - LQ Sitemap - "Weather apps tell you it'll rain. Wyndo tells you when to go."
Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions