wifi: RTL8811CU (works!)

I just thought I would post my success story with a RTL8811CU USB wifi adapter on the kiwi. I had previously fought hard to get a MT7601 working and while it worked I had some stability issues. The RTL8811CU is cheap and getting it working was easy. I cracked the case open on mine and soldered a connector to be able to use an external 2.4GHz antenna (my kiwi is in a metal enclosure).

In a nutshell:

sudo apt-get update
sudo apt-get install -y build-essential dkms git
git clone https://github.com/fastoe/RTL8811CU.git
cd RTL8811CU
make
sudo make install
sudo reboot

The make step takes a while, like 20-30 minutes. Once you reboot, configure with connmanctl:

robot@ev3dev:~$ connmanctl
Error getting VPN connections: The name net.connman.vpn was not provided by any
connmanctl> enable wifi
Enabled wifi
connmanctl> scan wifi
Scan completed for wifi
connmanctl> services
*AO Wired                ethernet_b827ebbde13c_cable
                         wifi_e8de27077de3_hidden_managed_none
    AH04044914           wifi_e8de27077de3_41483034303434393134_managed_psk
    Frissie              wifi_e8de27077de3_46726973736965_managed_psk
    ruijgt gast          wifi_e8de27077de3_7275696a67742067617374_managed_psk
    schuur               wifi_e8de27077de3_736368757572_managed_psk
connmanctl> agent on
Agent registered
connmanctl> connect wifi_e8de27077de3_41      # You can use the TAB key at this point to autocomplete the name
connmanctl> connect wifi_e8de27077de3_41483034303434393134_managed_psk
Agent RequestInput wifi_e8de27077de3_41483034303434393134_managed_psk
  Passphrase = [ Type=psk, Requirement=mandatory ]
Passphrase? *************
Connected wifi_e8de27077de3_41483034303434393134_managed_psk
connmanctl> quit

Cheers!

Nick W1NJC

Comments

  • Nick:

    Thanks for the clear instructions. I tried, and when I get to the make step, the following happens:

    make ARCH=arm CROSS_COMPILE= -C /lib/modules/4.19.94-ti-r42/build M=/home/debian/RTL8811CU modules

    make[1]: *** /lib/modules/4.19.94-ti-r42/build: No such file or directory. Stop.

    make: *** [Makefile:2217: modules] Error 2

    Looks like a module should be there, but when I go this, I don't see a build directory or file

    debian@kiwisdr:/lib/modules/4.19.94-ti-r42$ ls

    extra  modules.alias   modules.builtin   modules.dep   modules.devname modules.softdep modules.symbols.bin

    kernel modules.alias.bin modules.builtin.bin modules.dep.bin modules.order  modules.symbols


    Any suggestions appreciated. I'm not terribly versed in Linux compilation, but have faint memories from years ago.

    Eric

  • /lib/modules/4.19.94-ti-r42/build should be a link to the linux headers,

    Which should be in the package linux-headers-4.19.94-ti-r42 in this case, so "sudo apt install linux-headers-4.19.94-ti-r42" should install them.


    BTW, I got mt76x2u based USB dongles running with the stock kernel on debian 11, they can even do 5 GHz. But the driver seem to use a lot of CPU, so the waterfall gets slow, if there is a lot of traffic. But there's no audio buffer underruns.

  • Hi @eric_j_johnson . I think HB9TMC is right with the package that is missing. I remember when I was getting the MT7601 working I had to install the headers.

    Nick

  • thanks both. with this install, the compilation went fine (although it took a while)

    I am able to connect to the wireless nicely, but have problems when I reboot the kiwi/beagle

    Is there anything I am missing to have this startup automatically at reboot? the beable is running debian 10.11.

    Thanks again so much.

  • Hi Eric,

    Try it with the wired LAN disconnected and see if it connects on its own. I seem to remember this issue before, though I think I must have done something to make it connect even when the wired is present.

    Nick

  • Which brand/model do you use with the RTL8811CU which supports 5 GHz?

  • Listed as:

    USB Wireless Adapter 600Mbps Realtek RTL8811CU Chipset Mini Type Dual Band 11AC WiFi Dongle IEEE 802.11 a b g n ac for Laptop Desktop IPTV USB 3.0 Network Adapter Support Windows 10 Mac Linux

    link at amazon: https://www.amazon.com/gp/product/B078NRDTYK/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1


    @Nick tried your suggestion. It did boot and connect, but then eventually dropped the connection as is did when the wired lan was connected. I'll investigate later, I've seen some discussion of issues with connmanctl doing scans and turning off the connection, or of other control software running as well and interfering with connman. This is not crucial, but I was going to experiment with moving the kiwisdr farther from the house. Any other thoughts or experiences appreciated. I know that wireless lan is not supported, but thanks to both HB9TMC and njc for help.

    Eric

  • Definitely make sure it's not a signal issue.

    You could also try this:

     cd /opt/scripts/tools
    ./update_kernel.sh
    

    Reboot and then see if it's any different.

    More info and things to try here: https://learn.adafruit.com/setting-up-wifi-with-beaglebone-black/configuration

  • You can also type "dmesg -t" and check if there are any messages at that time which would explain why the wifi connection dropped.

    Or "journalctl |tail -n 1000"

  • Log analysis is a great idea. When I was troubleshooting, I ran this script as a cron job every 5 min. Perhaps it will be helpful to you. In the crontab I piped the output to a log file, e.g.:

    crontab -e
     */5 * * * * /root/wifi_connect.sh >> /root/wifi_connect.log
    

    wifi_connect.sh:

    #/bin/bash
    # #/var/lib/connman
    ROUTER="<your router/gateway IP>"
    DATE=`date`
    echo $DATE
    uptime
    #ping router
    echo "Checking connectivity to $ROUTER"
    ping -c3 $ROUTER > /dev/null
    if [ $? != 0 ]; then
        echo "Disconnected, attempting to reconnect"
        connmanctl connect wifi_<connection Id>
        echo "Reconnect command run"
    else
        echo "Ping OK"
    fi
    


    In my case it never logged anything interesting at all, not even a disconnect. This was because the wifi dongle/driver was causing the system to freeze up.

    Hope you can figure it out.

  • Thanks so much. I'll be busy for a couple of days with other stuff, but will report back. This all looks very helpful.

    Eric

Sign In or Register to comment.