Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wifi RTL8188CUS works, but RA Link RT5370 and Atheros AR9271 does not #2200

Closed
Gord1 opened this issue Oct 29, 2018 · 11 comments
Closed

Wifi RTL8188CUS works, but RA Link RT5370 and Atheros AR9271 does not #2200

Gord1 opened this issue Oct 29, 2018 · 11 comments

Comments

@Gord1
Copy link

Gord1 commented Oct 29, 2018

Using Dietpi 6.17 on Nanopi Neo

I have 3 wifi dongles. 1 works out of the box, while 2 others don't.
RTL8188CUS works fine, but RA Link RT5370 and Atheros AR9271 does not

They all show up properly in lsusb, eg
root@DietPi:~# lsusb
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 006: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
Bus 004 Device 001: ID 1d6


for the RTL8188CUS shows correctly
root@DietPi:~# lsmod
Module Size Used by
rtl8192cu 81920 0
rtl_usb 20480 1 rtl8192cu
rtl8192c_common 49152 1 rtl8192cu
rtlwifi 73728 3 rtl_usb,rtl8192c_common,rtl8192cu
nls_ascii 16384 1
rtc_ds1307 24576 0
g_mass_storage 16384 0
ip_tables 24576 0
x_tables 20480 1 ip_tables

But the 2 that don't work show:
root@DietPi:~# lsmod
Module Size Used by
nls_ascii 16384 1
rtc_ds1307 24576 0
g_mass_storage 16384 0
ip_tables 24576 0
x_tables 20480 1 ip_tables


And iwconfig shows no wlan0
root@DietPi:~# iwconfig
lo no wireless extensions.
eth0 no wireless extensions.


I have the latest firmware for Atheros and Ralink

root@DietPi:~# apt-get upgrade firmware-atheros
Reading package lists... Done
Building dependency tree
Reading state information... Done
firmware-atheros is already the newest version (20161130-3).

root@DietPi:~# apt-get install firmware-misc-nonfree
Reading package lists... Done
Building dependency tree
Reading state information... Done
firmware-misc-nonfree is already the newest version (20161130-3).

I don't know why these 2 wifi adapters are not loading and working.

Gordon Williams

@MichaIng
Copy link
Owner

@Gord1
Thanks for your report. Did we already talk in the forum? 🙂
However, for completeness I rechecked theoretical installed driver support:

Ralink RT5370 according to web search requires rt2870.bin driver which is part of pre-installed firmware-misc-nonfree package (on Stretch, on Jessie: firmware-ralink): https://packages.debian.org/stretch/all/firmware-misc-nonfree/filelist

Atheros AR9271 clearly covered by pre-installed firmware-atheros package: https://packages.debian.org/stretch/firmware-atheros

So both should work out of the box. I read about possible conflicting drivers, but this should only be the case if drivers are compiled/installed manually besides other pre-installed package drivers. When disabling WiFi, DietPi disables known WiFi kernel modules, but this is reverted when enabling WiFi and the here mentioned Atheros and Ralink modules are not even included 😉: https://github.com/Fourdee/DietPi/blob/master/dietpi/func/dietpi-set_hardware#L1176-L1219

On Raspberry Pi the raspberrypi-sys-mods by default disables some Realtek drivers for some reason:

2018-10-29 22:32:27 root@micha:/var/log# cat /etc/modprobe.d/blacklist-rtl8*
blacklist rtl8192cu
blacklist rtl8xxxu

Perhaps NanoPi also comes with some default blacklisting? Could be checked: cat /etc/modprobe.d/*

@Gord1
Copy link
Author

Gord1 commented Oct 29, 2018

Thanks for the reply.

I don't see any wifi blacklisted.

root@DietPi:~# ls /etc/modprobe.d
8188eu.conf 8192cu.conf disable_bt.conf matrix-blacklist.conf
8189es.conf 8723bs.conf g_mass_storage.conf wlan_8192eu.conf

root@DietPi:~# cat /etc/modprobe.d/*
options 8188eu rtw_power_mgnt=0
options 8189es rtw_power_mgnt=0
options 8192cu rtw_power_mgnt=0
options 8723bs rtw_power_mgnt=0
blacklist hci_uart
blacklist hidp
blacklist rfcomm
blacklist btbcm
blacklist bnep
blacklist bluetooth
options g_mass_storage file=/dev/mmcblk0p1
blacklist adxl34x
blacklist adxl34x_i2c
blacklist bmp085
blacklist dht11
blacklist fbtft_device
blacklist leds_pwm
blacklist matrix_ads7846
blacklist matrix_gpio_int
blacklist matrix_hcsr04
blacklist matrix_ir_recv
blacklist matrix_pwm
blacklist matrix_rotary_encoder
blacklist pcf8591
blacklist w1-gpio
blacklist w1-gpio-board
options wlan_8192eu rtw_power_mgnt=0

Gordon

@MichaIng
Copy link
Owner

@Gord1
Jep, required modules are not blocked.

Could you also check dmesg for any kernel/voltage related errors?

@Gord1
Copy link
Author

Gord1 commented Oct 30, 2018

Hi,
I don't see any kernel or voltage errors of note, but there is a note about vcc being disabled. This is the section of dmesg where Atheros dongle is found:

[ 2.989311] hub 8-0:1.0: USB hub found
[ 2.993129] hub 8-0:1.0: 1 port detected
[ 2.998186] usbcore: registered new interface driver cdc_acm
[ 3.003900] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 3.012051] usbcore: registered new interface driver usblp
[ 3.017650] usbcore: registered new interface driver cdc_wdm
[ 3.023681] usbcore: registered new interface driver usb-storage
[ 3.029905] usbcore: registered new interface driver usbserial
[ 3.035860] usbcore: registered new interface driver usbserial_generic
[ 3.042490] usbserial: USB Serial support registered for generic
[ 3.049896] mousedev: PS/2 mouse device common for all mice
[ 3.056507] sun6i-rtc 1f00000.rtc: rtc core: registered rtc-sun6i as rtc0
[ 3.063342] sun6i-rtc 1f00000.rtc: RTC enabled
[ 3.064886] usb 4-1: New USB device found, idVendor=0cf3, idProduct=9271
[ 3.064903] usb 4-1: New USB device strings: Mfr=16, Product=32, SerialNumber=48
[ 3.064915] usb 4-1: Product: USB2.0 WLAN
[ 3.064926] usb 4-1: Manufacturer: ATHEROS
[ 3.064938] usb 4-1: SerialNumber: 12345
[ 3.094182] i2c /dev entries driver
[ 3.102700] thermal thermal_zone0: failed to read out thermal zone (-16)
[ 3.110470] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 3.119313] device-mapper: ioctl: 4.37.0-ioctl (2017-09-20) initialised: [email protected]
[ 3.131004] sunxi-mmc 1c0f000.mmc: Got CD GPIO
[ 3.173877] sunxi-mmc 1c0f000.mmc: base:0xe0875000 irq:26
[ 3.184321] ledtrig-cpu: registered to indicate activity on CPUs
[ 3.190762] hidraw: raw HID events driver (C) Jiri Kosina
[ 3.196496] usbcore: registered new interface driver usbhid
[ 3.202115] usbhid: USB HID core driver
[ 3.227704] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok
[ 3.236953] mmc0: host does not support reading read-only switch, assuming write-enable
[ 3.241017] wireguard: WireGuard 0.0.20171111 loaded. See www.wireguard.com for information.
[ 3.241024] wireguard: Copyright (C) 2015-2017 Jason A. Donenfeld [email protected]. All Rights Reserved.
[ 3.241367] Initializing XFRM netlink socket

I don't know what vcc3v0 and vcc5v0 is all about:
[ 3.323830] asoc-simple-card soc:sound: i2s-hifi <-> 1c22800.i2s mapping ok
[ 3.327081] input: r_gpio_keys as /devices/platform/r_gpio_keys/input/input0
[ 3.329813] sun6i-rtc 1f00000.rtc: setting system clock to 2018-10-30 13:45:36 UTC (1540907136)
[ 3.330181] vcc3v0: disabling
[ 3.330188] vcc5v0: disabling
[ 3.330192] ALSA device list:
[ 3.330195] #0: Dummy 1
[ 3.330198] #1: Loopback 1
[ 3.330201] #2: H3 Audio Codec
[ 3.330203] #3: allwinner,hdmi
[ 3.411102] Freeing unused kernel memory: 2048K
[ 3.412521] mmcblk0: p1 p2
[ 4.191774] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 4.219530] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered

Gordon

@Fourdee
Copy link
Collaborator

Fourdee commented Oct 30, 2018

@Gord1

Hi Gordon,

RA Link RT5370 and Atheros AR9271

I suspect these modules are not compiled in the provided FriendlyARM kernel used on the device.

We can confirm this, for the 'RA Link RT5370':

modprobe rt2800usb

For the AR9271:

modprobe ath9k_htc

@Gord1
Copy link
Author

Gord1 commented Oct 30, 2018

I tried purging the firmware-atheros and firmware-misc-nonfree drivers and installing them and no improvement.

The funny thing is if I unplug the atheros or ralink dongle and plug in the realtek, the realtek's light comes on and wifi starts up immediately without any fuss or fiddle. It is just plug in and go.

Gordon

@Gord1
Copy link
Author

Gord1 commented Oct 30, 2018

after ralink installed and reboot

root@DietPi:~# lsmod
Module                  Size  Used by
nls_ascii              16384  1
rtc_ds1307             24576  0
g_mass_storage         16384  0
ip_tables              24576  0
x_tables               20480  1 ip_tables
root@DietPi:~# modprobe rt2800usb
root@DietPi:~# lsmod
Module                  Size  Used by
rt2800usb              24576  0
rt2800lib              94208  1 rt2800usb
crc_ccitt              16384  1 rt2800lib
rt2x00usb              20480  1 rt2800usb
rt2x00lib              40960  3 rt2800lib,rt2800usb,rt2x00usb
nls_ascii              16384  1
rtc_ds1307             24576  0
g_mass_storage         16384  0
ip_tables              24576  0
x_tables               20480  1 ip_tables
root@DietPi:~# 

So that is different.

but

root@DietPi:~# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

dmesg shows
[   46.043587] usbcore: registered new interface driver rt2800usb

I will try the same for the Atheros.
Gordon

@Gord1
Copy link
Author

Gord1 commented Oct 30, 2018

Got an error with the Atheros:

root@DietPi:~# lsmod
Module Size Used by
nls_ascii 16384 1
rtc_ds1307 24576 0
g_mass_storage 16384 0
ip_tables 24576 0
x_tables 20480 1 ip_tables

root@DietPi:~# modprobe ath9k_htc
modprobe: FATAL: Module ath9k_htc not found in directory /lib/modules/4.14.0

root@DietPi:# ls /lib/modules/4.14.0
build modules.alias modules.builtin.bin modules.devname modules.symbols
extra modules.alias.bin modules.dep modules.order modules.symbols.bin
kernel modules.builtin modules.dep.bin modules.softdep source
root@DietPi:
#

Edit:
I should note that the Atheros shows up in the boot dmesg as before:
root@DietPi:~# dmesg | grep "usb 4-1"
[ 2.858810] usb 4-1: new high-speed USB device number 2 using ehci-platform
[ 3.075066] usb 4-1: New USB device found, idVendor=0cf3, idProduct=9271
[ 3.109365] usb 4-1: New USB device strings: Mfr=16, Product=32, SerialNumber=48
[ 3.116789] usb 4-1: Product: USB2.0 WLAN
[ 3.126241] usb 4-1: Manufacturer: ATHEROS
[ 3.130368] usb 4-1: SerialNumber: 12345

@Gord1
Copy link
Author

Gord1 commented Oct 31, 2018

Hi,
Just looking at the Ralink 5370 dongle

root@DietPi:~# lsusb
gives
Bus 004 Device 003: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter

For 148F devices shows that the 5370 is not listed
root@DietPi:~# modinfo rt2800usb |grep 148F
alias: usb:v148Fp3572ddcdscdpiciscipin
alias: usb:v148Fp8070ddcdscdpiciscipin
alias: usb:v148Fp3370ddcdscdpiciscipin
alias: usb:v148Fp3072ddcdscdpiciscipin
alias: usb:v148Fp3071ddcdscdpiciscipin
alias: usb:v148Fp3070ddcdscdpiciscipin
alias: usb:v148Fp2870ddcdscdpiciscipin
alias: usb:v148Fp2770ddcdscdpiciscipin
alias: usb:v148Fp2070ddcdscdpiciscipin

But
https://wiki.debian.org/rt2800usb ***FOR Debian 3.16 (3.16.7-ckt9-2) kernel images
shows a larger number of devices where mine is listed:
USB: 148F:2070 Ralink Technology, Corp. RT2070 Wireless Adapter
USB: 148F:2770 Ralink Technology, Corp. RT2770 Wireless Adapter
USB: 148F:2870 Ralink Technology, Corp. RT2870 Wireless Adapter
USB: 148F:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter
USB: 148F:3071 Ralink Technology, Corp. RT3071 Wireless Adapter
USB: 148F:3072 Ralink Technology, Corp. RT3072 Wireless Adapter
USB: 148F:3370 Ralink Technology, Corp. RT3370 Wireless Adapter
USB: 148F:3572 Ralink Technology, Corp. RT3572 Wireless Adapter
USB: 148F:3573 Ralink Technology, Corp. RT3573 Wireless Adapter
USB: 148F:5370 Ralink Technology, Corp. RT5370 Wireless Adapter <---- 5370 ********
USB: 148F:5372 Ralink Technology, Corp. RT5372 Wireless Adapter
USB: 148F:5572 Ralink Technology, Corp. RT5572 Wireless Adapter
USB: 148F:8070 Ralink Technology, Corp. (Device name unknown)
USB: 148F:F301 Ralink Technology, Corp. (Device name unknown)

root@DietPi:~# cat /etc/debian_version
9.5

Is this the reason that the dongle is not working. The 5370 is missing from the current module?

Is there a way to get it to work?
Gordon Williams

@Fourdee
Copy link
Collaborator

Fourdee commented Oct 31, 2018

@Gord1

Hi Gordon,

For 148F devices shows that the 5370 is not listed

I suspect a disabled kernel compile option:
https://github.com/torvalds/linux/blob/master/drivers/net/wireless/ralink/rt2x00/Kconfig#L175

The above must be enabled for rt2800usb module to support the 5370.

Unfortunately, we are unable to offer custom kernels, due to time restraints. You would need to compile the kernel with that option enabled.

@Gord1
Copy link
Author

Gord1 commented Oct 31, 2018

Hi,
OK, thanks for all your work.

I've tried Armbian and both ralink and realtek dongles work.

You can close this.
Gordon

@Fourdee Fourdee closed this as completed Nov 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants