# This network configuration was written by net-setup
modules="wpa_supplicant"
wpa_supplicant_eth0="-rtl8187
config_wlan0="dhcp"
config_eth1="dhcp"

Do you have 3 network interfaces in this box? You've used eth0, eth1, wlan0 in this configuration

Quote:

wpa_supplicant_eth0="-rtl8187

Is possibly supposed to be

Code:

wpa_supplicant_wlan0="-Dnl80211"

or possibly -Dwext
I don't think the driver in this context is meant to explicitly match the kernel module in use, and I think nl80211 is the
preferred driver - wext may be better for your card if it's older as that is the generic driver. You can issue

Code:

wpa_supplicant -h

to see a list of available drivers.

In your wpa_supplicant.conf you have

Quote:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel

listed twice uncommented. Probably not a big deal but you don't need it twice.

Yeh- I'm also wondering why abraxa5 put in the actual driver module name. The kernel should load it automatically, if it's in the kernel config as a module.
I've never had to put any adapter driver in wpa_supplicant config files. It loads my usb realtek r8712u driver at boot. My r8712u usb device needs additional firmware, but I'm not sure about the RTL8187 Wireless Adapter. Wouldn't surprise me if it does. Look in /lib/firmware, and see it you have it. If not, that might be the main problem, assuming it does need firmware.

Also, does lsmod confirm 8187 is actually loaded? Any clues in dmesg about what's happening when it loads?

This will attempt to start the wireless connection (interface wlan0), with the wpa_supplicant.conf as its configuration file
and using the first driver that is able to initialize the interface (nl80211 or wext) and it won't background.
So you can see if it works, or possibly where it's failing, on the command line.

Once it's working then you can make sure the /etc/conf.d/net is configured, and relevant symlinks in /etc/init.d/ (such as net.wlan0)
are in the proper runlevels so that it works on restarts going forward.

Do you have 3 network interfaces in this box? You've used eth0, eth1, wlan0 in this configuration

I have 2 ethernet nics built in. I have a built in wifi card with bluetooth as well which is the ASUS wifi-go (broadcom chipset I believe). I am having trouble getting linux to even see (I can't find it on an lspci, but I didin't look hard either). I am also using an ALFA wireless nic (supports injection). So... I have 3 + 1 usb. I use my usb one a lot since it supports injection and I play with Backtrack's wireless stuff sometimes on my laptop.

wrc1944 wrote:

Yeh- I'm also wondering why abraxa5 put in the actual driver module name. The kernel should load it automatically, if it's in the kernel config as a module.

Lol, because that is what I thought it was asking for. I did compile those drivers directly into the kernel, and not into modules. It seems to work though.

Quote:

I've never had to put any adapter driver in wpa_supplicant config files. It loads my usb realtek r8712u driver at boot. My r8712u usb device needs additional firmware, but I'm not sure about the RTL8187 Wireless Adapter. Wouldn't surprise me if it does. Look in /lib/firmware, and see it you have it. If not, that might be the main problem, assuming it does need firmware.

I did not have to do any kind of firmware updating of it, unless it did automaticlly when I updated world, but I don't see it doing that.

Quote:

Also, does lsmod confirm 8187 is actually loaded? Any clues in dmesg about what's happening when it loads?

No, but like I said, I compiled the drivers into the kernel.

After changing the id_str and fixing the eth0 to wlan0 (what was I thinking), it worked. Thank you very much for your help.

ps. This may be one of the most friendly forums I have been to. Since gentoo has a larger learning curve then I am used to, it helps a lot.

Ok, so after I run wpa_supplicant -iwlan0 -Dnl80211,wext -c/etc/wpa_supplicant/wpa_supplicant.conf
wpa_gui then works, when it is running in terminal. any idea how to get it working without running that command first?

You might test that command with -Dnl80211 or -Dwext only, unless it's apparent from the output which of the
two drivers are actually used. Although you could probably just continue to use both and it will use the first
one that works. (They might both work, but you really only need either nl80211 or wext.)

Then you should just need /etc/conf.d/net to contain

Code:

modules="wpa_supplicant"
wpa_supplicant_wlan0="-Dnl80211,wext" ## If you figured out which -Dnl80211 or -Dwext would be sufficient here
config_wlan0="dhcp"

Then you should have a symlink at /etc/init.d/net.wlan0 that points to /etc/init.d/net.lo
If it doesn't already exist, create it with

Code:

ln -s /etc/init.d/net.lo /etc/init.d/net.wlan0

Now you should be able to manually start wireless with

Code:

/etc/init.d/net.wlan0 start

If you get errors stop and post them, otherwise:
If that starts and works you may need to add it to the default runlevel

Code:

rc-update add net.wlan0 default

It will now start in the default runlevel whenever you boot your computer, so you don't have to issue commands
to start it on subsequent boots.

abraxa5,
I don't understand why you have anything related 80211 item in your /etc/conf.d/net file (or do you still have that)? Using wpa_supplicant on many different distros and installations, I've never had to add that.

Try using exactly what I have posted above for your /etc/conf.d/net file, in other words just have the 2nd line read:

Check your /etc/wpa_supplicant/wpa_supplicant.conf to make sure it's correct, and check with rc-update show to see if net.wlan0 is at the default run level.

Then reboot. If that doesn't work, please post your two current wpa related files, and the output of rc-update show.

One other thought. You said you had your rtl8187 driver compiled into the kernel, and not as a module. Sometimes for certain things it's better to have things as modules. This is usually true with alsa sound, for example, and more than a few others. In general, it's better to only compile directly into the kernel things that are absolutely needed in order to boot the machine to an operational state, such as file system support, etc., and do other things as modules where the kernel will detect and load what it finds it needs. Of course there are exceptions._________________Main box- AsRock x370 Gaming K4
Ryzen 1700, 3.0GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
Gentoo ~amd64 plasma, glibc-2.26-r5, gcc-7.3.0 kernel-4.15.4-gentoo USE=experimental

abraxa5,
I don't understand why you have anything related 80211 item in your /etc/conf.d/net file (or do you still have that)? Using wpa_supplicant on many different distros and installations, I've never had to add that.

@wrc1944
nl80211 is just another driver for wpa_supplicant, much like wext. From some documentation I read nl80211 is newer (I can't speak to better).
From Here.

Quote:

nl80211 is the new 802.11 netlink interface public header. Together with cfg80211 it is intended to replace Wireless-Extensions

I use nl80211 on my wireless centrino card and it works flawlessly, with no mention of wext at all. But abraxa5 got the idea from me :)

@abraxa5
By all means try wrc1944 suggestions too, I'm no guru.

Part of the reason it's possible you cannot surf / torrent etc. after running the command

is that command doesn't obtain an ip address - it only establishes the wireless connection to your router.
You would need to request / assign the ip separately, in that type of manual connection, perhaps "dhcpcd wlan0"
If the /etc/init.d/net.wlan0 start had worked, it would have obtained an ip address for you because of the /etc/conf.d/net configuration.
That's what the config_wlan0="dhcp" does, but that is not parsed if you manually run wpa_supplicant

I don't have the wpa_cli configured in my wpa_supplicant.conf so I don't have an experienced answer for that. It's related to this line in your config

Code:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel

If you're configuring a desktop and just need to access your home wireless router, you could consider commenting this line. Although that's not a real solution :D
You could also perhaps set the GROUP=root and see if the error persists, if not that might hint at a permission problem somewhere.

Also in case it needs to even be said, if you're running wpa_supplicant from the command line (manually) be sure to stop it before you attempt
/etc/init.d/net.wlan0 start

@Odward,
Thanks for the link- I didn't know much about the nl80211 driver, which brings up this question. I read that the rtl8187 is not one of the latest driver/chipsets, so I'm wondering if perhaps trying to use the newer nl80211 with 8187 dependent hardware could be causing problems.

The reason I suspect this is because when kernel-3.2.x was released I started having serious problems with my usb r8712u (from kernel staging drivers) dependent adapter. The problems consisted of not being able to consistently connect, or when it did I had constant dropping of the connection. and very weak connections. I knew my hardware and configurations were correct, because if I used any 3.1 kernel, everything was rock solid with 100% connection quality, using wpa_supplicant, NetworkManager, or wicd. I could even replace any 3.2 kernel's wireless r8712u source directory with any 3.1 version, and then recompile the 3.2 kernel using 3.2 r8712u source, and everything went back to being perfect. Also, if I used other adapters, with either ralink or ath9k chips/drivers, all was well. They were already configured in the kernel as modules, so the kernel sorted it all out, and auto-loaded the appropriate driver Obviously, this confirmed even slight changes between kernel source code versions (3.1 and 3.2) can have major impact on this kind of stuff.

I finally contacted the linux kernel's wireless driver maintainer, and wound up being one of a few r8712u adapter users who were helping test his patches, which were eventually included in the >3.3 and 3.4 mainstream kernel. This process took weeks, and many kernel re-compiles, but I learned a lot. However, please don't take that to mean I'm even close to being an expert on this!

I basically agree with all Odward has mentioned, and here are some other thoughts:
I guess the bottom line here is that since the usual fixes don't seem to be working, I think we need to examine abraxa5's kernel config, and know what kernel version he's running.

If available, he could try another usb adapter using a different chip and driver, and see if it works with his wpa_supplicant configs. Might require configuring a module into the kernel. If a different adapter works, this would confirm if it is or isn't an rtl8187 device and/or driver problem.

In fact, he should probably re-complie his rtl8187 as a kernel module anyway. This might be one of those cases where it's better to have it as a module.

Still haven't seen if dbus is started before wlan0 in rc-update show. That might be important.