# About wireless and things which I don't understand [solved]

## Ignatius881

OK, so I've installed Gentoo Linux on my USB hdd. But now, new problems come.

I don't have Internet connection in Gentoo. But I can connect to Internet from my LiveDVD by writing some things in the terminal, as iwconfig wlan0 essid my_wlan, etc.

When I was installing Gentoo, I wrote this:

```
# rc-update add net.eth0 default

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

# rc-update add net.wlan0 default
```

And wlan0 was added well. But now, when I boot my Gentoo, wlan0 dissapeared, and lo, eth0 & sil0 appear (I've never added sil0).

So I have no way to connect to Internet. But I did something, I've blacklisted the modules rt2800usb, rt2x00usb & rt2x00lib as in my LiveDVD.

Excuse me if this topic is stupid, but... well, this had never happened to me.Last edited by Ignatius881 on Sat Apr 09, 2011 8:15 pm; edited 3 times in total

----------

## NeddySeagoon

Ignatius881,

The kernel module and possibly the firmware for your wifi has not been loaded, perhaps not even compiled.

What does lspci or lsusb say about your wireless device.

No topic is stupid - except the one you never post.

You will also need to 

```
emerge wireless-tools
```

to get iwconfig and friends.

When you were on the liveDVD, it provided the code to drive your wireless. Now you are on your own install, the code is missing because its not yet installed.

Boot the liveDVD and tell us about your wireless. You can then get back into your chroot, with working wireless again provided by the liveDVD to fix it.

----------

## Ignatius881

OK, I've installed wireless-tools. But from the LiveDVD, because I only can connect to Internet with wifi, and wifi only works in LiveDVD. I've mounted the partitions, etc. to install it.

lspci says:

```
00:00.0 Host bridge: Intel Corporation 82945G/GZ/P/PL Memory Controller Hub (rev 02)

00:02.0 VGA compatible controller: Intel Corporation 82945G/GZ Integrated Graphics Controller (rev 02)

00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 01)

00:1d.0 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #1 (rev 01)

00:1d.1 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 01)

00:1d.2 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 01)

00:1d.3 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 01)

00:1d.7 USB Controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 01)

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

00:1f.0 ISA bridge: Intel Corporation 82801GH (ICH7DH) LPC Interface Bridge (rev 01)

00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)

00:1f.2 RAID bus controller: Intel Corporation 82801GR/GH (ICH7 Family) SATA RAID Controller (rev 01)

00:1f.3 SMBus: Intel Corporation N10/ICH 7 Family SMBus Controller (rev 01)

01:01.0 FireWire (IEEE 1394): Agere Systems FW322/323 (rev 70)

01:08.0 Ethernet controller: Intel Corporation N10/ICH 7 Family LAN Controller (rev 01)
```

And lsusb says:

```
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 001 Device 002: ID 059b:0475 Iomega Corp. 

Bus 001 Device 003: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter

Bus 001 Device 004: ID 0bda:0111 Realtek Semiconductor Corp. Card Reader
```

EDIT: wlan0 doesn't appear after installing wireless-tools  :Confused: 

----------

## Ignatius881

I've found something... well, when I write iwlist wlan0 scan, it says:

```
wlan0   Interface doesn't support scanning.
```

And when I write lsmod | grep rt2, or grep rt, or simply lsmod, nothing appears. I don't understand.

Maybe I have to recompile my kernel, isn't it?

----------

## NeddySeagoon

Ignatius881,

Your message shows that wlan0 is present.

Look in dmesg - are there any indications that the firmware loaded or failed to load?

Try 

```
ifconfig wlan0 up

iwlist wlan0 scan
```

Your wifi must be USB as its not listed in lspci.  What does lsusb show ?

----------

## Ignatius881

I'll try that now.

lsusb:

```
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 001 Device 002: ID 059b:0475 Iomega Corp.

Bus 001 Device 003: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter

Bus 001 Device 004: ID 0bda:0111 Realtek Semiconductor Corp. Card Reader
```

Ok, so ifconfig wlan0 up shows this:

```
wlan0: ERROR while getting interface flags: no such device
```

And iwlist wlan0 scan shows:

```
wlan0   Interface doesn't support scanning.
```

And the only indication which shows dmesg is this:

```
ADDRCONF(NETDEV_UP): eth0: link is not ready
```

----------

## NeddySeagoon

Ignatius881,

```
Bus 001 Device 003: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter 
```

IS something we can work with.

You need the 

```
<M >   Ralink rt27xx/rt28xx/rt30xx (USB) support 
```

kernel option

You will also need the firmware from Ralink Unpack it and put the file into /lib/firmware ... make the dir if you don't have it.

That site is very slow at the moment.

----------

## Ignatius881

 *NeddySeagoon wrote:*   

> You need the 
> 
> ```
> <M >   Ralink rt27xx/rt28xx/rt30xx (USB) support 
> ```
> ...

 

So, have I to recompile the kernel, as it's shown here?

----------

## NeddySeagoon

Ignatius881,

You need to check your kernel ... yes and rebuild it if you need to.

You can still use genkernel if you wish.  It has a --menuconfig option to allow you to edit the .config file before it does the build.

That option might be -menuconfig,  I have never used genkernel.

The guide you reference is a very high level overview of the bare minimum to boot.

----------

## Ignatius881

 *NeddySeagoon wrote:*   

> Ignatius881,
> 
> You need to check your kernel ... yes and rebuild it if you need to.
> 
> You can still use genkernel if you wish.  It has a --menuconfig option to allow you to edit the .config file before it does the build.
> ...

 

Unfortunately, genkernel doesn't work for me. It shows an error, as here. I activated gzip, etc., but nothing works. So, I use make menuconfig.

Well, using make menuconfig, I've found that I didn't include the usb wifi modules which are shown there. I've included them as <*> instead of <M>. But wlan0 doesn't appear after restarting, and rt modules either.

I've downloaded the rt2870 module from here. Now, what file have I to copy to /lib/firmware?

----------

## NeddySeagoon

Ignatius881,

The file you downloaded is an older version of the kernel driver. It does not contain the firmware you need.

You can check your kernel build by looking in dmesg for the kernel attempting to load the firmware.

The good news is that the firmware is operating system independent, so we can borrow from Debian.

Download the Ralink Firmware package. 

This will get you a file called firmware-ralink_0.29_all.deb

```
emerge app-arch/deb2targz
```

if you don't have it already.

Run 

```
deb2targz firmware-ralink_0.29_all.deb
```

to unpack the deb file to something like 

```
firmware-ralink_0.29_all.tar.gz
```

which is something tar understands.

The commad 

```
tar vxf firmware-ralink_0.29_all.tar.gz
```

will unpack the tarball into two directories ./usr and ./lib 

Note the leading dots ... these are not your system /usr and system /lib  they are created in the directory containing the tarball.

In ./lib/firmware you will find lots of .bin files, including rt3070.bin and rt2870.bin.  You want one of those.  Its quite safe to copy all the *.bin files to your /lib/firmware as only the right one will be used.

dmesg will tell you the file the driver was trying to load.

----------

## Ignatius881

I can't install deb2targz. This is what happens:

```
# emerge app-arch/deb2targz

 * IMPORTANT: 3 news items need reading for repository 'gentoo'.

 * Use eselect news to read news items.

Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) app-arch/deb2targz-1

>>> Downloading 'ftp://ftp.free.fr/mirrors/ftp.gentoo.org/distfiles/deb2targz'

--2011-04-09 16:15:34--  ftp://ftp.free.fr/mirrors/ftp.gentoo.org/distfiles/deb2targz

           => `/usr/portage/distfiles/deb2targz'

Resolving ftp.free.fr... failed: Name or service not known.

wget: unable to resolve host address `ftp.free.fr'

>>> Downloading 'ftp://gentoo.imj.fr/pub/gentoo/distfiles/deb2targz'

--2011-04-09 16:15:34--  ftp://gentoo.imj.fr/pub/gentoo/distfiles/deb2targz

           => `/usr/portage/distfiles/deb2targz'

Resolving gentoo.imj.fr... failed: Name or service not known.

wget: unable to resolve host address `gentoo.imj.fr'

>>> Downloading 'http://mirrors.linuxant.fr/distfiles.gentoo.org/distfiles/deb2targz'

--2011-04-09 16:15:34--  http://mirrors.linuxant.fr/distfiles.gentoo.org/distfiles/deb2targz

Resolving mirrors.linuxant.fr... failed: Name or service not known.

wget: unable to resolve host address `mirrors.linuxant.fr'

>>> Downloading 'ftp://mirrors.linuxant.fr/distfiles.gentoo.org/distfiles/deb2targz'

--2011-04-09 16:15:34--  ftp://mirrors.linuxant.fr/distfiles.gentoo.org/distfiles/deb2targz

           => `/usr/portage/distfiles/deb2targz'

Resolving mirrors.linuxant.fr... failed: Name or service not known.

wget: unable to resolve host address `mirrors.linuxant.fr'

>>> Downloading 'http://gentoo.modulix.net/gentoo/distfiles/deb2targz'

--2011-04-09 16:15:34--  http://gentoo.modulix.net/gentoo/distfiles/deb2targz

Resolving gentoo.modulix.net... failed: Name or service not known.

wget: unable to resolve host address `gentoo.modulix.net'

>>> Downloading 'ftp://mirror.ovh.net/gentoo-distfiles/distfiles/deb2targz'

--2011-04-09 16:15:34--  ftp://mirror.ovh.net/gentoo-distfiles/distfiles/deb2targz

           => `/usr/portage/distfiles/deb2targz'

Resolving mirror.ovh.net... failed: Name or service not known.

wget: unable to resolve host address `mirror.ovh.net'

>>> Downloading 'http://mirror.ovh.net/gentoo-distfiles/distfiles/deb2targz'

--2011-04-09 16:15:34--  http://mirror.ovh.net/gentoo-distfiles/distfiles/deb2targz

Resolving mirror.ovh.net... failed: Name or service not known.

wget: unable to resolve host address `mirror.ovh.net'

>>> Downloading 'http://ftp.rnl.ist.utl.pt/pub/gentoo/gentoo-distfiles/distfiles/deb2targz'

--2011-04-09 16:15:34--  http://ftp.rnl.ist.utl.pt/pub/gentoo/gentoo-distfiles/distfiles/deb2targz

Resolving ftp.rnl.ist.utl.pt... failed: Name or service not known.

wget: unable to resolve host address `ftp.rnl.ist.utl.pt'

>>> Downloading 'ftp://darkstar.ist.utl.pt/pub/gentoo/distfiles/deb2targz'

--2011-04-09 16:15:34--  ftp://darkstar.ist.utl.pt/pub/gentoo/distfiles/deb2targz

           => `/usr/portage/distfiles/deb2targz'

Resolving darkstar.ist.utl.pt... failed: Name or service not known.

wget: unable to resolve host address `darkstar.ist.utl.pt'

>>> Downloading 'http://darkstar.ist.utl.pt/gentoo/distfiles/deb2targz'

--2011-04-09 16:15:34--  http://darkstar.ist.utl.pt/gentoo/distfiles/deb2targz

Resolving darkstar.ist.utl.pt... failed: Name or service not known.

wget: unable to resolve host address `darkstar.ist.utl.pt'

>>> Downloading 'ftp://ftp.rnl.ist.utl.pt/pub/gentoo/gentoo-distfiles/distfiles/deb2targz'

--2011-04-09 16:15:34--  ftp://ftp.rnl.ist.utl.pt/pub/gentoo/gentoo-distfiles/distfiles/deb2targz

           => `/usr/portage/distfiles/deb2targz'

Resolving ftp.rnl.ist.utl.pt... failed: Name or service not known.

wget: unable to resolve host address `ftp.rnl.ist.utl.pt'

>>> Downloading 'ftp://cesium.di.uminho.pt/pub/gentoo/distfiles/deb2targz'

--2011-04-09 16:15:34--  ftp://cesium.di.uminho.pt/pub/gentoo/distfiles/deb2targz

           => `/usr/portage/distfiles/deb2targz'

Resolving cesium.di.uminho.pt... failed: Name or service not known.

wget: unable to resolve host address `cesium.di.uminho.pt'

>>> Downloading 'http://cesium.di.uminho.pt/pub/gentoo/distfiles/deb2targz'

--2011-04-09 16:15:34--  http://cesium.di.uminho.pt/pub/gentoo/distfiles/deb2targz

Resolving cesium.di.uminho.pt... failed: Name or service not known.

wget: unable to resolve host address `cesium.di.uminho.pt'

>>> Downloading 'ftp://ftp.dei.uc.pt/pub/linux/gentoo/distfiles/deb2targz'

--2011-04-09 16:15:34--  ftp://ftp.dei.uc.pt/pub/linux/gentoo/distfiles/deb2targz

           => `/usr/portage/distfiles/deb2targz'

Resolving ftp.dei.uc.pt... failed: Name or service not known.

wget: unable to resolve host address `ftp.dei.uc.pt'

>>> Downloading 'http://ftp.dei.uc.pt/pub/linux/gentoo/distfiles/deb2targz'

--2011-04-09 16:15:34--  http://ftp.dei.uc.pt/pub/linux/gentoo/distfiles/deb2targz

Resolving ftp.dei.uc.pt... failed: Name or service not known.

wget: unable to resolve host address `ftp.dei.uc.pt'

>>> Downloading 'http://gentoo-euetib.upc.es/mirror/gentoo/distfiles/deb2targz'

--2011-04-09 16:15:34--  http://gentoo-euetib.upc.es/mirror/gentoo/distfiles/deb2targz

Resolving gentoo-euetib.upc.es... failed: Name or service not known.

wget: unable to resolve host address `gentoo-euetib.upc.es'

>>> Downloading 'ftp://ftp.udc.es/gentoo/distfiles/deb2targz'

--2011-04-09 16:15:34--  ftp://ftp.udc.es/gentoo/distfiles/deb2targz

           => `/usr/portage/distfiles/deb2targz'

Resolving ftp.udc.es... failed: Name or service not known.

wget: unable to resolve host address `ftp.udc.es'

>>> Downloading 'http://ftp.udc.es/gentoo/distfiles/deb2targz'

--2011-04-09 16:15:34--  http://ftp.udc.es/gentoo/distfiles/deb2targz

Resolving ftp.udc.es... failed: Name or service not known.

wget: unable to resolve host address `ftp.udc.es'

>>> Downloading 'http://www.miketaylor.org.uk/tech/deb/deb2targz'

--2011-04-09 16:15:34--  http://www.miketaylor.org.uk/tech/deb/deb2targz

Resolving www.miketaylor.org.uk... failed: Name or service not known.

wget: unable to resolve host address `www.miketaylor.org.uk'

!!! Couldn't download 'deb2targz'. Aborting.

 * Fetch failed for 'app-arch/deb2targz-1', Log file:

 *  '/var/tmp/portage/app-arch/deb2targz-1/temp/build.log'

>>> Failed to emerge app-arch/deb2targz-1, Log file:

>>>  '/var/tmp/portage/app-arch/deb2targz-1/temp/build.log'

 * Messages for package app-arch/deb2targz-1:

 * Fetch failed for 'app-arch/deb2targz-1', Log file:

 *  '/var/tmp/portage/app-arch/deb2targz-1/temp/build.log'
```

I did that from LiveDVD connected to the Internet.

----------

## NeddySeagoon

Ignatius881,

You missed one very important step in the chroot process.

Before you enter the chroot, you must 

```
cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
```

or name resolution will not work.

----------

## Ignatius881

 *NeddySeagoon wrote:*   

> Ignatius881,
> 
> You missed one very important step in the chroot process.
> 
> Before you enter the chroot, you must 
> ...

 

OK, I've installed deb2targz, I've created /lib/firmware and I've copied .bin archives into it.

dmesg shows a lot of lines, but I can't see all. And I was thinking, maybe I have to install Ndiswrapper.

----------

## dE_logics

You might also try Networkmanager with nm-applet, that's the one stop solution.

----------

## Ignatius881

 *dE_logics wrote:*   

> You might also try Networkmanager with nm-applet, that's the one stop solution.

 

Well, if I install Networkmanager, I have to install xorg and gnome/kde too. But, of course, I must have wlan0 before connecting to a wifi point, and this is what I'm trying.

----------

## NeddySeagoon

Ignatius881,

What does 

```
dmesg | grep ware 
```

show?

Does 

```
ifconfig wlan0 up 
```

return any error messages ?

What about

```
dhcpcd wlan0
```

?

If you get that far with no errors your wireless should work.

Until you can make wireless work by hand like this, none of the graphical tools can make it work either.

----------

## Ignatius881

dmesg | grep ware says:

```
[    0.180060] pci 0000:01:08.0: Firmware left e100 interrupts enabled: disabling
```

ifconfig wlan0 up says:

```
wlan0: ERROR while getting interface flags: No such device
```

And dhcpcd wlan0 says:

```
dhcpcd[3881]: version 5.2.10 starting

dhcpcd[3881]: wlan0: interface not found or invalid
```

----------

## Ignatius881

OK, I think that I've found the solution of my problem here (in Spanish)

So, because of I put the kernel modules with <*> (in -> Device Drivers, -> Network device support, -> Wireless LAN, -> Ralink driver support), I'll put them with <M>, and then, if everything is OK, I'll write modprobe rt2870 and modprobe -r rt2870.

----------

## Ignatius881

Well, problem solved. Now I'll install a lot of programs on my Gentoo  :Very Happy: 

Thanks for your help.

----------

