# [SOLVED] Cannot connect Wireless

## athena810

Hey, sorry to be spamming the threads again with my n00b questions. 

So anyways, I've been trying to connect wirelessly but nothing seems to work.  I thought it was a kernel driver problem. So, i downloaded and installed a different one (r8101). 

However; that really did not fix anything. I emerged wireless-tools and wpa_supplicant and I'm pretty sure I configured them right. DHCPCD works with a wired connection but not wirelessly.

I'm really not sure where I went wrong. I thought it was the driver but now that the driver is working, the wireless connection still doesnt work. 

Also strangely, everytime I reboot, resolv.conf deletes my previous entries in it and all there's left is comments. I blacklisted my old driver too just to make sure. I honestly don't know where to go from now. 

(Also, links doesn't work anymore but it works in the livecd...how do i browse the internet now?)Last edited by athena810 on Sat Jun 30, 2012 1:06 am; edited 2 times in total

----------

## The Doctor

1) wpa_supplicant is a pain in the arse to use. Using something else like wicd or networkmanager is much easier.

2) resolve.conf does that. DHCPCD clears the file each time its run. If you read the comments one of them should instruct you to use another file, namely resolv.conf.head to write any persistent changes you wish to make.

If I where you I would triple check that I was using the right driver and also I would check to see if it requires firmware.

----------

## NeddySeagoon

athena810,

 *athena810 wrote:*   

> Hey, sorry to be spamming the threads again with my n00b questions. 

 

We were all noobs once - there is no shame in that.

 *athena810 wrote:*   

> So anyways, I've been trying to connect wirelessly but nothing seems to work.  I thought it was a kernel driver problem. So, i downloaded and installed a different one (r8101).

 

Lets start at the beginning.  You have a lot of modules you need in your kernel for wireless support, not just the module for your hardware. Depending on your device you may need firmware to.

A good start would be for you to post the output of

```
lspci
```

 and 

```
lspci -nn
```

this will tell us about your hardware.

 *athena810 wrote:*   

> However; that really did not fix anything. I emerged wireless-tools and wpa_supplicant and I'm pretty sure I configured them right. DHCPCD works with a wired connection but not wirelessly. 

 

wireless-tools is a good diagnostic aid and will get you connected if your wireless is unencrypted or uses WEP. Foe other encryption your need wpa_supplicant.

 *athena810 wrote:*   

> I'm really not sure where I went wrong. I thought it was the driver but now that the driver is working, the wireless connection still doesnt work.

 If your wireless is not working, how do you kow the driver works?

Do you see any wireless related messages in

```
dmesg
```

 *athena810 wrote:*   

> Also strangely, everytime I reboot, resolv.conf deletes my previous entries in it and all there's left is comments. I blacklisted my old driver too just to make sure. I honestly don't know where to go from now.

 dhcpcd populates /etc/resolv.conf as part of your network setup, but only if it can contact a dhcp server, which its can't unless either your wireless works or your wired is connected. 

 *athena810 wrote:*   

> (Also, links doesn't work anymore but it works in the livecd...how do i browse the internet now?)

 

Go back to a wired connection meanwhile.

----------

## athena810

penguin swordmaster,

I did triple check I actually followed these instructions. http://en.gentoo-wiki.com/wiki/Realtek_RTL8101E\

EDIT: also, i would use wicd but I've had some very bad experiences with it. And I've tried network manager but it doesnt work well for me. Also, I haven't gotten around to figuring out how to setup a desktop environment yet.

NeddySeagoon,

Yeah, actually i've been looking around at some previous threads and some peeple did mention firmware. 

I'm gonna post lspci and lspci -nn but I have no way of copying and pasting it so I'll have to type it up which could take a while.

```

00:00.0 0600: 8086:0066 (rev 02) 

00:02.0 0300: 8086:0046 (rev 02) 

00:16.0 0780: 8086:3b64 (rev 06) 

00:1a.0 0c03: 8086:4b4c (rev 05) 

00:1b.0 0403: 8086:3b56 (rev 05) 

00:1c.0 0604: 8086:4b42 (rev 05) 

00:1c.2 0604: 8086:3b46 (rev 05) 

00:1c.4 0604: 8086:3b4a (rev 05) 

00:1d.0 0c03: 8086:3b34 (rev 05) 

00:1e.0 0604: 8086:2448 (rev 05) 

00:1f.0 0601: 8086:3b09 (rev 05) 

00:1f.2 0106: 8086:3b29 (rev 05) 

00:1f.3 0c05: 8086:3b30 (rev 05) 

00:1f.6 1180: 8086:3b32 (rev 05) 

01:00.0 0200: 103c:8136 (rev 05) 

02:00.0 0280: 1814:5390 

03:00.0 ff00: 10ec:5209 (rev 01) 

ff:00.0 0600: 8086:2c62 (rev 05) 

ff:00.1 0600: 8086:2d01 (rev 05) 

ff:02.0 0600: 8086:2d10 (rev 05) 

ff:02.1 0600: 8086:2d11 (rev 05) 

ff:02.2 0600: 8086:2d12 (rev 05) 

ff:02.3 0600: 8086:2d13 (rev 05) 

```

http://kmuto.jp/debian/hcl/

^ Will that work for identifying hardware or should I type out lspci?

My router uses WEP hex but just in case I emerged bot of them. 

In dmesg is really long but at the bottom there is 

```

r8101: eth0 link down

ADDRCONF(NETDEV_UP): eth0: link not ready

kworker/u:0 used greatest stack depth:3400 bytes left

```

Then there's a lot of messages that say:

```

Unknown key pressed (translated set 2, code 0xab on isa0060/serio0)

```

and that messages repeats a LOT. 

Also it says that the identified chip is RTL8105E and which is weird because mine is RTL8101E...but I doubt it makes much of a difference.

And links doesn't work in a wired connection either. Neither does net-setup eth0 <- but I don't think its suppose to work anyway.

----------

## NeddySeagoon

athena810,

The Debian page says

```
 18145390   Yes   Ralink corp.   RT5390 Wireless 802.11n 1T/1R PCIe   rt2800pci   v3.0.0-
```

So the driver has only been added to the kernel since kernel 3.0

Under Wireless, you will need

```
<*>   cfg80211 - wireless configuration API

<*>   Generic IEEE 802.11 Networking Stack (mac80211)  

[*]   Minstrel     

        [*]     Minstrel 802.11n support

[*]   Enable LED triggers
```

Under  Network device support     

```
[*]   Wireless LAN  --->   

<M>   Ralink driver support  ---> 

<M>   Ralink rt27xx/rt28xx/rt30xx (PCI/PCIe/PCMCIA) support

  <*>rt2800pci - Include support for rt53xx devices (EXPERIMENTAL) 
```

The use of modules here is important.

You should not need firmware. Thats very rare in PCIe devies.

You may need/want rfkill support. Thats more kernel options and a user space tool.

All of the above should get your wlan0 to appear in

```
ifconfig -a
```

 once that happens its all down to configuration.

Rebuild your kernel with the options above, reboot into it - check the timestamp in

```
 uname -a
```

and run

```
ifconfig -a
```

Making it work, after your wireless interface appears is another step.  

Don't even think about a GUI tool until it works. They all need the kernel to be right and they all use wpa_supplicant.

You are not at that stage yet.

----------

## athena810

For Wireless I have the first two but not Ministrel or Ministrel 802.11n support and I have Enable LED triggers. 

There's a 

Default rate control algorithm (Ministrel)

I'm rebuilding and rebooting now.

uname -a returns

```
Linux localhost 3.3.8-gentoo #1 SMP mon jun 25 16:59:18 EDT 2012 x86_64 Intel(R) Core(TM) i3 CPU 370 @ 2.40GHz GenuineIntel GNU/Linux
```

i don't think it worked. in ifconfig -a

there's an eth0, gre0,lo,sit0,tun10.

A ping to google.com still returns

ping: unknown host google.com

When typing dhcpcd, i get a 

```

version 5.2.12 starting

no interfaces have a carrier

forked to background, child pid 1990

```

----------

## NeddySeagoon

athena810,

Can you get on a wired network or boot with a CD that does support your wireless.

System Rescue CD probably does.

That will allow your to chroot into your system and use wgetpaste to post accurately without copy typing.

Your uname -a is good 

```
mon jun 25 16:59:18 EDT 2012
```

is the build time of the kernel. Adding on 5 hours for me, shows the kernel was built about 30 min ago.

----------

## athena810

I can get a wired network but not a wireless. 

I can't get a wireless on the installation CD either (but I can get a wired connection) and the graphics on the rescue CDs typically don't work well for me. My graphic drivers are crap. 

links doesn't work for me so I'll use the installation CD.

Wait...I can copy and paste to here? how?

----------

## NeddySeagoon

athena810,

The liveCD has a programe called wgetpaste. When you have a network connection, you can emerge it.

There are two formats to the command.

```
wgetpaste /path/to/file

command | wgetpaste
```

The first puts a file on the web, the latter sends the output of command to the web.

You post the URLs.

```
dmesg | wgetpaste
```

 would be good, to see what happens with your wireless on startup.

----------

## athena810

for lspci 

```

00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 02)

00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02)

00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)

00:1a.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)

00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 05)

00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 05)

00:1c.2 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 3 (rev 05)

00:1c.4 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 5 (rev 05)

00:1d.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a5)

00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 05)

00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA AHCI Controller (rev 05)

00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 05)

00:1f.6 Signal processing controller: Intel Corporation 5 Series/3400 Series Chipset Thermal Subsystem (rev 05)

01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 05)

02:00.0 Network controller: Ralink corp. RT5390 Wireless 802.11n 1T/1R PCIe

03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader (rev 01)

ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 05)

ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 05)

ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 05)

ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 05)

ff:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 05)

ff:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 05)

```

Here's for dmesg, it's really long.

https://gist.github.com/3007344

----------

## BillWho

athena810,

Did you setup the symlink to net.lo and add it to the default runlevel   :Question: 

----------

## athena810

no, I don't think so, how do i do that?

----------

## BillWho

athena810,

You should go through this http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=4 and possibly http://en.gentoo-wiki.com/wiki/Wireless/Configuration

----------

## athena810

I did everything. Still no wlan0 there. So this would mean that my driver is not configured correctly and/or does not support my device.

Nevermind, there's a wlan0 but the fact remains that the wireless still does not work...

When typing iwconfig

```

wlan0      IEEE 802.11bgn ESSID:off/any

               Mode:Managed Access Point: Not-Associated Tx-Power=0 dBm

               Retry long limit:7   RTS thr:off   Fragment thr:off

               Encryption key: off

               Power Management: off

```

Also, I think dhcpcd just crashed. i typed in dhcpcd and it said

```
dhcpcd[2801]: version 5.2.12 starting
```

Then nothing...no prompt or anything.

----------

## khayyam

 *athena810 wrote:*   

> [...] Nevermind, there's a wlan0 but the fact remains that the wireless still does not work...

 

OK ... you said your AP uses WEP, correct? Add the following to /etc/wpa_supplicant/wpa_supplicant.conf

```
network={

       ssid="YOUR_AP_NAME" <= EDIT

       scan_ssid=1

       key_mgmt=NONE

       wep_key0=YOUR_KEY <= EDIT 

       wep_tx_keyidx=0

}
```

Next, sym (symbolic) link net.lo to net.wlan0

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

Next, configure how the interface is handled in /etc/conf.d/net (it will probably work without this, but for the sake of providing a complete explanation, I'll at least provide some basic stanzas)

```
modules_wlan0="wpa_supplicant dhcpcd"

wpa_timeout_wlan0="15"

config_wlan0="dhcp"
```

You can now start the interface/network ...

```
% /etc/init.d/net.wlan0 start
```

You may see "WARNING: wlan0 has started, but ..." don't worry, its just letting you know that it isn't hanging arround to see if the connection is successful or not.

It should only take a few seconds (dependent on how long the negociation takes to happen) but you should get connected to the AP and it provide you with an IP address. You can check with the following (and you should see similar output) 

```
% ip a l wlan0

2: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000

    link/ether a8:a1:a2:93:21:43 brd ff:ff:ff:ff:ff:ff

    inet 192.168.2.153/24 brd 192.168.2.255 scope global wlan0
```

Now ping your favorite host ...

```
ping -c 1 forums.gentoo.org
```

 *athena810 wrote:*   

> Also, I think dhcpcd just crashed. i typed in dhcpcd and it said dhcpcd: version 5.2.12 starting. Then nothing...no prompt or anything.

 

Na, its just backgrounded.

HTH & best ...

khay

----------

## athena810

Khayyam,

Thanks for helping me out but I think the dhcp actually kinda crashed beause I turned my computer off and restarted it and I got endless lines of

```

udevd[1223]: timeout: killing '/sbin/modprbe -bv pco:v00001814d00005490sv0000103Csd00001636bc02sc80i00' [1244]

```

Amd yeah the same lines keep repeating and has been repeating for the past 20 minutes  :Sad: 

So, uh, what went wrong?

----------

## NeddySeagoon

athena810,

```
v00001814d00005490
```

is the vendor and device ID of your wireless.

It looks like something went wrong with loading the kernel modue and the kernel cannot recvover.

Boor with a liveCD, mount your root at /mnt/gentoo,

Look for your kernel module somewhere in /mnt/gentoo/lib/modules/<kernel-ver>/...  and rename it from <whatever>.ko to <whatever>.ko_broken so it can't be loaded.

Reboot normally.  Now the hard bit, rename the module back to its real name and try to modprobe it by hand.

If that works, can you start wlan0 by hand?

If that crash on boot is repeatable, try a different kernel version.

----------

## athena810

Neddy,

hey, I'm in /mnt/gentoo/lib/modules/3.3.8-gentoo and it's filled with files named 'modules.[something]'/ And none of them end in .ko

There's another directory called kernel and there's four directories in there called arch, drivers, fs, lib, net.

Each of them have more directories ending in various files with the ending of .ko

I think r8101 is the kernel driver that we're looking for because when I modprobed it, the entire thing crashed. Strangely, the directory is in localhost because I downloaded it from the net as a tar.bz2 file and had extracted it in localhost.

I found r8101.ko in /mnt/gentoo/r8101-1.022.00/src

EDIT: Well, that didn't work. I still got the same error message.

----------

## NeddySeagoon

athena810,

Put your kernel version into /mnt/gentoo/lib/modules/<your-kernel>/kernel/drivers/net/wireless/

In fact, changing the wireless part of the name there would prevent the module being loaded.

----------

## athena810

In 

/mnt/gentoo/lib/modules/<your-kernel>/kernel/drivers/net/wireless/ 

there's a directory called rt2x00,

in that directory there's a 

rt2800lib.ko, rt2800pci.ko, rt2xoolib.ko, rt2x00pci.ko.

When I lspci -knn, it says that the kernel driver in use is r8169...I think it's because i marked the r8101 kernel as broken so it didn't load but I don't think the r8101 driver was the problem.

So, I copied the entire r8101-1.022.00 directory from the /mnt/gentoo to the /mnt/gentoo/lib/modules/3.3.8-gentoo/kernel/drivers/net/wireless directory. So currently in my wireless directory, there are two directories. 

Which am I suppose to mark as broken?

----------

## NeddySeagoon

athena810,

r8169 or r8101 is the driver for your wired interface.

 *athena810 wrote:*   

> /mnt/gentoo/lib/modules/<your-kernel>/kernel/drivers/net/wireless/ 
> 
> there's a directory called rt2x00, 

 

rename (mv) the directory called rt2x00,  that will stop the .ko files inside being found until you name it back.

----------

## athena810

I rebooted it and now it's stuck on 

```
Bringing up interface lo
```

And the same error message is still there except now it has variations and it's not constantly printing it.

It's now printing the message

```

[    664.899134] atkbd serio0: Unknown key pressed (translated set 2, code 0xab on isa0060/serio0).

[    664.900732] atkbd serio0: Use ` setkeycodes e02b <keycode>' to make it known.

[    664.911198] atkbd serio0: Unknown key released (translated set 2, code 0xab on isa0060.serio0)

```

And it kinda repeats but now it's stopped. There's about 12 lines of these.

----------

## athena810

Should I just re-install gentoo? I don't think I can fix this.

----------

## BillWho

In menuconfig you should have your wireless set like this - unset anything that's not needed:

                                                             <M>   Ralink rt27xx/rt28xx/rt30xx (PCI/PCIe/PCMCIA) support                                                                          │ │  

  │ │                                                               [ ]     rt2800pci - Include support for rt33xx devices                                                                               │ │  

  │ │                                                               [ ]     rt2800pci - Include support for rt35xx devices (EXPERIMENTAL)                                                                │ │  

  │ │                                                               [*]     rt2800pci - Include support for rt53xx devices (EXPERIMENTAL) (NEW)                                                          │ │  

  │ │

Double check it and recompile before you blow it away - make && make modules_install

----------

## athena810

I think I know why renaming rt2x00 didn't work, it was because I wasn't chrooted. 

Good news, it works now.

So I realized that the r8101 thing should not be in wireless so i removed it and copied it to /lib/modules/3.3.8-gentoo/kernel/drivers/net/ethernet/realtek.

I realize that r8101 is unlrealted to wireless. 

modprobing rt2x00 does not work...and I'm not sure if I was suppose to modprobe it either. The HWaddr for eth0 and wlan0 is different. Is that weird or are they referring to the HWaddr for the router? 

dhcpcd now returns

```

version 5.2.12 starting

wlan0: up_interface: No such file or directory

no interfaces have a carrier

forked to background child pid 1993

```

(Something weird, everytime I reboot, the kernel driver goes back to r8169. I found the file and I renamed it but I still have to ./autorun.sh r8101 everytime. But  I think it should work now since there is now a r8101.ko. ) 

Anyways thanks for your help. I really appreciate it.Last edited by athena810 on Fri Jun 29, 2012 2:08 am; edited 1 time in total

----------

## BillWho

athena810,

For future reference you can prevent a module from being loaded by blacklisting it either in /etc/modprobe.d/blacklist.conf or the kernel line with modprobe.blacklist=modname1,modname2,modname3

To prevent a module from ending up in the kernel's modules directory, don't have it compile   :Very Happy: 

----------

## athena810

BillWho,

Thanks:)

Does anyone know why wireless still doesn't work? i mean there is a wlan0 so it's not a driver problem. ping still returns an 'unknown host'. And a ping to the router is still an 'unreachable network'. I don't get what the problem is. It kinda sucks how it still doesn't work.

----------

## athena810

 *khayyam wrote:*   

>  *athena810 wrote:*   [...] Nevermind, there's a wlan0 but the fact remains that the wireless still does not work... 
> 
> OK ... you said your AP uses WEP, correct? Add the following to /etc/wpa_supplicant/wpa_supplicant.conf
> 
> ```
> ...

 

I did everything but when I /etc/init.d/net.wlan0 start I got an

```

Could not set interface wlan0 flags: no such file or directory

Failed to initialize driver interface

*  start-stop-daemon: failed to start `/usr/sbin/wpa_supplicant'

*ERROR: net.wlan0 failed to start

```

Mty /etc//conf.d/net reads:

```

config eth0="dhcp"

modules="iwconfig"

modules_wlan0="wpa_supplicant dhcpcd"

wpa_timeout_wlan0="15"

config_wlan0="dhcp"

modules="wpa_supplicant"

wpa_supplicant_eth0="-rt2x00"

```

Is this right?

----------

## BillWho

athena810,

What does your /etc/conf.d/net and /etc/wpa_supplicant/wpa_supplicant.conf look like   :Question: 

----------

## athena810

/etc/conf.d/net is 

```
config eth0="dhcp" 

modules="iwconfig" 

modules_wlan0="wpa_supplicant dhcpcd" 

wpa_timeout_wlan0="15" 

config_wlan0="dhcp" 

modules="wpa_supplicant" 

wpa_supplicant_eth0="-rt2x00" 
```

{not incluing comments}

/etc/wpa_supplicant/wpa_supplicant.conf looks like

```

network={

       ssid="PXWL2"

       scan_ssid=1

       key_mgmt=NONE

       wep_key0=8F1C300567

       wep_tx_keyidx=0

}

```

(lol, i figured that no one here probably will get the change to use my router anyway)

----------

## khayyam

athena810 ...

You have some duplicate definitions ("modules=" is defined twice), this isn't the cause of your problem but for future reference:  "modules=" will apply to all interfaces, modules_wlan0= will apply to the interface wlan0, etc. That said, it looks like you need to provide the driver backend that wpa_supplicant should use, I imagine this will be 'wext' (the generic linux wireless extensions).

So, as far as configuring wlan0 the following should solve the current issue: 

```
modules_wlan0="wpa_supplicant dhcpcd"

wpa_supplicant_wlan0="-Dwext"

wpa_timeout_wlan0="15"

config_wlan0="dhcp"
```

HTH & best ...

khay

ps. If your using WEP I could aquire the passphrase in about 3 or 4 minutes, its not in the least bit secure, so you might as well post it on the internet :)

----------

## athena810

Thanks khayyam,

Unfortunately, the problem persists. Same error as last time. 

```
Could not set interface wlan0 flags: no such file or directory 

Failed to initialize driver interface 

*  start-stop-daemon: failed to start `/usr/sbin/wpa_supplicant' 

*ERROR: net.wlan0 failed to start 
```

----------

## BillWho

Did you ever emerge net-wireless/wpa_supplicant   :Question: 

----------

## athena810

BillWho,

yep, I have the directory.

----------

## BillWho

As root user in the terminal, what does

```
whereis wpa_supplicant
```

 return  :Question: 

----------

## athena810

/usr/sbin/wpa_supplicant

/etc/wpa_supplicant

/usr/share/man/man8/wpa_supplicant.8.bz2

--------------------I don't think this is the problem, my wireless had not work in Ubuntu either but works in Windows.-------

----------

## khayyam

athena810 ...

I haven't been following this thread that closely ... how did you install the RT5390 driver, you used the driver included in the 3.x kernel sources? 

Also please post the output of the following:

```
% ip a

% awk '/wpa/' /var/log/messages

% awk '/RT5390/,/Kernel/' <(lspci -k)
```

best ... khay

----------

## athena810

Khayyam,

I don't think I installed it, I think it was the default driver.

ip a

```
bash: ip command not found
```

awk '/wpa/' /var/log/messages

```

June 29 17:06:12 localhost /etc/init.d/net.wlan0[3691]: start-stop-daemon: failed to start '/usr/sbin/wpa_supplicant'

June 29 17:11:03 localhost /etc/init.d/net.wlan0[3902]: start-stop-daemon: failed to start '/usr/sbin/wpa_supplicant'

June 29 17:11:39 localhost /etc/init.d/net.wlan0[4101]: start-stop-daemon: failed to start '/usr/sbin/wpa_supplicant'

June 29 18:37:10 localhost /etc/init.d/net.wlan0[4407]: start-stop-daemon: failed to start '/usr/sbin/wpa_supplicant'

```

awk '/RT5390/,/Kernel/' <(lspci -k)

```

02:00.0 Network controller: Ralink corp. RT5390 Wireless 802.11n 1T/1R PCIe

            Subsystem: Hewlett-Packard Company U98Z077.00 Half-size Mini PCIe Card

             Kernel driver in use: rt2800pci

```

----------

## BillWho

Try this at the cl and paste back some (not all) of the messages

```
wpa_supplicant -iwlan0 -d -Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf
```

For /sbin/ip

```
emerge sys-apps/iproute2
```

----------

## athena810

```

Initializing interface 'wlan0' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'

Configuration file '/etc/wpa_supplicant/wpa_supplicant/conf'->' /etc/wpa_supplicant/wpa_supplicant.conf'

Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf'

Priority group 0

   id=0 ssid=PXWL2

WEXT: cfg80211-based driver interface

Could not set interface wlan0 flags: No such file or directory

Failed to initialize driver interface

Failed to add interface wlan0

Cancelling scan request

Cancelling authentication timeout

```

I can't emerge but I can make a wired connection and emerge then.

----------

## khayyam

 *athena810 wrote:*   

> I don't think I installed it, I think it was the default driver.

 

athena810 ... sorry? As I said I've not been following this thread that closely, so your not booted into an install with your own custom kernel?

 *athena810 wrote:*   

> 
> 
> ```
> $ ip a
> 
> ...

 

hmmm ... I thought iproute2 was part of system, must not be. In which case, post the output of iwconfig or ifconfig. 

 *athena810 wrote:*   

> 
> 
> ```
> 02:00.0 Network controller: Ralink corp. RT5390 Wireless 802.11n 1T/1R PCIe
> 
> ...

 

OK, does this particular driver require mircocode/firmware? ... a quick search suggests it does, you need to install net-wireless/ralink-firmware.

EDIT: sorry, that package is only in the pentoo overlay ... you need to get the firmware from Ralink in put it in /lib/firmware. The unload the reload the module (or reboot).

best ... khay

----------

## BillWho

@khayyam

To keep it simple maybe just have the op install sys-kernel/linux-firmware   :Question: 

Ralink drivers are included

----------

## athena810

So, what am I doing? And khayyam, I am booted into my custom kernel. but ip a still returns a command not found.

yeah, I probably have to install firmware. Sorry to be a n00b, but can I ask for the exact command/URL? How do I get the firmware for Ralink, seeing as how i can't browse the internet. 'links' doesn't work for me in my kernel but will work on the livecd so I can probably chroot into it.

So am i suppose to 

```
emerge sys-kernel/linux-firmware
```

 or am I looking for the Ralink thing?

And iwconfig returns

```

gre0         no wireless extensions

lo             no wireless extensions

tun0         no wireless extensions

sit0          no wireless extensions

wlan0      IEEE 802.11bgn ESSID:off/any 

               Mode:Managed Access Point: Not-Associated Tx-Power=0 dBm 

               Retry long limit:7   RTS thr:off   Fragment thr:off 

               Encryption key: off 

               Power Management: off 

```

----------

## khayyam

 *BillWho wrote:*   

> To keep it simple maybe just have the op install sys-kernel/linux-firmware. Ralink drivers are included

 

Bill, I wouldn't know ... I don't have such a driver or use any firmware (my kernel is deblobed), but no doubt the firmware is required.

best ... khay

----------

## khayyam

 *athena810 wrote:*   

> So, what am I doing? And khayyam, I am booted into my custom kernel. but ip a still returns a command not found.

 

athena810 ... I asked if you were using the kernel driver, and you answered "I don't think I installed it, I think it was the default driver" ... that confuses me, as does your relating it to the fact that 'ip' isn't available ... n00b or not it was a fairly staightforward question. 

 *athena810 wrote:*   

> So am i suppose to
> 
> ```
> emerge sys-kernel/linux-firmware
> ```
> ...

 

Bill stated that the Ralink firmware is included in that package, so installing it should provide you with ralink firmware ...

 *athena810 wrote:*   

> 
> 
> ```
> wlan0      IEEE 802.11bgn ESSID:off/any 
> 
> ...

 

OK, so at least the card is recognised ...

best .. khay

----------

## BillWho

athena810,

emerge sys-kernel/linux-firmware

----------

## athena810

Khayyam, yeah but I'm like a very dumb n00b...like beyond n00b...

Oh, i thought you asked me how did I install the kernel driver so I told you that I didn't install it and it was the default driver. 

Well, 'ip a' doesn't work...maybe I did something wrong.

K, thanks for the confirmation, I'll emerge it right now.

EDIT: Hey, it worked  :Smile:  kinda. After /etc/init.d/net.wlan0 start, I got a

```

*Bringing up interface wlan0

*   Starting wpa_supplicant wlan0...

*   Starting wpa_cli on wlan0...

*   Backgrounding ...  ...

*WARNING:net.wlan0 has started, but is inactive

```

Actually no, it works, ping to google.com works. You guys are amazing! Thanks so much  :Smile: 

----------

## khayyam

 *athena810 wrote:*   

> yeah but I'm like a very dumb n00b...like beyond n00b...

 

athena810 ... oh no .. an uber-n00b! :)

 *athena810 wrote:*   

> Well, 'ip a' doesn't work...maybe I did something wrong.

 

'ip' is provided by the package sys-apps/iproute2 ... its not necessary to have it installed, but I had though (wrongly) it was included in a stage3.

 *athena810 wrote:*   

> EDIT: Hey, it worked :) kinda. Actually no, it works, ping to google.com works. You guys are amazing! Thanks so much

 

no problem ... welcome to "uber-n00b plus" ...

best ... khay

----------

## BillWho

The rest is getting it to associate with your access point. Follow the instructions khayyam provided in prior posts. It sometimes takes some trial and error.

It would help if you used the cl version of wpa_supplicant so you can get messages as to what's going on.

----------

## athena810

Khayyam

uber-n00b and proud xD

If it helps my cause, I only had the internet and other forums to learn computers from  :Smile: 

Bill, 

associate with access point? It says

Access Point: 00:26:62:42:dC:02 

Does this mean that it associated or did it not?

----------

## BillWho

wpa_cli status provides connection information

Selected interface 'wlan0'

bssid=58:6d:8f:88:43:45

ssid=wireless

id=0

id_str=gentoo

mode=station

pairwise_cipher=CCMP

group_cipher=TKIP

key_mgmt=WPA2-PSK

wpa_state=COMPLETED

ip_address=192.168.1.101

address=54:04:a6:dd:73:68

----------

## khayyam

 *athena810 wrote:*   

> uber-n00b and proud

 

oooowwwww ... 

 *athena810 wrote:*   

> associate with access point? It says
> 
> Access Point: 00:26:62:42:dC:02 
> 
> Does this mean that it associated or did it not?

 

yes ... of course, if you can ping you are associated. I can tell you also that this particular Access Point is made by Actiontec Electronics, Inc.

best ... khay

----------

## athena810

Bill,

I have a wpa_cli. It says interactive mode.

Kayyam,

 *Quote:*   

> I can tell you also that this particular Access Point is made by Actiontec Electronics, Inc.

 

Haha, that's cool.

----------

