# Edimax EW-7711UAn USB wireless doesn't work in Gentoo x32

## staretsgraphy

I've installed gentoo-sources-4.0.5  with genkernel and it doesn't recognize the device. When i type ifconfig it shows only lo and not ra0(or a wlan0) which should be for the wireless usb device.

----------

## NeddySeagoon

staretsgraphy,

Wireless is a bit of a black art and genkernel leaves it well alone unless you help it.

You will need to choose your wireless stack and hardware modules for genkernel to build.

Tell us the line from lsusb that shows your wireless device.

As its a USB device, you are going to need firmware.  Its likely that 

```
emerge linux-firmware
```

 will provide the firmware but we will know more when ve see your lsusb line.

----------

## staretsgraphy

I've installed linux-firmware. Here is the results of lsusb command:

```
Bus 001 Device 005: ID 090c:1000 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) Flash Drive

Bus 001 Device 002: ID 7392:7710 Edimax Technology Co., Ltd 

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

Bus 005 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 003 Device 002: ID 1bcf:0007 Sunplus Innovation Technology Inc. Optical Mouse

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

Bus 002 Device 002: ID 1a2c:0c23 China Resource Semico Co., Ltd 

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

----------

## NeddySeagoon

staretsgraphy,

Grepping the kernel sources  

```
linux-3.16.1-gentoo # grep -R 7711 ./
```

gives

```
./drivers/net/wireless/rt2x00/rt2800usb.c:   { USB_DEVICE(0x7392, 0x7711) },
```

So the kernel knows your device - its a ralink USB something.  

The kernel menu item you need is 

```
  │ CONFIG_RT2800USB:                                                                                        │  

  │                                                                                                          │  

  │ This adds support for rt27xx/rt28xx/rt30xx wireless chipset family.                                      │  

  │ Supported chips: RT2770, RT2870 & RT3070, RT3071 & RT3072                                                │  

  │                                                                                                          │  

  │ When compiled as a module, this driver will be called "rt2800usb.ko".                                    │  

  │                                                                                                          │  

  │ Symbol: RT2800USB [=m]                                                                                   │  

  │ Type  : tristate                                                                                         │  

  │ Prompt: Ralink rt27xx/rt28xx/rt30xx (USB) support                                                        │  

  │   Location:                                                                                              │  

  │     -> Device Drivers                                                                                    │  

  │       -> Network device support (NETDEVICES [=y])                                                        │  

  │         -> Wireless LAN (WLAN [=y])                                                                      │  

  │           -> Ralink driver support (RT2X00 [=m])                                                         │  

  │   Defined at drivers/net/wireless/rt2x00/Kconfig:137                                                     │  

  │   Depends on: NETDEVICES [=y] && WLAN [=y] && RT2X00 [=m] && USB [=y]                                    │  

  │   Selects: RT2800_LIB [=n] && RT2X00_LIB_USB [=m] && RT2X00_LIB_FIRMWARE [=y] && \                       │  

  │ RT2X00_LIB_CRYPTO [=y] && CRC_CCITT [=y] 
```

However, There are a few suboptions there and I don't know which if any, you need.

Thats your chipset driver.  Now for the rest of the kernel Wifi.

```
  │ Symbol: WIRELESS [=y]                                                                                    │  

  │ Type  : boolean                                                                                          │  

  │ Prompt: Wireless                                                                                         │  

  │   Location:                                                                                              │  

  │ (1) -> Networking support (NET [=y])                                                                     │  

  │   Defined at net/Kconfig:354                                                                             │  

  │   Depends on: NET [=y] && !S390                                                                          │  

  │   Selected by: WLAN [=y] && NETDEVICES [=y] && !S390 && NET [=y] 
```

On that menu, you need

```
  │ │      <*>   cfg80211 - wireless configuration API                                  │ │  

  │ │      [*]     enable powersave by default                                          │ │  

  │ │      <*>   Generic IEEE 802.11 Networking Stack (mac80211)                        │ │  

  │ │      [*]   Minstrel                                                               │ │  

  │ │      [*]     Minstrel 802.11n support                                             │ │  

  │ │      [ ]       Minstrel 802.11ac support                                          │ │  

  │ │            Default rate control algorithm (Minstrel)  --->                        │ │  

  │ │      [*]   Enable LED triggers   
