Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Help me connect to the internet using wpa_supplicant
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
LegionOfHell
Apprentice
Apprentice


Joined: 16 Mar 2019
Posts: 165
Location: Toronto, Canada

PostPosted: Fri May 03, 2019 10:44 pm    Post subject: Help me connect to the internet using wpa_supplicant Reply with quote

I installed both wpa_supplicant and dhcpcd during installation...I set up wpa_supplicant following the Gentoo guide.

when I booted my system at first, after running ifconfig only the "lo" interface was showing, i installed the relevant kernel items and now "wlo1" is showing ...
When I tried to enable "Network support--> Wireless --> Default rate control algorithm (Minstrel)" a window poped with "(X) Minstrel" with a select and help button at the bottom, I chose select. Just wanted you to know.


"ip link show wlo1" returns something like this:

3: wlo1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000


wpa_cli returns an error saying:

Interactive mode

could not connect to wpa_supplicant: (nil) - retrying

and then it hangs

dhcpcd wlo1 returns:

wlo1: waiting for the carrier
time out
dhcpcd exited


Please help!!
Back to top
View user's profile Send private message
LegionOfHell
Apprentice
Apprentice


Joined: 16 Mar 2019
Posts: 165
Location: Toronto, Canada

PostPosted: Sat May 04, 2019 5:13 am    Post subject: Reply with quote

OK so I figured out how to get the internet working...

every time I reboot my computer I have to run the 2 following commands in order for internet to work:

wpa_supplicant -B -M -c/etc/wpa_supplicant/wpa_s.conf

dhcpcd wlo1

But I have added wpa_supplicant to auto run using : rc-update add wpa_supplicant default

And I have added wpa_supplicant_args="-B -M -c/etc/wpa_supplicant/wpa_s.conf" to /etc/conf.d/wpa_supplicant

I have also added:

modules_wlo1="wpa_supplicant"
config_wlo1="dhcp"

to /etc/conf.d/net

Can someone tell me how to automate the process i mentioned in the beginning ?

Many Thanks

--------------------------------------

I don't know if it is relevant but I installed my Gentoo from Ubuntu 19.04 live, the network interface wlo1 showed up there as well and I performed the following steps in the chroot environment inside ubuntu Live:

emerge --ask --noreplace net-misc/netifrc

cd /etc/init.d

ln -s net.lo net.wlo1

rc-update add net.wlo1 default

emerge --ask net-misc/dhcpcd

emerge --ask net-wireless/iw net-wireless/wpa_supplicant

--------------------------------------

I ran rc-update add dhcpcd default ... now after each reboot I only have to run:

wpa_supplicant -B -M -c/etc/wpa_supplicant/wpa_s.conf

after running the above . I get connected to the internet...don't have to type dhcpcd wlo1 anymore...seems like wpa_supplicant is not doing its job at boot...
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3062

PostPosted: Sat May 04, 2019 6:57 pm    Post subject: Reply with quote

You might want to read https://wiki.gentoo.org/wiki/Wpa_supplicant
Back to top
View user's profile Send private message
LegionOfHell
Apprentice
Apprentice


Joined: 16 Mar 2019
Posts: 165
Location: Toronto, Canada

PostPosted: Sat May 04, 2019 10:42 pm    Post subject: Reply with quote

I followed the guide .. the problem is wpa_supplicant doesn't do its job at boot ... I have to manually run this command after boot:


[code]wpa_supplicant -B -M -c/etc/wpa_supplicant/wpa_s.conf[/code]
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44900
Location: 56N 3W

PostPosted: Sat May 04, 2019 10:57 pm    Post subject: Reply with quote

LegionOfHell,

You have missed a step in your wifi setup.
The startup script will call wpa_supplicant then dhcpcd, if that's what you want.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
LegionOfHell
Apprentice
Apprentice


Joined: 16 Mar 2019
Posts: 165
Location: Toronto, Canada

PostPosted: Sat May 04, 2019 11:22 pm    Post subject: Reply with quote

I can't think of where I made a mistake...

My custom /etc/wpa_supplicant/wpa_s.conf has :

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=1
eapol_version=1
ap_scan=1
fast_reauth=1

network={
ssid="BELL138"
psk="pass"
priority=5
}
-----------------
My /etc/conf.d/wpa_supplicant has:

wpa_supplicant_args="-B -M -c/etc/wpa_supplicant/wpa_s.conf"
-----------------
I also added wpa_supplicant to the runlevel:

rc-update add wpa_supplicant default
----------------
My /etc/conf.d/net has:

modules_wlo1="wpa_supplicant"
config_wlo1="dhcp"

---------------

wpa_supplicant runs at boot but it doesn't do anything...but once I run it manually after boot like this:

wpa_supplicant -B -M -c/etc/wpa_supplicant/wpa_s.conf

connection establishes..can't think of what's going on...
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7468
Location: Saint Amant, Acadiana

PostPosted: Sat May 04, 2019 11:57 pm    Post subject: Reply with quote

Quote:
rc-update add wpa_supplicant default

What gave you this idea? wpa_supplicant is supposed to be called by net script or some network management tool you may have installed. And please use code tags to post code.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
LegionOfHell
Apprentice
Apprentice


Joined: 16 Mar 2019
Posts: 165
Location: Toronto, Canada

PostPosted: Sun May 05, 2019 12:00 am    Post subject: Reply with quote

The handbook did : https://wiki.gentoo.org/wiki/Wpa_supplicant

check the section : "Setup for dhcpcd as network manager"
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7468
Location: Saint Amant, Acadiana

PostPosted: Sun May 05, 2019 12:13 am    Post subject: Reply with quote

https://wiki.gentoo.org/wiki/Network_management_using_DHCPCD
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
LegionOfHell
Apprentice
Apprentice


Joined: 16 Mar 2019
Posts: 165
Location: Toronto, Canada

PostPosted: Sun May 05, 2019 1:07 am    Post subject: Reply with quote

I did as the guide says except I didn't do the section "Migration from Gentoo net.* scripts" should I go through that as well ?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44900
Location: 56N 3W

PostPosted: Sun May 05, 2019 8:43 am    Post subject: Reply with quote

LegionOfHell,

Choose exactly one network management tool.

When you choose more, your WiFi will never connect as the management tools fight over wpa_supplicant.
dmesg will show a never ending cycle of attemtps to connect that end with disconnected Reason=3.

There are a handful of network management tools. All depend on wpa_supplicant being configured correctly.
All call wpa_supplicant in the course of making WiFi work.

We don't know what you have installed and configured.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
LegionOfHell
Apprentice
Apprentice


Joined: 16 Mar 2019
Posts: 165
Location: Toronto, Canada

PostPosted: Wed May 08, 2019 11:22 pm    Post subject: Reply with quote

I did as the "Migration from Gentoo net.* scripts" guide says:

[code]
rc-update del net.wlo1
/etc/init.d/net.wlo1 stop
echo 'sys-apps/openrc -netifrc' >> /etc/portage/package.use/openrc
emerge --ask --newuse --oneshot sys-apps/openrc
emerge --ask --verbose --depclean net-misc/netifrc
rm /etc/conf.d/net
rm /etc/init.d/net.*
reboot
[/code]

However, I still have to run:

[code]wpa_supplicant -B -M -c/etc/wpa_supplicant/wpa_s.conf[/code]

after login for wireless to get connected ... any ideas about what might be the problem ?
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3062

PostPosted: Thu May 09, 2019 11:34 am    Post subject: Reply with quote

The start script /etc/init.d/wpa_supplicant seems to want wpa_supplicant.conf, not wpa_s.conf.
Did you change it?
Does the WPA Supplicant Daemon get started at boot or when restarting it manually like this?
Code:
rc-config restart wpa_supplicant
Back to top
View user's profile Send private message
LegionOfHell
Apprentice
Apprentice


Joined: 16 Mar 2019
Posts: 165
Location: Toronto, Canada

PostPosted: Thu May 09, 2019 7:28 pm    Post subject: Reply with quote

yep, wpa_s.conf was the culprit....now it's working fine...thank you

weird though because wpa_s.conf works when entering the following command after login:

wpa_supplicant -B -M -c/etc/wpa_supplicant/wpa_s.conf
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44900
Location: 56N 3W

PostPosted: Thu May 09, 2019 8:42 pm    Post subject: Reply with quote

LegionOfHell,

-c says to use the file name that follows as the configuration file.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum