# [solved] Wireless 802.11 Problem RT5390 Wireless

## windex

Okay.  Recently built laptop.  I'm having trouble getting my wireless working.  

My ethernet card ends up with a working DHCP lease after boot, while my wireless card shows to be in a down state.

```

ifconfig wlo1:

wlo1: flags=4098<BROADCAST,MULTICAST>  mtu 1500

        ether <redacated>  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

```

Maybe turn it on?

```

ifconfig wlo1 up

SIOCSIFFLAGS: No such file or directory

```

Wonder why that could be?  Maybe it detects the card, but can't load a driver?

```

lspci | grep Ralink

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

```

Oh good!  Looks like someone else got RT5390 working with the rt2800pci kernel module!

https://forums.gentoo.org/viewtopic-t-977852-postdays-0-postorder-asc-highlight-rt5390-start-25.html?sid=a9869c6890f82252d267af16a60f72e9

```

lsmod

Module                  Size  Used by

vboxnetadp             17670  0 

vboxnetflt             15602  0 

vboxdrv              1807613  2 vboxnetadp,vboxnetflt

```

Damn!  Maybe I have the software already in the kernel, though?

```

cat /usr/src/linux/.config | grep RT2800

CONFIG_RT2800PCI=y

# CONFIG_RT2800PCI_RT33XX is not set

# CONFIG_RT2800PCI_RT35XX is not set

CONFIG_RT2800PCI_RT53XX=y

# CONFIG_RT2800PCI_RT3290 is not set

# CONFIG_RT2800USB is not set

CONFIG_RT2800_LIB=y

```

Which looks good!  

Where did I go wrong?  

For reference purposes here is make.conf

```

# Please consult /usr/share/portage/config/make.conf.example for a more

# detailed example.

CFLAGS="-O2 -pipe -march=native -O2"

CXXFLAGS="${CFLAGS}"

# WARNING: Changing your CHOST is not something that should be done lightly.

# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.

CHOST="x86_64-pc-linux-gnu"

# These are the USE flags that were used in addition to what is provided by the

# profile used for building.

USE="bindist mmx sse sse2i ssl pae sep mmxext sse sse2 sse3 sse4 3dnow svm firefox daemon bash-completion ruby pcapnav tcpdump crypt pcap nmap vlc -gnome -kde -gtk dvd -pcmcia javascript -mysql alsa cdr bzip2 cli crypt truetype gd exif -apache2 -calendar -cgi -curl -firebird -kerberos -selinux -sybase-ct udev -gtk3 qt4 -bluetooth -debug -eds -gstreamer -java -mysql -test -vba branding"

PORTDIR="/usr/portage"

DISTDIR="${PORTDIR}/distfiles"

PKGDIR="${PORTDIR}/packages"

MAKEOPTS="-j3"

#POLICY_TYPES="strict"

SYNC="rsync://rsync3.ca.gentoo.org/gentoo-portage"

VIDEO_CARDS="radeon"

## (For mouse, keyboard, and Synaptics touchpad support)

INPUT_DEVICES="evdev synaptics"

```

Last edited by windex on Thu Jun 05, 2014 2:41 pm; edited 1 time in total

----------

## Pearlseattle

Please post the output of "lspci -k" and "rfkill list".

Please, once you know which module your wifi NIC is using (output of "lspci -k"), post as well the output of "dmesg | grep <your_module_name>".

----------

## windex

lspci -k returns 

```

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

   Subsystem: Hewlett-Packard Company Device 3577

   Kernel driver in use: r8169

07: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

```

http://codepad.org/1q9bgev0

Looks like it's using rt2800pci?

```

rfkill list

0: phy0: Wireless LAN

   Soft blocked: no

   Hard blocked: no

```

oh yeah, but it looks like a firmware problem:

```

dmesg | grep -B 4 -A 4 rt28

[  136.063003] r8169 0000:06:00.0 eno1: unable to load firmware patch rtl_nic/rtl8105e-1.fw (-2)

[  136.182221] r8169 0000:06:00.0 eno1: link down

[  136.182295] IPv6: ADDRCONF(NETDEV_UP): eno1: link is not ready

[  136.182343] r8169 0000:06:00.0 eno1: link down

[  136.182878] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2860.bin'

[  136.184080] ieee80211 phy0: rt2x00lib_request_firmware: Error - Failed to request Firmware

[  137.992134] r8169 0000:06:00.0 eno1: link up

[  137.992161] IPv6: ADDRCONF(NETDEV_CHANGE): eno1: link becomes ready

[  262.059783] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2860.bin'

[  262.061885] ieee80211 phy0: rt2x00lib_request_firmware: Error - Failed to request Firmware

[  271.798087] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2860.bin'

[  271.800259] ieee80211 phy0: rt2x00lib_request_firmware: Error - Failed to request Firmware

[ 1291.753251] kworker/u4:2 (862) used greatest stack depth: 4120 bytes left

[ 2063.534483] kworker/1:0 (12) used greatest stack depth: 3984 bytes left

[ 7898.571737] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2860.bin'

[ 7898.574505] ieee80211 phy0: rt2x00lib_request_firmware: Error - Failed to request Firmware

[ 7924.460701] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2860.bin'

[ 7924.463527] ieee80211 phy0: rt2x00lib_request_firmware: Error - Failed to request Firmware

[ 9163.419547] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2860.bin'

[ 9163.421756] ieee80211 phy0: rt2x00lib_request_firmware: Error - Failed to request Firmware

[ 9176.146417] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2860.bin'

[ 9176.148595] ieee80211 phy0: rt2x00lib_request_firmware: Error - Failed to request Firmware

[ 9197.216940] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2860.bin'

[ 9197.218964] ieee80211 phy0: rt2x00lib_request_firmware: Error - Failed to request Firmware

[11357.677769] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2860.bin'

[11357.679759] ieee80211 phy0: rt2x00lib_request_firmware: Error - Failed to request Firmware

[11623.225928] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2860.bin'

[11623.228522] ieee80211 phy0: rt2x00lib_request_firmware: Error - Failed to request Firmware

[17247.089578] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2860.bin'

[17247.092663] ieee80211 phy0: rt2x00lib_request_firmware: Error - Failed to request Firmware

[23891.232354] device eno1 entered promiscuous mode

[24224.168286] device eno1 left promiscuous mode

[80948.434451] r8169 0000:06:00.0 eno1: link down

```

----------

## Pearlseattle

Correct - it's looking for the file "rt2860.bin".

Go into an empty directory and run the command...

```
git clone git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
```

Then look into the stuff that it downloaded, find the file "rt2860.bin" and copy it into the directory "/lib/firmware" and reboot and hope that you then don't see the error messages anymore.

If you don't see the error messages anymore and the card still does not work then check again with "rfkill list" that it is not switched off.

----------

## windex

Progress!  I can now raise and lower wlo1 !

But iwlist still doesn't work?

```

#iwlist wlo1 scan

wlo1      Interface doesn't support scanning.

```

Hmmm, what's dmesg have to say about this?

```

 # dmesg | grep -B 12 -A 12 rt2860

[  132.831651] vboxdrv: Found 2 processor cores.

[  132.832341] vboxdrv: fAsync=0 offMin=0x36b offMax=0x1a8b

[  132.832483] vboxdrv: TSC mode is 'synchronous', kernel timer mode is 'normal'.

[  132.832488] vboxdrv: Successfully loaded version 4.2.22 (interface 0x001a0007).

[  133.599120] EXT4-fs (sda4): re-mounted. Opts: (null)

[  133.901545] Adding 262140k swap on /dev/sda3.  Priority:-1 extents:1 across:262140k 

[  134.007545] EXT4-fs (sda2): mounting ext2 file system using the ext4 subsystem

[  134.047483] EXT4-fs (sda2): mounted filesystem without journal. Opts: (null)

[  137.445849] r8169 0000:06:00.0 eno1: unable to load firmware patch rtl_nic/rtl8105e-1.fw (-2)

[  137.563128] r8169 0000:06:00.0 eno1: link down

[  137.563180] r8169 0000:06:00.0 eno1: link down

[  137.563203] IPv6: ADDRCONF(NETDEV_UP): eno1: link is not ready

[  137.563769] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2860.bin'

[  137.587677] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.34

[  137.687490] IPv6: ADDRCONF(NETDEV_UP): wlo1: link is not ready

[  138.948486] dhcpcd (1893) used greatest stack depth: 4136 bytes left

[  139.320944] r8169 0000:06:00.0 eno1: link up

[  139.320980] IPv6: ADDRCONF(NETDEV_CHANGE): eno1: link becomes ready

[12420.954775] IPv6: ADDRCONF(NETDEV_UP): wlo1: link is not ready

[12924.381922] r8169 0000:06:00.0 eno1: link down

[12924.381960] r8169 0000:06:00.0 eno1: link down

[12924.383613] IPv6: ADDRCONF(NETDEV_UP): eno1: link is not ready

[12924.422811] IPv6: ADDRCONF(NETDEV_UP): wlo1: link is not ready

[12926.077332] r8169 0000:06:00.0 eno1: link up

[12926.077357] IPv6: ADDRCONF(NETDEV_CHANGE): eno1: link becomes ready

```

What should I check next?

EDIT:  Separate problems with WICD and network manager are preventing either software from helping.

----------

## khayyam

 *windex wrote:*   

> 
> 
> ```
> # iwlist wlo1 scan
> 
> ...

 

windex ... 'iwlist' (and other commands provided by net-wireless/wireless-tools) use the now legacy WEXT (wireless extentions), the new 'netlink' (nl80211/cfg80211) are not supported by them unless the WEXT compatibility layer (CONFIG_CFG80211_WEXT) is enabled. I'm not entirely certain (as I use net-wireless/iw for scanning, etc) but I think this is probably the reason for the above error. So, check the above is enabled, and/or use net-wireless/iw in place of net-wireless/wireless-tools.

The following should give you some idea of what is enabled in the kernel re NL80211 ...

```
# awk '/(WEXT|(CFG|NL)80211)/' /usr/src/linux/.config
```

... scan using 'iw'

```
# iw dev wlo1 scan
```

Note that I'd generally expect that iwlist would error with 'no wireless extensions' due to the absence of WEXT, so the above is somewhat of a guess.

HTH & best ... khay

----------

## Pearlseattle

 *Quote:*   

> EDIT: Separate problems with WICD and network manager are preventing either software from helping.

 

Compliments - you reached 50%  :Very Happy: 

@khayyam

Sorry, I am not sure if I understood correctly:

what you wrote is related to the "client" SW, right? Not needed to make the wifi-NIC work through wicd or network mgr, right?

On my side, I would proceed as follows:

1) after being able to see the wifi-NIC with "ifconfig -a" and checking that it is not switched off with "rfkill list" I would fully focus on making "wicd" & "wicd-curses" work.

2) if "wicd-curses" does not show any access point, check the current wifi-module settings with "systool -m rt2800pci -av" and potentially change them to see if it makes things better.

----------

## Aiken

From my own playing both iwlist wlan0 scan and iw wlan0 scan work when wext is compiled into the kernel. Removing wext only iw wlan0 scan works. My experience says with wext wicd gets a list of ap and a kernel that does not have wext wicd does not get a list of ap.

iwlist without wext in the kernel gives the "Interface doesn't support scanning. " message.

In the past I had enough trouble with network manager I still refuse to use it so stay with wicd. I have kept wext compiled in.

----------

## khayyam

 *Pearlseattle wrote:*   

> @khayyam Sorry, I am not sure if I understood correctly: what you wrote is related to the "client" SW, right? Not needed to make the wifi-NIC work through wicd or network mgr, right?

 

Pearlseattle ... in the case of wicd and wireless-tools these use the now depreciated WEXT, they don't support NL80211, so CFG80211_WEXT (the WEXT compatibility layer) must be enabled in order to use them. NetworkManager on the other hand does use NL80211 directly, so CFG80211_WEXT is not needed. Anyhow, I read the above "separate problems" as meaning that these are not working for other reasons ... and was primarily responding to the error from 'iwlist'.

best ... khay

----------

## windex

 *khayyam wrote:*   

> 
> 
> ... scan using 'iw'
> 
> HTH & best ... khay

 

It worked!  Thanks to everyone for your help!  I'll go ahead and make a separate thread to work on network-manager!

Thanks!

----------

## Pearlseattle

 *khayyam wrote:*   

>  *Pearlseattle wrote:*   @khayyam Sorry, I am not sure if I understood correctly: what you wrote is related to the "client" SW, right? Not needed to make the wifi-NIC work through wicd or network mgr, right? 
> 
> Pearlseattle ... in the case of wicd and wireless-tools these use the now depreciated WEXT, they don't support NL80211, so CFG80211_WEXT (the WEXT compatibility layer) must be enabled in order to use them. NetworkManager on the other hand does use NL80211 directly, so CFG80211_WEXT is not needed. Anyhow, I read the above "separate problems" as meaning that these are not working for other reasons ... and was primarily responding to the error from 'iwlist'.
> 
> best ... khay

 

Got it - thanks a lot  :Smile: 

And I just checked and I do have "CFG80211_WEXT" enabled - just pure luck.

----------

