You are not logged in.

#1 2018-06-02 09:37:32

i_like_dumb_devices
Member
Registered: 2018-06-02
Posts: 13

[Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

First timer here, I have installed archlinux-2018.05.01-x86_64 on a laptop with RTL8723B USB 2.0 hardware (wired inside) successfully, ethernet is working. However, I couldn't get wifi authenticated. Here is what I have tried:

1) wifi-menu shows ssid, password entered, hangs and fail.

 journalctl -xe

gives error: WPA association/authentication failed for interface 'wl..' after 3 tries.

2) added TimeoutDHCP=30 to wifi-menu config at created profile, no luck as it doesn't even wait.

3) rfkill unblock wifi, rfkill unblock 0, rfkill unblock 1

4) installed crda and set reg to country code (TR), reboot, no luck.

3) generated wifi.conf using wpa_passphrase with psk, failed.

4) nmcli also scans the network but doesnt connect.

5) switched my wireless router to WEP then back to WPA2-PSK.

6) I have did clone/make/install for https://github.com/lwfinger/rtl8723bu then modprobe -v 8723bu, reboot, modprobe again, no luck

other info:
lsusb is giving "0bda:b720"
dmesg | grep 80211 is giving "failed to load regulatory.db", I tried adding /etc/sysconfig/regdomain, reboot, same. I can set "iw reg set TR" anyway.


Thanks for any help.

Last edited by i_like_dumb_devices (2018-06-03 16:52:35)

Offline

#2 2018-06-02 11:14:52

seth
Member
Registered: 2012-09-03
Posts: 15,352

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

https://bbs.archlinux.org/viewtopic.php?id=57855

Please stop and disable all managing services (dhcpcd, networkmanager, ...), ensure the device is unblocked and try either a manual connect (though wifi-menu should do as well for the most part, in this case ensure the interface is down before running wif-menu) and paste the journal for that time. The auth error will be preceeded by more messages and contain a status code.

Offline

#3 2018-06-02 13:11:29

i_like_dumb_devices
Member
Registered: 2018-06-02
Posts: 13

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

Hi Seth, I did as you said to ensure that state:

rfkill unblock 0
rfkill unblock 1
systemctl disable NetworkManager.service
systemctl list-unit-files <-- shows dhcpd and network manager is disabled
ip link set dev wlp0s21f0u7i2 down
wifi-menu

Here is a sample output from journalctl -xe, sorry it had to be handwritten, following occurs 3 times:

kernel: wlp0s21f0u7i2: send auth to 74:ea.. (try 1/3)
kernel: wlp0s21f0u7i2: send auth to 74:ea.. (try 2/3)
kernel: wlp0s21f0u7i2: send auth to 74:ea.. (try 3/3)
kernel: wlp0s21f0u7i2: authentication with 74:ea.. timed out
NetworkManager[366] <info> device (wlp0s21f0u7i2): supplicant interface state: inactive -> disconnected
NetworkManager[366] <info> device (wlp0s21f0u7i2): supplicant interface state: disconnected -> inactive

and finally:

network[515]: WPA association/authentication failed for interface 'wlp0s21f0u7i2'
NetworkManager[366]: <info> device (wlp0s21f0u7i2): supplicant interface state: inactive -> disabled
network[515]: Failed to bring the network up for profile 'wlp0s21f0u7i2-wispot'
systemd[1]: netctl@wlp0s21f0u7i2\x2dwispot.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: netctl@wlp0s21f0u7i2\x2dwispot.service: Failed with result 'exit-code'.
systemd[1]: Failed to start Networking for netctl profile wlp0s21f0u7i2-wispot.

If you mean other tools by connecting manually, I have tried both nmcli and wpa_supplicant when services were enabled as listed above.
Cheers

Offline

#4 2018-06-02 13:24:44

seth
Member
Registered: 2012-09-03
Posts: 15,352

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

Merely disabling is not sufficient, and NetworkManager is still running according to the log:

systemctl list-units| grep -iE '(net|conn|dhcp|wicd)'

You will also have to stop them - plus it looks like systemd-netword is running as well.

Not sure why you need to hand-copy stuff (afaiu the wired connection works?) - try to use a USB key to copy the data or at worst post images (please only links to the image board, no full size images)
The communication previous to the auth attempts (and notably the messages from wpa_supplicant) will be relevant as well.

Offline

#5 2018-06-02 16:16:03

i_like_dumb_devices
Member
Registered: 2018-06-02
Posts: 13

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

Seth thank you for heads up. Just installed xfce so I can copy paste quick. For notes, this problem is there since the live cd (before I even installed network manager) however I made ensure it is not running anymore:

$ systemctl list-units | grep -iE '(net|conn|dhcp|wicd)'
sys-devices-pci0000:00-0000:00:15.0-usb1-1\x2d1-1\x2d1:1.0-net-enp0s21f0u1.device             loaded active plugged   RTL8152 Fast Ethernet Adapter                                                          
sys-devices-pci0000:00-0000:00:15.0-usb1-1\x2d7-1\x2d7:1.2-net-wlp0s21f0u7i2.device           loaded active plugged   802.11n_WLAN_Adapter                                                                   
sys-subsystem-net-devices-enp0s21f0u1.device                                                  loaded active plugged   RTL8152 Fast Ethernet Adapter                                                          
sys-subsystem-net-devices-wlp0s21f0u7i2.device                                                loaded active plugged   802.11n_WLAN_Adapter                                                                   

Checking if systemd-network is running:

$ systemctl list-unit-files | grep networkd
systemd-networkd-wait-online.service                             disabled       
systemd-networkd.service                                         disabled       
systemd-networkd.socket                                          disabled 

rfkill unblock all again (always unblocked though) then wifi-menu. Finally, I have a clearer journal as follows:

-- 
-- Unit UNIT has finished starting up.
-- 
-- The start-up result is RESULT.
Jun 02 19:00:35 archlinux systemd[368]: Startup finished in 58ms.
-- Subject: User manager start-up is now complete
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The user manager instance for user 0 has been started. All services queued
-- for starting have been started. Note that other services might still be starting
-- up or be started at any later time.
-- 
-- Startup of the manager took 58980 microseconds.
Jun 02 19:00:35 archlinux login[367]: ROOT LOGIN ON tty1
Jun 02 19:02:42 archlinux systemd[1]: Reloading.
Jun 02 19:02:42 archlinux systemd-gpt-auto-generator[401]: Failed to dissect: Input/output error
Jun 02 19:02:42 archlinux systemd[395]: /usr/lib/systemd/system-generators/systemd-gpt-auto-generator failed with exit status 1.
Jun 02 19:02:44 archlinux systemd[1]: Reloading.
Jun 02 19:02:44 archlinux systemd-gpt-auto-generator[415]: Failed to dissect: Input/output error
Jun 02 19:02:44 archlinux systemd[409]: /usr/lib/systemd/system-generators/systemd-gpt-auto-generator failed with exit status 1.
Jun 02 19:03:25 archlinux kernel: IPv6: ADDRCONF(NETDEV_UP): wlp0s21f0u7i2: link is not ready
Jun 02 19:03:33 archlinux systemd[1]: Created slice system-netctl.slice.
-- Subject: Unit system-netctl.slice has finished start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit system-netctl.slice has finished starting up.
-- 
-- The start-up result is RESULT.
Jun 02 19:03:33 archlinux systemd[1]: Starting Networking for netctl profile wlp0s21f0u7i2-wispot...
-- Subject: Unit netctl@wlp0s21f0u7i2\x2dwispot.service has begun start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit netctl@wlp0s21f0u7i2\x2dwispot.service has begun starting up.
Jun 02 19:03:33 archlinux network[490]: Starting network profile 'wlp0s21f0u7i2-wispot'...
Jun 02 19:03:33 archlinux kernel: IPv6: ADDRCONF(NETDEV_UP): wlp0s21f0u7i2: link is not ready
Jun 02 19:03:34 archlinux kernel: wlp0s21f0u7i2: authenticate with 74:ea:3a:fd:7f:e8
Jun 02 19:03:34 archlinux kernel: wlp0s21f0u7i2: send auth to 74:ea:3a:fd:7f:e8 (try 1/3)
Jun 02 19:03:35 archlinux kernel: wlp0s21f0u7i2: send auth to 74:ea:3a:fd:7f:e8 (try 2/3)
Jun 02 19:03:35 archlinux kernel: wlp0s21f0u7i2: send auth to 74:ea:3a:fd:7f:e8 (try 3/3)
Jun 02 19:03:35 archlinux kernel: wlp0s21f0u7i2: authentication with 74:ea:3a:fd:7f:e8 timed out
Jun 02 19:03:36 archlinux kernel: wlp0s21f0u7i2: authenticate with 74:ea:3a:fd:7f:e8
Jun 02 19:03:36 archlinux kernel: wlp0s21f0u7i2: send auth to 74:ea:3a:fd:7f:e8 (try 1/3)
Jun 02 19:03:36 archlinux kernel: wlp0s21f0u7i2: send auth to 74:ea:3a:fd:7f:e8 (try 2/3)
Jun 02 19:03:37 archlinux kernel: wlp0s21f0u7i2: send auth to 74:ea:3a:fd:7f:e8 (try 3/3)
Jun 02 19:03:37 archlinux kernel: wlp0s21f0u7i2: authentication with 74:ea:3a:fd:7f:e8 timed out
Jun 02 19:03:38 archlinux kernel: wlp0s21f0u7i2: authenticate with 74:ea:3a:fd:7f:e8
Jun 02 19:03:38 archlinux kernel: wlp0s21f0u7i2: send auth to 74:ea:3a:fd:7f:e8 (try 1/3)
Jun 02 19:03:39 archlinux kernel: wlp0s21f0u7i2: send auth to 74:ea:3a:fd:7f:e8 (try 2/3)
Jun 02 19:03:39 archlinux kernel: wlp0s21f0u7i2: send auth to 74:ea:3a:fd:7f:e8 (try 3/3)
Jun 02 19:03:39 archlinux kernel: wlp0s21f0u7i2: authentication with 74:ea:3a:fd:7f:e8 timed out
Jun 02 19:03:41 archlinux kernel: wlp0s21f0u7i2: authenticate with 74:ea:3a:fd:7f:e8
Jun 02 19:03:41 archlinux kernel: wlp0s21f0u7i2: send auth to 74:ea:3a:fd:7f:e8 (try 1/3)
Jun 02 19:03:41 archlinux kernel: wlp0s21f0u7i2: send auth to 74:ea:3a:fd:7f:e8 (try 2/3)
Jun 02 19:03:42 archlinux kernel: wlp0s21f0u7i2: send auth to 74:ea:3a:fd:7f:e8 (try 3/3)
Jun 02 19:03:42 archlinux kernel: wlp0s21f0u7i2: authentication with 74:ea:3a:fd:7f:e8 timed out
Jun 02 19:03:49 archlinux network[490]: WPA association/authentication failed for interface 'wlp0s21f0u7i2'
Jun 02 19:03:50 archlinux network[490]: Failed to bring the network up for profile 'wlp0s21f0u7i2-wispot'
Jun 02 19:03:50 archlinux systemd[1]: netctl@wlp0s21f0u7i2\x2dwispot.service: Main process exited, code=exited, status=1/FAILURE
Jun 02 19:03:50 archlinux systemd[1]: netctl@wlp0s21f0u7i2\x2dwispot.service: Failed with result 'exit-code'.
Jun 02 19:03:50 archlinux systemd[1]: Failed to start Networking for netctl profile wlp0s21f0u7i2-wispot.
-- Subject: Unit netctl@wlp0s21f0u7i2\x2dwispot.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit netctl@wlp0s21f0u7i2\x2dwispot.service has failed.
-- 
-- The result is RESULT.
Jun 02 19:03:50 archlinux systemd[1]: Reached target Network.
-- Subject: Unit network.target has finished start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit network.target has finished starting up.
-- 
-- The start-up result is RESULT.

Offline

#6 2018-06-02 16:23:10

loqs
Member
Registered: 2014-03-06
Posts: 10,985

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

Disable netctl@wlp0s21f0u7i2\x2dwispot.service if it is enabled then reboot the system.  Then check the output of ip link is wlp0s21f0u7i2 in the options in <> is UP or LOWER_UP present?

Offline

#7 2018-06-02 16:36:00

i_like_dumb_devices
Member
Registered: 2018-06-02
Posts: 13

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

Hey loqs, status isn't even there, options just ends with "MULTICAST> .. DOWN .." for the wireless interface and netctl@wlp0s21f0u7i2\x2dwispot.service isn't registered at all when I do systemctl list-unit-files | grep netctl. Tried reboot as well.

Offline

#8 2018-06-02 16:41:03

loqs
Member
Registered: 2014-03-06
Posts: 10,985

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

That is actually good as it means nothing is trying to start the interface.  Please follow Wireless_network_configuration#Activate_the_interface
See which step if any of manually connecting fails.

Offline

#9 2018-06-02 19:08:49

i_like_dumb_devices
Member
Registered: 2018-06-02
Posts: 13

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

I have gone further and started over with wpa_supplicant:

(brought wlp0s21f0u7i2 interface UP manually)
wpa_passphrase wispot mypassword > /etc/wpa_supplicant/example.conf
wpa_supplicant -B -i wlp0s21f0u7i2 -c /etc/wpa_supplicant/example.conf
wpa_cli
> enable_network 0
OK
<3>CTRL-EVENT-SSID-REENABLED id=0 ssid="wispot"
<3>CTRL-EVENT-SCAN-RESULTS
<3>Trying to associate with 74:ea:3a:fd:7f:e8 (SSID='wispot' freq=2412 MHz)
<3>Authentication with 74:ea:3a:fd:7f:e8 timed out.
<3>CTRL-EVENT-DISCONNECTED bssid=74:ea:3a:fd:7f:e8 reason=3 locally_generated=1
<3>CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="wispot" auth_failures=1 duration=10 reason=CONN_FAILED

Additional notes:
- I also tried -D wext for wpa_supplicant.
- I switched to AES from TKIP in my router just in case.
- I added ctrl_interface, group as wheel, ap_scan=1 and country=TR in beginning of example.conf, no effect.

Unfortunately CONN_FAILED isn't explicit hmm

Last edited by i_like_dumb_devices (2018-06-02 19:10:08)

Offline

#10 2018-06-02 19:18:16

seth
Member
Registered: 2012-09-03
Posts: 15,352

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

Any chance the router has a MAC filter?
Can you access its logs?

Offline

#11 2018-06-02 19:30:16

i_like_dumb_devices
Member
Registered: 2018-06-02
Posts: 13

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

Nop, it doesn't have a mac filter and have no issues with this new laptop when it is booted in Windows (I have dual boot now). Unfortunately not much in syslog even I cleared and tried again. Router model: 54M Wireless Router Model No. TL-WR340G/TL-WR340GD.  Is there any chance I can see if https://github.com/lwfinger/rtl8723bu is in effect after modprobe or perhaps which driver is being used by the interface?

Last edited by i_like_dumb_devices (2018-06-02 19:38:07)

Offline

#12 2018-06-02 19:52:07

i_like_dumb_devices
Member
Registered: 2018-06-02
Posts: 13

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

I will dig into following for a while as this might be related: https://github.com/lwfinger/rtl8723bu/issues/32 and https://github.com/lwfinger/rtl8723bu/issues/49

Last edited by i_like_dumb_devices (2018-06-02 19:58:49)

Offline

#13 2018-06-02 19:53:53

loqs
Member
Registered: 2014-03-06
Posts: 10,985

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

Yes check the dmesg for the module name can you also post the output of dmesg please.
Edit:
RTL8723BU is supported by the in tree kernel driver rtl8xxxu
Edit:
might be worth disabling the 8723bu and switching back to the rtl8xxxu and seeing if the manual connection fails with the same output.

Last edited by loqs (2018-06-02 20:00:33)

Offline

#14 2018-06-02 21:16:17

i_like_dumb_devices
Member
Registered: 2018-06-02
Posts: 13

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

Okay I have some interesting traction, I'm able make connection work for distance of 1 meters in very weird way:

modprobe -rfv rtl8xxxu
make install  (in lwfingers 8723bu repo)
reboot
wpa_supplicant -B -i wlp0s21f0u7i2 -c /etc/wpa_supplicant/example.conf
(watch wpa_cli for a while, see connection is established!)
dhcpcd

then voila, gets the IP! However two big issues:
- after reboot, can not connect again, perhaps rtl8xxxxu recovering to its previous state? lsusb -t always giving rtl8xxxxu anyway.
- I start a ping command, go away more than 1m from the router, then ping hangs, if I get near, it goes on lol

Last edited by i_like_dumb_devices (2018-06-02 21:28:53)

Offline

#15 2018-06-02 21:36:08

seth
Member
Registered: 2012-09-03
Posts: 15,352

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

5GHz or 2.4GHz? Is there also a bluetooth device (can you rfkill it)?
Did you check dmesg for which module is actually in use after the (first) reboot?

After a successful connection, please dump

iw dev wlp0s21f0u7i2 link
iw dev wlp0s21f0u7i2 station dump

Offline

#16 2018-06-02 21:57:25

i_like_dumb_devices
Member
Registered: 2018-06-02
Posts: 13

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

Hey Seth, I might be wrong about reboot, I managed to connect again without typing anything (supplicant quickly grabbed the connection) but just dhcpcd finally.  I also rfkilled bluetooth as you have advised (no change on speed). I hope I can resolve this slowness. Router is operating in 2.4 GHz with 54M (802.11g). Here is the output for  iw dev commands:

$ iw dev wlp0s21f0u7i2 link
Connected to 74:ea:3a:fd:7f:e8 (on wlp0s21f0u7i2)
	SSID: wispot
	freq: 2412
	RX: 614124 bytes (9242 packets)
	TX: 90467 bytes (670 packets)
	signal: -66 dBm
	tx bitrate: 1.0 MBit/s

	bss flags:	short-preamble short-slot-time
	dtim period:	1
	beacon int:	100

$ iw dev wlp0s21f0u7i2 station dump
Station 74:ea:3a:fd:7f:e8 (on wlp0s21f0u7i2)
	inactive time:	433 ms
	rx bytes:	659375
	rx packets:	10021
	tx bytes:	93066
	tx packets:	700
	tx retries:	0
	tx failed:	0
	beacon loss:	1
	beacon rx:	4636
	rx drop misc:	179
	signal:  	-66 dBm
	signal avg:	-68 dBm
	beacon signal avg:	190 dBm
	tx bitrate:	1.0 MBit/s
	rx bitrate:	18.0 MBit/s
	authorized:	yes
	authenticated:	yes
	associated:	yes
	preamble:	long
	WMM/WME:	no
	MFP:		no
	TDLS peer:	no
	DTIM period:	1
	beacon interval:100
	short preamble:	yes
	short slot time:yes
	connected time:	485 seconds

Last edited by i_like_dumb_devices (2018-06-02 21:58:15)

Offline

#17 2018-06-02 22:30:07

i_like_dumb_devices
Member
Registered: 2018-06-02
Posts: 13

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

@loqs disabling 8723bu totally fails the connection, tried several times (blacklisting in modprobe)

Last edited by i_like_dumb_devices (2018-06-02 22:30:55)

Offline

#18 2018-06-02 22:35:09

loqs
Member
Registered: 2014-03-06
Posts: 10,985

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

What is the output of `pacman -Qkk linux-firmware`

Offline

#19 2018-06-02 22:40:31

i_like_dumb_devices
Member
Registered: 2018-06-02
Posts: 13

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

Here:

# pacman -Qkk linux-firmware
warning: linux-firmware: /usr/lib/firmware/rtl_bt/rtl8723b_fw.bin (Permissions mismatch)
warning: linux-firmware: /usr/lib/firmware/rtl_bt/rtl8723b_fw.bin (Modification time mismatch)
linux-firmware: 1935 total files, 1 altered file

Offline

#20 2018-06-03 07:24:08

seth
Member
Registered: 2012-09-03
Posts: 15,352

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

You get -66dBm 1m away from the router??
That's ~ 1000 times (no exaggeration) lower that you could expect.

iwconfig wlp0s21f0u7i2
iw reg get

Offline

#21 2018-06-03 12:49:47

i_like_dumb_devices
Member
Registered: 2018-06-02
Posts: 13

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

Seth, as because same connection works very fast on different OS, I think that proves it is a firmware/configuration issue. It is also interesting I couldn't get nmcli or wifi-menu working (I will try wicd or else live cd today), but wpa_supplicant only. Regulatory has almost no effect as I also tried with or without in wpa_supplicant conf, but I will check the commands you provided. Cheers

Last edited by i_like_dumb_devices (2018-06-03 12:51:29)

Offline

#22 2018-06-03 14:49:38

seth
Member
Registered: 2012-09-03
Posts: 15,352

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

Yes, the idea is that the configured txpower could be too low, thus the commands (iwconfig will print the txpower and other stuff, idk at hand how to query it w/ iw; iw reg get will print details about the configured region, which might explain a low txpower - if that's the problem)

Offline

#23 2018-06-03 16:49:29

i_like_dumb_devices
Member
Registered: 2018-06-02
Posts: 13

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

Solved it! I will give the dirty dump and then optimize it later. Found the issue here: https://github.com/lwfinger/rtlwifi_new/issues/102

modprobe -rfv 8723bu
modprobe -rtv rtl8xxxu
modprobe -v 8723bu ant_sel=1
modprobe -v rtl8xxxu ant_sel=1

(I will add modprobe conf for startup and see if both parameters are required.)

Now, even wifi-menu works and I see 10 times more networks around!  Seth thank you for pointing me to the low signal issue and loqs for hint on drivers! Happy to join arch family smile

Last edited by i_like_dumb_devices (2018-06-03 16:53:58)

Offline

#24 2018-06-03 17:25:52

loqs
Member
Registered: 2014-03-06
Posts: 10,985

Re: [Solved] WiFi network scans but doesn't connect / RTL8723B USB 2.0

Only one of rtl8xxxu or 8723bu should be needed.  If you can use either it would probably be easiest to use the in tree rtl8xxxu then
remove the 8723bu and reinstall the linux-firmware package to fix the files the manual install overwrote.

Offline

Board footer

Powered by FluxBB