```

Start off with 

```
genkernel -menuconfig all
```

genkernel will drop you into menuconfig, so you can make the changes.

Prompt: 

```
Ralink rt27xx/rt28xx/rt30xx (USB) support 
```

 is the item you are looking for.

```
  │   Location:                                                                                              │  

  │     -> Device Drivers                                                                                    │  

  │       -> Network device support (NETDEVICES [=y])                                                        │  

  │         -> Wireless LAN (WLAN [=y])                                                                      │  

  │           -> Ralink driver support (RT2X00 [=m])           
```

   tells where to find it.  It will be hidden until    Depends on: 

```
NETDEVICES [=y] && WLAN [=y] && RT2X00 [=m] && USB [=y]   
```

is true, so all those opitions must be on too.

You can search in menuconfig wint the / key.

After your new kernel is built and installed, reboot to test.  The interface will not be ra0. udev will rename it for you.

----------

## staretsgraphy

Still no internet and only lo. Here is the config: https://bpaste.net/show/7a4a8cb135d0

----------

## staretsgraphy

Can you offer some help NeddySeagoon?

----------

## NeddySeagoon

staretsgraphy,

Can you post dmesg please?

Check the time/date in 

```
uname -a
```

 It shows the build date/time of the running kernel.

If it does not tie in with your memory of your most recent kernel build, you are not running the kernel you think you are.

----------

## staretsgraphy

Sure. https://bpaste.net/show/572f65d7aa1e

 *NeddySeagoon wrote:*   

> Check the time/date in 
> 
> ```
> uname -a
> ```
> ...

  It says 4.0.5-gentoo, it's the right one.

----------

## NeddySeagoon

staretsgraphy,

Having both

```
Bus 001 Device 005: ID 090c:1000 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) Flash Drive

Bus 001 Device 002: ID 7392:7710 Edimax Technology Co., Ltd 
```

 on the same bus can be a bad thing as specification compliant power limiting will cause one (or more) device to not work.

Having said that, most systems ignore the power limit spec.  Its worth testing the WiFi on a bus on its own if you can.

```
[    8.090074] usb 1-1: new high-speed USB device number 2 using ehci-pci

[    8.250791] usb 1-1: New USB device found, idVendor=7392, idProduct=7710

[    8.250797] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[    8.250801] usb 1-1: Product: Edimax Wi-Fi

[    8.250804] usb 1-1: Manufacturer: MediaTek

[    8.250807] usb 1-1: SerialNumber: 1.0
```

A little later

```
[    9.114809] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
```

is root being mounted, so /lib/modules becomes available but no module is ever auto loaded. 

What happens when you do 

```
modprobe rt2800usb
```

to load the module by hand?

----------

## staretsgraphy

Unfortunately, nothing happens.

----------

## NeddySeagoon

staretsgraphy,

Describe nothing.

modprobe silently returns to the prompt when it works, thats a good sign.

After the modprobe, do you have a new interface in 

```
ifconfig -a 
```

What is at the end of dmesg as a result of the modprobe?

----------

## staretsgraphy

```
ifconfig -a

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 0  (Local Loopback)

        RX packets 4  bytes 240 (240.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 4  bytes 240 (240.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
```

----------

## NeddySeagoon

staretsgraphy,

Do the modprobe again, then post dmesg.  Maybe its totally the wrong module, or maybe its looking for firmware.

----------

## staretsgraphy

https://bpaste.net/show/f88587f0b7e1

----------

## NeddySeagoon

staretsgraphy,

idVendor=7392, idProduct=7710 is supposed to be unique to the hardware in your USB device.

A few companies don't follow that standard.

This post

```
> - modinfo mt7601u:

> filename:       /lib/modules/4.0.3-202.fc21.x86_64/updates/mt7601u.ko

> license:        GPL

> firmware:       mt7601u.bin

> alias:          usb:v7392p7710d*dc*dsc*dp*ic*isc*ip*in*
```

says you need the driver and firmware named mt7601u.

According to Github the driver is in the mainline kernel from 4.2 on.

There are instructions on that Github page to build the out of tree driver.

----------

