Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Wi-Fi RTL8812AU troubles
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jommes
n00b
n00b


Joined: 19 Mar 2016
Posts: 35

PostPosted: Wed Mar 30, 2016 5:47 pm    Post subject: [Solved] Wi-Fi RTL8812AU troubles Reply with quote

Dear all,

some days ago, I bought an usb wifi adapter:
https://wikidevi.com/wiki/Netis_WF2190

I followed these guide:
https://wiki.gentoo.org/wiki/AC1200_Wireless_Adapters
https://wiki.gentoo.org/wiki/Wpa_supplicant
to make it running.

Running wpa_supplicant outputs:
Code:
wpa_supplicant v2.5
random: Trying to read entropy from /dev/random
Successfully initialized wpa_supplicant
Initializing interface 'enp0s20u4' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'default' ctrl_interface '/var/run/wpa_supplicant/' 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'
ctrl_interface='DIR=/var/run/wpa_supplicant GROUP=wheel'
update_config=1
nl80211: Driver does not support authentication/association or connect commands
nl80211: deinit ifname=enp0s20u4 disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
netlink: Operstate: ifindex=2 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Set mode ifindex 2 iftype 2 (STATION)
nl80211: Failed to set interface 2 to mode 2: -19 (No such device)
enp0s20u4: Failed to initialize driver interface
Failed to add interface enp0s20u4
enp0s20u4: Cancelling scan request
enp0s20u4: Cancelling authentication timeout


Running wpa_cli outputs:
Code:
wpa_cli v2.4
Copyright (c) 2004-2015, Jouni Malinen <j@w1.fi> and contributors

This software may be distributed under the terms of the BSD license.
See README for more details.



Interactive mode

Could not connect to wpa_supplicant: (nil) - re-trying


/usr/src/linux/.config:
https://bpaste.net/raw/c892648a9c53

lsusb:
Code:
Bus 004 Device 002: ID 8087:8000 Intel Corp.
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 8087:8008 Intel Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 152d:3562 JMicron Technology Corp. / JMicron USA Technology Corp. JMS567 SATA 6.0Gb/s bridge
Bus 002 Device 002: ID 0781:5583 SanDisk Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 046a:010d Cherry GmbH
Bus 001 Device 004: ID 1ea7:002c 
Bus 001 Device 003: ID 0bda:8812 Realtek Semiconductor Corp. RTL8812AU 802.11a/b/g/n/ac WLAN Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


ifconfig:
Code:
enp0s20u4: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 04:8d:38:d6:af:ff  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

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 0  (Lokale Schleife)
        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


lsmod:
Code:
Module                  Size  Used by
8812au               1077921  0
x86_pkg_temp_thermal     4591  0


modinfo 8812au:
https://bpaste.net/raw/561c6a6387a8

What did I missed?

Thanks in advance,
Best


Last edited by jommes on Thu Mar 31, 2016 4:49 pm; edited 1 time in total
Back to top
View user's profile Send private message
jommes
n00b
n00b


Joined: 19 Mar 2016
Posts: 35

PostPosted: Wed Mar 30, 2016 8:22 pm    Post subject: Reply with quote

more details:

iwlist scan:
https://bpaste.net/raw/60c203d851ec

wpa_supplicant.conf:
Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1

ap_scan=1

network={
   ssid="WLAN-5CWMNM"
   psk=b1e4df811b73ba44e06efc0d858a0ac01192b7aa823bdc58bd4a11ecb34464f1
   pairwise=CCMP
   group=CCMP
}


/etc/conf.d/net.enp0s20u4:
Code:
modules="wpa_supplicant"
wpa_supplicant_enp0s20u4="-Dwext -ienp0s20u4 -c/etc/wpa_supplicant/wpa_supplicant.config -f /var/log/wpa_supplicant.log -dd"

config_enp0s20u4="dhcp"


/var/log/wpa_supplicant.log:
https://bpaste.net/raw/80404a3cbc82
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Wed Mar 30, 2016 8:33 pm    Post subject: Reply with quote

jommes wrote:
/etc/conf.d/net.enp0s20u4:
Code:
modules="wpa_supplicant"
wpa_supplicant_enp0s20u4="-Dwext -ienp0s20u4 -c/etc/wpa_supplicant/wpa_supplicant.config -f /var/log/wpa_supplicant.log -dd"

jommes ... I suspect your issue is caused by the use of the wext driver (which is the cause of the 'ioctl[SIOCSIWENCODEEXT]: Invalid argument' errors in wpa_supplicant.log).

Also, you don't need to provide -i<interface> ... that is defined by the variable name, and the config is normally suffixed '.conf' (not '.config'). The following should be correct:

/etc/conf.d/net.enp0s20u4:
wpa_supplicant_enp0s20u4="-Dnl80211 -dd -f /var/log/wpa_supplicant.log"

HTH & best ... khay
Back to top
View user's profile Send private message
jburns
Veteran
Veteran


Joined: 18 Jan 2007
Posts: 1213
Location: Massachusetts USA

PostPosted: Wed Mar 30, 2016 10:27 pm    Post subject: Reply with quote

If -Dnl80211 does not work try -D8812au
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Mar 31, 2016 6:59 am    Post subject: Reply with quote

jburns wrote:
If -Dnl80211 does not work try -D8812au

jburns ... you are confusing linux drivers with wpa_supplicant drivers ... the above '8812au' doesn't exist as a possible option:

wpa_supplicant -h:
drivers:
  nl80211 = Linux nl80211/cfg80211
  wext = Linux wireless extensions (generic)
  wired = Wired Ethernet driver

best ... khay
Back to top
View user's profile Send private message
jommes
n00b
n00b


Joined: 19 Mar 2016
Posts: 35

PostPosted: Thu Mar 31, 2016 2:47 pm    Post subject: Reply with quote

Hi,

first of all thanks for reply.

with nl80211 driver I get:
Code:
wpa_supplicant v2.5
random: Trying to read entropy from /dev/random
Successfully initialized wpa_supplicant
Initializing interface 'enp0s20u4' conf '/etc/wpa_supplicant/wpa_supplicant.config' driver 'nl80211' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant/wpa_supplicant.config' -> '/etc/wpa_supplicant/wpa_supplicant.config'
Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.config'
ctrl_interface='/var/run/wpa_supplicant'
ctrl_interface_group='0'
update_config=1
ap_scan=1
Line: 7 - start of a new network block
ssid - hexdump_ascii(len=11):
     57 4c 41 4e 2d 35 43 57 4d 4e 4d                  WLAN-5CWMNM     
PSK - hexdump(len=32): [REMOVED]
pairwise: 0x10
group: 0x10
Priority group 0
   id=0 ssid='WLAN-5CWMNM'
nl80211: Driver does not support authentication/association or connect commands
nl80211: deinit ifname=enp0s20u4 disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
netlink: Operstate: ifindex=2 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Set mode ifindex 2 iftype 2 (STATION)
nl80211: Failed to set interface 2 to mode 2: -19 (No such device)
enp0s20u4: Failed to initialize driver interface
Failed to add interface enp0s20u4
enp0s20u4: Cancelling scan request
enp0s20u4: Cancelling authentication timeout
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Mar 31, 2016 2:58 pm    Post subject: Reply with quote

jommes ...

can I see the relevent part of dmesg when you connect the device ...

best ... khay
Back to top
View user's profile Send private message
jommes
n00b
n00b


Joined: 19 Mar 2016
Posts: 35

PostPosted: Thu Mar 31, 2016 3:05 pm    Post subject: Reply with quote

Quote:
can I see the relevent part of dmesg when you connect the device ...


https://bpaste.net/raw/53f17d4dce5c
Plugged device in at [ 52.743171]

Best regards
Back to top
View user's profile Send private message
jommes
n00b
n00b


Joined: 19 Mar 2016
Posts: 35

PostPosted: Thu Mar 31, 2016 3:53 pm    Post subject: Reply with quote

When I try to perfom
Code:
/etc/init.d/net.enp0s20u4 start

I get:
Code:
 * Bringing up interface enp0s20u4
 *   Starting wpa_supplicant on enp0s20u4 ...
 *   /etc/wpa_supplicant/wpa_supplicant.conf not found
 * ERROR: net.enp0s20u4 failed to start


but the conf is there ...
Back to top
View user's profile Send private message
jommes
n00b
n00b


Joined: 19 Mar 2016
Posts: 35

PostPosted: Thu Mar 31, 2016 4:07 pm    Post subject: Reply with quote

Ok I was able to fix the init error.

It seems everything is fine now (with wext driver).
wpa_supplicant log:
https://bpaste.net/raw/0fc7e7285d8a

But still no internet connection ...
Back to top
View user's profile Send private message
jommes
n00b
n00b


Joined: 19 Mar 2016
Posts: 35

