Oh well, same issue with the powered hub, then tried with a different driver (https://github.com/pvaret/rtl8192cu-fixes)
sudo apt-get install dkms
git clone https://github.com/pvaret/rtl8192cu-fixes.git
sudo dkms add ./rtl8192cu-fixes
sudo dkms install 8192cu/1.10
sudo depmod -a
sudo cp ./rtl8192cu-fixes/blacklist-native-rtl8192.conf /etc/modprobe.d/
sudo reboot
and at next boot had the wifi up and running
> lsmod
Module Size Used by
mac80211 358429 0
mali_drm 2732 1
drm 178255 2 mali_drm
mali 123208 0
ump 29379 3 mali
8192cu 624560 0
> ifconfig
wlan1 Link encap:Ethernet HWaddr 00:13:ef:62:0a:ee
inet addr:192.168.1.4 Bcast:192.168.1.255 Mask:255.255.254.0
inet6 addr: fe80::213:efff:fe62:aee/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1492 Metric:1
RX packets:18910 errors:0 dropped:1173 overruns:0 frame:0
TX packets:34687 errors:0 dropped:2 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15112303 (14.4 MiB) TX bytes:71589296 (68.2 MiB)
> iwconfig
wlan1 IEEE 802.11bg ESSID:"WESTEROS" Nickname:"<WIFI@REALTEK>"
Mode:Managed Frequency:2.437 GHz Access Point: 00:1A:E3:B8:EA:30
Bit Rate:54 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:****-****-****-****-****-****-****-**** Security mode:open
Power Management:off
Link Quality=100/100 Signal level=92/100 Noise level=0/100
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
> cat /proc/net/wireless
Inter-| sta-| Quality | Discarded packets | Missed | WE
face | tus | link level noise | nwid crypt frag retry misc | beacon | 22
wlan1: 0000 100. 97. 0. 0 0 0 0 0 0
> iperf -c 192.168.1.22 -p 20
------------------------------------------------------------
Client connecting to 192.168.1.22, TCP port 20
TCP window size: 20.9 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.1.4 port 39951 connected with 192.168.1.22 port 20
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.2 sec 7.12 MBytes 5.88 Mbits/sec
> iperf -c 192.168.1.22 -p 20
------------------------------------------------------------
Client connecting to 192.168.1.22, TCP port 20
TCP window size: 20.9 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.1.4 port 39952 connected with 192.168.1.22 port 20
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.2 sec 21.9 MBytes 18.0 Mbits/sec
speeds are quite inconsistent, didn't go over 20Mb/s even with the AP at 4 meters, but that's not a big concern for now, maybe it only needs some tweaking, but at least it is working!
Here is the dmesg of the successful association:
Thanks everyone for helping me solve this problem.
If you log in on this console, executing
dmesg -w
on this console will give you real-time dmesg output until reboot/crash occurs.
Also you can experiment with kernel command line in boot.cmd/boot.scr, setting "console=ttyS0 loglevel=6" and disabling login on this console (sudo systemctl disable serial-getty@ttyS0) should put all kernel messages to ttyS0 (console available on separate 3-pin header). In case you use high enough loglevel (like 6 or 7), I would recommend increasing scrollback buffer size in your terminal application or enabling logging to file.