VIM2_Ubuntu-mate-16.04_Linux-4.9_V170818: Slow Wifi Upload

Hi,

I recently got the VIM2 Pro, and I think it is a great piece of hardware. I bought it especially for the Wifi capabilities, I intend to turn it into a portable wifi AP/router, NAS, VPN server, and more. No other single board computer has built-in 802.11ac with 2x2 MIMO.

However, when testing the Ubuntu image, my wifi upload speed is extremely poor. For example, I installed samba and ssh servers on the VIM2, and when I download or scp files from the VIM2 to my laptop, or measure using iperf, I get only 100-300 kByte/s. The connection speed remains stable, but it is extremely slow.
On the other hand, download speeds (connections to the VIM2) are great, easily maxing out my 50 Mbit/s DSL and more on the local network.

This very much looks like a driver issue to me. I also tested balbes150’s 3in1 image with Libreelec, and I can download from the VIM2 samba server with 22 MByte/s (100 times faster!), so the libreelec driver seems fine, but I want to work with Ubuntu.
The following interesting lines in iw list show that something might be wrong:

some lines from iw list:
HT TX MCS rate indexes are undefined
...
VHT TX MCS set:
1 streams: MCS 0-9
2 streams: not supported
...
VHT TX highest supported: 0 Mbps

dmesg says that enable_irq_wake failed:

a few lines from dmesg | grep -E 'wlan|bcm|4359|6359'

[ 18.098876] ======== bcm_wlan_set_plat_data ========
[ 19.003947] bcmsdh_register: register client driver
[ 19.004159] bcmsdh_sdmmc: bcmsdh_sdmmc_probe Enter
[ 19.004297] bcmsdh_sdmmc: bcmsdh_sdmmc_probe Enter
[ 19.005184] F1 signature read @0x18000000=0x17294359
[ 19.010738] F1 signature OK, socitype:0x1 chip:0x4359 rev:0x9 pkg:0x2
[ 19.011837] ======== bcm_wlan_get_mac_address ========
[ 19.011851] dhd_conf_set_chiprev: chip=0x4359, chiprev=9
[ 19.046619] dhd_conf_read_nv_by_chip: chip=0x4359, chiprev=9, name=nvram_ap6359sa.txt
[ 19.071460] Register interface [wlan0] MAC: b0:f1:ec:a3:b3:a4
[ 19.071635] bcmsdh_oob_intr_unregister: Enter
[ 19.071638] bcmsdh_oob_intr_unregister: irq is not registered
[ 22.120043] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 22.985775] F1 signature read @0x18000000=0x17294359
[ 22.991647] F1 signature OK, socitype:0x1 chip:0x4359 rev:0x9 pkg:0x2
[ 22.993787] dhd_conf_read_nv_by_chip: chip=0x4359, chiprev=9, name=nvram_ap6359sa.txt
[ 22.994424] dhd_conf_set_fw_name_by_chip: firmware_path=/lib/firmware/brcm/fw_bcm4359c0_ag.bin
[ 22.994431] dhd_conf_set_nv_name_by_chip: nvram_path=/lib/firmware/brcm/nvram_ap6359sa.txt
[ 22.994449] Final fw_path=/lib/firmware/brcm/fw_bcm4359c0_ag.bin
[ 22.994454] Final nv_path=/lib/firmware/brcm/nvram_ap6359sa.txt
[ 22.995509] dhd_os_open_image: /lib/firmware/brcm/fw_bcm4359c0_ag.bin (576532 bytes) open success
[ 23.097004] dhd_os_open_image: /lib/firmware/brcm/nvram_ap6359sa.txt (6114 bytes) open success
[ 23.284410] bcmsdh_oob_intr_register: Enter
[ 23.284416] bcmsdh_oob_intr_register: HW_OOB enabled
[ 23.284423] bcmsdh_oob_intr_register OOB irq=125 flags=0x418
[ 23.284428] bcmsdh_oob_intr_register change flags to 0x8
[ 23.284515] bcmsdh_oob_intr_register: enable_irq_wake
[ 23.284524] bcmsdh_oob_intr_register: enable_irq_wake failed with -6
[ 23.286622] ======== bcm_wlan_get_mac_address ========
[ 94.123675] CFG80211-ERROR) wl_cfg80211_scan_abort :

Hi sebber,

Maybe you can try the latest firmware VIM2_Ubuntu-mate-16.04_Linux-4.9_V171028.

Thanks.

Hi numbqq,

Thank you! I tried the new image, but it is not better. Right now I get exactly 355 kByte/s for a samba transfer from the VIM2 eMMC. The 355 kByte/s remain constant while transmitting a 170 MB file (Before I got a little less, but now my neighbours may be sleeping and don’t interfere). I still see the line HT TX MCS rate indexes are undefined when I type iw list. On my raspberry pi, they are defined, and it works better there.

My guess is that the VIM2 transmitter is stuck at the lowest MCS (BPSK, rate 1/2) in a 20 MHz channel, with a single stream (2 streams: not supported).
This would give 6 MBit/s. I would not be surprised if this corresponds exactly to 355 kByte/s Samba throughput after you factor in ACKs, headers, overhead from IP+TCP+Samba.

I still can’t understand why it worked so well in libreelec, are they using a different driver there? Can we maybe try to use the driver used in libreelec?

Thanks.

Edit: I meant “from”, not “to”. Corrected.

In Libreelec used by the kernel 3.14.29 , in firmware from the Ubuntu kernel is used 4.9.40. Perhaps in the new kernel is still not fully debugged for all work with WiFi. It would be interesting to compare the work of Wi-Fi in Armbian (both versions with kernel 3.14.29 and 4.9.40).

1 Like

Hi, I agree, that would be interesting. I tried your armbian images, but neither of them seems to support WiFi at all.
I think it would also be worth to check the performance of a USB-WiFi adapter, to see if it’s the driver or some other software. I have two realtek 8188cu lying around (those 2$ ebay dongles), but they are not recognized. The driver should be part of the linux kernel, but it does not work for the VIM2 builds. I never compiled a kernel, so I don’t know how I would include driver support for those realtek adapters.

Hi sebber,

Yes, the upload speed is very slow for kernel 4.9. We need to find out why.:disappointed_relieved:

Thanks.

Hi numbqq,

it would be great if you can solve this. For me, the WiFi with antennas built into the case was the main motivation for buying the VIM2. You could run a wireless router and NAS powered by a battery :slight_smile: The CPU is even powerful enough for encryption (50MByte/s for AES-XTS in cryptsetup benchmark). This is what puts the VIM2 ahead of the other single board computers, and also ahead of all commercial wireless NAS devices that I looked at. And the WiFi is something you already advertise heavily, but right now it is just not usable in Ubuntu.

I have a strong suspicion what the problem is: the transmitter does not seem to adjust the rate to the channel but instead always picks the lowest MCS. Testing with a different WiFi adapter could tell whether this is a driver issue or caused by other software.

1 Like

Yep, we will follow up the issue and get it resolved.

Thanks for the suggestions for the NAS Application.

Enjoy!

I’m looking forward to it too, as I bought VIM2 for this purpose (Ubuntu Server + NAS).

Hi guys, I stumbled on this thread and it reminds me of a problem I have on the VIM PRO.

The setup is the following: the VIM is configured as AP (5 GHz for what matters) running ubuntu server (kernel 4.9), the ethernet port is connected to a LAN and the kernel is configured to route packets and provide NAT to the clients on the AP subnet. A local ftp server is running on the VIM and can read/write to the internal MMC.

When a client accesses the FTP server from the Wi-Fi then a “put” commnad (write to the FTP server) runs at about 3 MB/s (B as in Bytes) while a “get” command (read from the VIM) runs at about 350 kB/s. Just to avoid misunderstanding, the download speed is much slower than the upload.
The same client accessing the VIM server from the LAN runs at about 6 MB/s for both “put” and “get”.
The numbers above are from vsftpd (ftp server) but openssh (used as sftp server) behaves more or less the same so it does not seem a problem with the specific server package.

I have no idea why this is happening, maybe some kind of issue with the Wi-Fi driver that could explain also a quite slow ping time from the AP clients to the VIM (about 20 ms). By the way I tried lowering the MTU on the Wi-Fi interface but it only makes things worse.

Cheers!

1 Like

No solution for the slow of wifi for VIM2 + Ubuntu 16.04?

:frowning: :frowning: :frowning:

Hi luchina,

We are still working for this issue, but the slow wifi upload issue for ubuntu linux 4.9 haven’t been resolved yet, sorry for that.:disappointed_relieved:

For the encryption test you did, was it for full disk encryption LUkS and was the speed results in megabit or megabytes. Do you know if the board does hardware based Encryption and decrypt since it would add more Cpu usage etc