PostPosted: Thu Mar 31, 2016 4:48 pm    Post subject: [Solved] Wi-Fi RTL8812AU troubles Reply with quote

It works now!

I also added wpa_supplicant to runlevel default (network interface was already on boot).
Used dhcp to configure my network interface and used wext as wpa_supplicant driver.

Thanks everyone and have a nice day!

Best
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Mar 31, 2016 5:08 pm    Post subject: Reply with quote

jommes wrote:
Code:
 * Bringing up interface enp0s20u4
 *   Starting wpa_supplicant on enp0s20u4 ...
 *   /etc/wpa_supplicant/wpa_supplicant.conf not found
 * ERROR: net.enp0s20u4 failed to start

but the conf is there ...

jommes ... I did mentioned this above, you have been using the suffix "*.config".

jommes wrote:
I also added wpa_supplicant to runlevel default (network interface was already on boot). Used dhcp to configure my network interface and used wext as wpa_supplicant driver.

You shouldn't do this, wpa_supplicant is defined in /etc/conf.d/net and so will be started by /etc/init.d/net.<interface>. Also, when using net.<interface> dhcp is the default, so you shouldn't need to start a dhcp client to get an ip address. Also, 'net.<interface>' should be in the 'default' runlevel and not 'boot'.

best ... khay
Back to top
View user's profile Send private message
jommes
n00b
n00b


Joined: 19 Mar 2016
Posts: 35

PostPosted: Thu Mar 31, 2016 5:14 pm    Post subject: Reply with quote

Quote:
I did mentioned this above, you have been using the suffix "*.config".

Yes, you were right.

Now the behavior is quite strange again.
My network interface receives a rubbish ip address ...

When the internet connection was there, I performed
Code:
emerge --sync

and while performing, it stopped ...

Removed wpa_supplicant from any runlevel.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Mar 31, 2016 5:31 pm    Post subject: Reply with quote

jommes wrote:
Now the behavior is quite strange again. My network interface receives a rubbish ip address ...

jommes ... 'rubbish' as in a link-local address? That will happen if your dhcp client doesn't get a reply from its request (so, bad network connection or no dhcp server reply).

jommes wrote:
When the internet connection was there, I performed 'emerge --sync' and while performing, it stopped ...

That, and the above, sound as though the signal/link quality is bad ... see the output of 'iw dev <interface> link, or 'iwconfig <interface>', and check the status in 'wpa_cli status'.

best ... khay
Back to top
View user's profile Send private message
jommes
n00b
n00b


Joined: 19 Mar 2016
Posts: 35

PostPosted: Thu Mar 31, 2016 5:47 pm    Post subject: Reply with quote

Hi khay,

Link Quality 100/100 Signal level=67/100

The situtation is now:
After boot, sometimes connection is established, sometimes not (if not, than network interface got rubbish ip).

Maybe you are right, maybe signal level of 67 is too bad?
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Mar 31, 2016 7:04 pm    Post subject: Reply with quote

jommes wrote:
Link Quality 100/100 Signal level=67/100

If that is the 'link quality' then its fine ... though 'signal level' should be in dBm and not ratios.

jommes wrote:
The situtation is now: After boot, sometimes connection is established, sometimes not (if not, than network interface got rubbish ip).

I should give you my "its radio" lecture but you can search the forum for that ... there are various things that can be happening here, ie high txpower (so tighter frames and therefore more packet loss), or poor driver/firmware quality, environmental pollution, etc, etc, etc ... I can't tell from the information so far provided.

jommes wrote:
Maybe you are right, maybe signal level of 67 is too bad?

That isn't 'signal' ... it should show '-<number> dBm'

best ... khay
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Thu Mar 31, 2016 7:16 pm    Post subject: Reply with quote

I am following the thread, when the signal level=40/100 generally I can connect and the link work. So, if the signal level=67/100 it is enough good for the data transfer to be stable. I think here the module who drive the wireless card can loose packets or things like that.

If the 8812au module need some Realtek staging drivers to be activated, this can explain why the link is not good.
_________________
Paul
Back to top
View user's profile Send private message
jommes
n00b
n00b


Joined: 19 Mar 2016
Posts: 35

PostPosted: Thu Mar 31, 2016 7:43 pm    Post subject: Reply with quote

Hi Logicien,

Quote:
If the 8812au module need some Realtek staging drivers to be activated, this can explain why the link is not good.


I'm not pretty sure yet, but I got connection with r8712u driver.

Best regards
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum