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:
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.:
wifi_connect.sh:
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
Finally got back to this with good results on both kiwi1 and a kiwi2
With Buster (debian 10), the key as noted by njc is to disconnect the network cable.
and as noted above, it is necessary to install headers:
package linux-headers-4.19.94-ti-r42 in this case, so "sudo apt install linux-headers-4.19.94-ti-r42"
On the kiwi2, the process is similar, but again need to install an appropriate set of headers, as indicated by the error message. Connman is not installed and I could not get it to run in debian 11. However the process here. https://forum.beagleboard.org/t/debian-11-x-bullseye-monthly-snapshot-2023-10-07/31280 did the trick. Again seems stable once the cable is removed.
Appreciate the support.
when I get 'Make' I get this Error....
What can I do to Fix....?
@ShaneBrook It needs the kernel headers:
"sudo apt install linux-headers-4.19.94-ti-r42"
Well, I got past the last error...
Now, I'm stuck again....
I get this error....
I got it fixed.... Thank you....
If I Disconnect the LAN from the KiwiSDR the WIFI and Lan crashes...
What can I do to stop this?
Thanks.....
HI Shane,
I'm curious how you got the other problem fixed. After the crash, is the kernel still running (if you plug LAN back in, can you connect?) Also, what happens if you boot up with the wired LAN disconnected?
Nick
I followed the instructions, to get it working. I have to TABs open, one to connect to the address of LAN and the second TAB connects to the address for the WIFI.....
And then when I unplug the LAN you lose the connection on the WIFI and the kiwiSDR receiver is not connected to the router anymore. If you go ahead and unplug kiwiSDR receiver and wait a few minutes then power back on it does not connect to the WIFI.
I did not put this one in....
Will this cause it to automatically connect with the WIFI?
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
It's too bad there was not step by step instructions...
So I guess you have to edit a boot up script in order for it to automatically connect with WIFI?
If you power down and then plug the power cord back in and let it load up with only the WIFI USB dongal
It will not auto connect. If you pull the USB dongal out and then power off for a few minutes and then put the power back in with the LAN wire plug in it works OK on the LAN. If you want the WIFI to work in you have to do this:
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
I am using RTL8188cus wifi USB dongal.
Try this:
When you type services you should see "AO" before your network. A=autoconnect, O=online
OK, I was incorrect before. You want to do this from the connmanctl shell:
I just tested this on my kiwi. If I run the config command with 'autoconnect off' and then run 'services', the "*AO" before my connection becomes just "*O". If I run the config command again with 'autoconnect on' and then run 'services', it returns to "*AO". The asterisk indicates that it is currently connected.
I just rebooted and LSUSB don't show WIFI dongle....
and enable WIFI command don't work....
I have to reinstall again to get to work.....
Do I need to fix this?
I don't know what that is. Your previous comment stated that you got wifi connected, but it was not auto connecting. Now it seems like you have other problems..
What is:
WLAN ?
When I rebooted I get this:
WIFI goes away.....
It does this.....
from reboot
Ok, it's not seeing your wifi device at all now. I'm not sure what you did.
From a shell, type ifconfig
Do you see wlan0? If not, you have a hardware/driver issue.
I Tried this WIFI Dongle:
BrosTrend Linux WiFi Adapter for Ubuntu, Mint, Debian, Lubuntu, Xubuntu, Mate, Zorin, PureOS, Raspberry Pi 2+, Windows 11, 1200Mbps, 5GHz/2.4GHz, Long Range 2X5dBi Antennas, USB3.0
Linux Driver, Go to: https://linux.brostrend.com/
Installation steps
You can chose for what USB WIFI Dongle you have and Driver.
Mine is RTL8812AU
It took about 3 Hrs. to finish....
And it worked! Even after Boot! Auto startup.....
Thank You.....