# Getting wireless to work after fresh install on EeePC

## Techbart

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.

----------

## szatox

 *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  :Wink: 

----------

## Techbart

Thanks for the quick reply  :Smile: .  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.

----------

## charles17

 *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

----------

## The Doctor

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.

----------

## steveL

I'd go with what charles17 said about dhcpcd and wpa-supplicant.

----------

## Techbart

Thanks for all the advice guys  :Smile: .  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  :Smile: 

----------

## charles17

 *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

----------

## szatox

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  :Laughing:   /etc/portage/package.use is for exceptions, not for rules

----------

## steveL

 *Techbart wrote:*   

> a quick n' dirty way to apply all currently used flags

 

```
emerge -avuDN world
```

----------

## Techbart

Once again, ossum tips guys  :Smile: .  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  :Smile: .  

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  :Smile: ).

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?

----------

## Techbart

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

----------

## charles17

 *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=

----------

## Techbart

Ossum!  And with that I should be fully armed to get this system ready for an overly-obsessive control freak :p  Cheers again all.

----------

## steveL

 *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.

----------

## Techbart

Cheers for the bdeps tip and generally confirming a safe way to update without unmerging stuff I want to stay  :Smile: .  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  :Smile: 

----------

