Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Getting wireless to work after fresh install on EeePC
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
Techbart
n00b
n00b


Joined: 24 Jun 2014
Posts: 23
Location: Sweden

PostPosted: Sun May 24, 2015 8:03 pm    Post subject: Getting wireless to work after fresh install on EeePC Reply with quote

Hi all. I'm having issues getting wireless support to work following a fresh stage 3 install. I have ensured that I'm using the correct drivers for this netbook, having looked over lspci output under the live minimal install environment, and ifconfig is listing a device as "wlp1s0". I've also checked dmesg for clues, and it lists "ath9k......wlp1s0: renamed from wlan0", with only one other message from systemd-udevd performing the same rename. To note, I'm using OpenRC, not systemd, and I believe that the systemd message is only there as I had prepared my system to work with systemd, as per following the hand book's instructions during install.

I have tried installing wireless tools, and while iwconfig can see the device I believe to be my wlan card listed as "wlp1s0", it also says it has no wireless extensions, and is therefore unable to use it. Any help would be much appreciated, thanks.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3105

PostPosted: Sun May 24, 2015 8:13 pm    Post subject: Reply with quote

Quote:
iwconfig can see the device I believe to be my wlan card listed as "wlp1s0"
you're good believer
Quote:
it also says it has no wireless extensions
wireless extentions is legacy interface, you can still enable it in kernel configuration (before compilation) and it will work. However, there are other means to do that and I suppose you already have one in hand: openrc.
In /etc/init.d/ create a symlink called net.wlp1s0 pointing to net.lo, just like installation guide says.
It should "just work" ™, at least with open networks it can find. Setting passwords may (or may not) require you to write wpa_supplicant config. You can also go for more dynamic manager that will generate it for you. Like usually, the best way to go depends on your destination. Err... goal ;)
Back to top
View user's profile Send private message
Techbart
n00b
n00b


Joined: 24 Jun 2014
Posts: 23
Location: Sweden

PostPosted: Sun May 24, 2015 9:26 pm    Post subject: Reply with quote

Thanks for the quick reply :). I've tried getting openRC to manually add an entry for my wlan interface as you suggested, and while the interface is now appearing in ifconfig as being loaded, iwconfig is still complaining about it having no wireless extensions. I'm wondering if I need to reinstall wireless tools for it to pick up on the new interface, or if perhaps iwconfig just won't play nice without wireless extension support.

Failing that, I've found the right kernel option I need for it to have wireless extensions, so now I'm just wondering if I've missed something in sym linking my wlan, or if I should just let a kernel recompile take care of the issue.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Mon May 25, 2015 5:52 am    Post subject: Reply with quote

Techbart wrote:
iwconfig is still complaining about it having no wireless extensions.

Forget about iwconfig. it' s deprecated tool and also needs a deprecated kernel driver to be activated.

Have a look at https://wiki.gentoo.org/wiki/Network_management_using_DHCPCD which is based on https://forums.gentoo.org/viewtopic-t-965190.html
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Mon May 25, 2015 6:17 am    Post subject: Reply with quote

Do you have linux-firmware installed? Some ath9k devices require it, and if it isn't present you will see the card, but you won't be able to actually use it and tools may indicate that it can't be used.

Also, command line networking really sucks. Since this is a laptop, I assume X is going to be installed. I would "cheat" and get all the necessary files without messing with it, either through the chroot or an Ethernet connection if available. Just emerge --fetchonly xorg-server <you-wm-or-de-here> <any-graphical-tool-you-use-for-network> then you can build them in your Gentoo install offline. Also, copying the /usr/portage/distfiles directory from a working install that you have run the command on works perfectly and will save downloading extra stuff.

Graphical tools help narrow the problem space here because if they know the card exists you know the driver is right and if it won't connect you know the problem is not between the keyboard and the chair.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Mon May 25, 2015 11:36 am    Post subject: Reply with quote

I'd go with what charles17 said about dhcpcd and wpa-supplicant.
Back to top
View user's profile Send private message
Techbart
n00b
n00b


Joined: 24 Jun 2014
Posts: 23
Location: Sweden

PostPosted: Mon May 25, 2015 4:34 pm    Post subject: Reply with quote

Thanks for all the advice guys :). I see what you mean about iwconfig being relegated to the vaults of history, especially considering how utterly useless it is for wpa authentication. As it turns out, I had linux firmware installed, and despite recompiling my kernel with wireless extensions to make iwconfig happy (which I didn't realise at the time wouldn't be used in the slightest), it turns out that szatox and charles17 were on the right track with simply using dhcpcd and creating a proper entry in init.d for my wlan device.

As I now understand that wpa_supplicant and dhcpcd is all I need to get connected to a wpa-authenticated network, everything's working fine now that I'm talking to my wlan in the right way :p. On a completely unrelated note btw, does anyone happen to know of a quick n' dirty way to apply all currently used flags I've allowed etc-update to set for installing everything I have on here to my @world USE flags, so that when I update @world it will keep everything installed as is, and only update? I've only installed a minimal set of packages, including the barest of X11 environments, chromium and alsa, and have otherwise paid close attention to what I was installing at the time to avoid any unnecessary packages, so I'm happy this setup is as lean as it can be for what its use I have intended. Cheers again :)
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Mon May 25, 2015 5:32 pm    Post subject: Reply with quote

Techbart wrote:
... to set for installing everything I have on here to my @world USE flags, ...

If you want fine grained control of USE flags you'd better delete the USE= line from /etc/portage/make.conf and have all in the /etc/portage/package.use file. See the example in https://wiki.gentoo.org/wiki//etc/portage/package.use
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3105

PostPosted: Mon May 25, 2015 7:30 pm    Post subject: Reply with quote

Techbart, there are dozens of ways to get network up and running. In acse of wireless most of those involve wpa_supplicant, however you can still configure wifi with "iw" instead as long as you don't need WPA. And you don't change networks very often: wpa_supplicant allows you to configure multiple networks, give them priorities and automagicaly connect to the best network available. Wpa_supplicant running as a standalone service will not call dhcp though.
You can have dhcpcd running as a service and it will try being smart with calling wpa_supplicant, configuring wired interfaces and so on. Good thing for most common use cases.
NetworkManager, wicd etc are particularly usefull when you travel a lot and change networks often.
Netifrc (split out of openrc into it's own module) is a way to go for static setups. It has an advantage that you can make miracles with it, but it takes some time and I bet you don't want to do that often.
Good news is you can have multiple ways to configure your network and use one or the other e.g. booting to different runlevels. Let wicd configure network when you're traveling and play router with openrc when you need it. You just most likely don't want to go both ways at the same time, as it would surely conflict in more or less obvious fashion


Quote:
ou want fine grained control of USE flags you'd better delete the USE= line from /etc/portage/make.conf and have all in the /etc/portage/package.use file.

if you want THIS fine grained control you'd better gone for LFS rather than gentoo :lol: /etc/portage/package.use is for exceptions, not for rules
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Tue May 26, 2015 8:36 am    Post subject: Reply with quote

Techbart wrote:
a quick n' dirty way to apply all currently used flags

Code:
emerge -avuDN world
Back to top
View user's profile Send private message
Techbart
n00b
n00b


Joined: 24 Jun 2014
Posts: 23
Location: Sweden

PostPosted: Tue May 26, 2015 11:34 am    Post subject: Reply with quote

Once again, ossum tips guys :). To be honest, I'm quite happy sticking with wpa_supplicant for wpa, as it feels both secure enough (so long as I lock down its conf file) and flexible enough to handle multiple networks of that type, without needing a ton of packages to support it like Network Manager or WICD. For everything else wireless, iw and netifrc seem fine. While I am using X11 for casual web browsing and watching some vids, I'm trying my best to keep to a shell, as I'm treating this all as a learning process, and would rather do the heavy lifting myself wherever I can :).

As for handling USE flags, package.use was what I was looking for, as I would rather keep the setup I currently have as strict as possible. I fully get how useful keeping a set of global flags that allow for certain types of package or technology can be, but as I have very limited power to play around with on this netbook, I'd rather spend more time managing what goes or stays (LFS probably would have been ideal for this approach, but I like the Gentoo community :)).

With regard to emerge's -avuDN world option, a quick look at emerge's manpage has revealed that this will effectively handle what I was asking for, - only to update packages I have with dependencies, and leave everything else be - but in your opinion, as I only have ~60 packages installed on top of Gentoo core, do you think it would be worth spending the time to list these packages in package.use, and just emerge @world, or use -avuDN and keep my options open without going full concentration camp on it?
Back to top
View user's profile Send private message
Techbart
n00b
n00b


Joined: 24 Jun 2014
Posts: 23
Location: Sweden

PostPosted: Tue May 26, 2015 11:38 am    Post subject: Reply with quote

Just wanted to quickly say thanks again for the help and advice, and apologies for being so nitpicky...a symptom of OCD and self-guilt at not learning the basics sooner I guess :p
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Tue May 26, 2015 12:24 pm    Post subject: Reply with quote

Techbart wrote:
do you think it would be worth spending the time to list these packages in package.use, and just emerge @world, or use -avuDN and keep my options open without going full concentration camp on it?

With only system plus ~60 packages, you'd need only few lines in /etc/portage/package.use as very many USE flags are enabled by the profile (eselect profile list).
You could check by commenting out everything in package.use and then emerge --info | grep USE=
Back to top
View user's profile Send private message
Techbart
n00b
n00b


Joined: 24 Jun 2014
Posts: 23
Location: Sweden

PostPosted: Tue May 26, 2015 3:13 pm    Post subject: Reply with quote

Ossum! And with that I should be fully armed to get this system ready for an overly-obsessive control freak :p Cheers again all.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Tue May 26, 2015 6:55 pm    Post subject: Reply with quote

Techbart wrote:
With regard to emerge's -avuDN world option, a quick look at emerge's manpage has revealed that this will effectively handle what I was asking for, - only to update packages I have with dependencies, and leave everything else be - but in your opinion, as I only have ~60 packages installed on top of Gentoo core, do you think it would be worth spending the time to list these packages in package.use, and just emerge @world, or use -avuDN and keep my options open without going full concentration camp on it?

You always want to run emerge -avuDN @world to bring the packages on your system into line with the configuration.
To bring everything up to date (not just the packages you use, but also the build-tools) add: --with-bdeps=y
Note: do not use that as a default option; see man emerge for explanation.

Also, you probably don't need netifrc at all.
Back to top
View user's profile Send private message
Techbart
n00b
n00b


Joined: 24 Jun 2014
Posts: 23
Location: Sweden

PostPosted: Fri May 29, 2015 11:33 am    Post subject: Reply with quote

Cheers for the bdeps tip and generally confirming a safe way to update without unmerging stuff I want to stay :). And yup, see what ya mean about netifrc, haven't really found a need to use it once so far outside of initially setting up the system. So yup, everything's working great now, even made a stage4 in case I happen to bodge it later :)
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