Intel NUC Resin RTL8192CU (Edimax EW-7811 Un) WIFI USB stick support

Hello,
I have a question regarding adding support for this stick. It was working under resin with my raspberry pi, but not yet with intel NUC resin. So I added “linux-firmware-8192cu” in kernel-core, since (rtl8192cu) should support RTL 8188CUS.
I see the files inside /lib/firmware, but I believe I need some module for this to run. modprobe 8192cu.
iwconfig and ifconfig only show my internal wifi.

How can I make it work?
Thank you very much.

Hello,

what is the output of
lsmod | grep 8192cu?

lsmod | grep 8192cu returns nothing.

bash-4.3# lsmod | grep 8192cu

bash-4.3# lsmod
Module                  Size  Used by
ipt_REJECT              1585  1
nf_reject_ipv4          2675  1 ipt_REJECT
ccm                     8880  1
ipt_MASQUERADE          1451  1
nf_nat_masquerade_ipv4     2121  1 ipt_MASQUERADE
nf_conntrack_netlink    22080  0
nfnetlink               5860  3 nf_conntrack_netlink
xfrm_user              26401  2
br_netfilter           13794  0
bnep                   11058  2
arc4                    2232  2
iwlmvm                272063  0
mac80211              558154  1 iwlmvm
iwlwifi               184322  1 iwlmvm
snd_hda_codec_hdmi     34848  1
btusb                  28984  0
cfg80211              494511  3 iwlmvm,iwlwifi,mac80211
btrtl                   4768  1 btusb
btbcm                   6303  1 btusb
btintel                 7224  1 btusb
r8169                  69875  0
x86_pkg_temp_thermal     4638  0
snd_hda_codec_realtek    58729  1
efivars                 8705  0
snd_hda_codec_generic    55879  1 snd_hda_codec_realtek
snd_hda_intel          21824  0
snd_hda_codec          83087  4 snd_hda_intel,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
snd_hda_core           51856  5 snd_hda_intel,snd_hda_codec,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
snd_pcm                81391  4 snd_hda_intel,snd_hda_codec,snd_hda_core,snd_hda_codec_hdmi
snd_timer              20329  1 snd_pcm
uvesafb                21610  0

lsusb

bash-4.3# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 8087:0aa7 Intel Corp.
Bus 001 Device 002: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


CONNECTIVITY_FIRMWARES =+ "linux-firmware-ibt linux-firmware-rtl8723 linux-firmware-rtl8821 linux-firmware-rtl8723b-bt linux-firmware-rtl8192cu linux-firmware-iwlwifi-3168 linux-firmware-rtl8168"

I believe some flags are needed in recipes-kernel/linux

# Support for RTL8723BE and RTL8821AE based WiFi/BT cards
RESIN_CONFIGS_append = " rtl8723be_rtl8821ae"
RESIN_CONFIGS_DEPS[rtl8723be_rtl8821ae] = " \
        CONFIG_RTL_CARDS=m \
"
RESIN_CONFIGS[rtl8723be_rtl8821ae] = " \
    CONFIG_RTL8723BE=m \
    CONFIG_RTL8821AE=m \
"

Inside the raspberry pi image repo there were two last lines:

KERNEL_MODULE_PROBECONF += “rtl8192cu”
module_conf_rtl8192cu = “blacklist rtl8192cu”

Solved
addded in kernel linux:

RESIN_CONFIGS_append = " rtl8192cu"
RESIN_CONFIGS_DEPS[rtl8192cu] = " \
        CONFIG_RTL_CARDS=m \
"
RESIN_CONFIGS[rtl8192cu] = " \
    CONFIG_RTL8192cu=m \
"

Hi rquant,

I need compile the kernel to add this? dont want do, is there any other way?

Hi, I think the easiest way, is to ask the balena staff, if they can add the driver in the next release by default. The process I did is much work.

Hey @rquant, I was just discussing this with my colleague. You need not compile the whole kernel, but merely the driver (a kernel module), using module headers we provide. You can find a repo showing an example of this [1] in our public github org balena-io-projects, in the repo kernel-module-build, in which an example module (named “hello”) is built (build.sh) and installed using insmod (run.sh). You could do this in your container for the driver in question. The repo is best read by starting in Dockerfile.template and descending into the logic from there.

That said, I will happily forward this to the relevant engineers to see if they are able / think it’s wise to add the driver in our built images for this device.

[1] https://github.com/balena-io-projects/kernel-module-build

Hi @dt-rush,

the problem is the following. You are building the module, but not for the underlying Balena OS. So you cannot use WIFI to initially to deploy or correctly use the communication interface between Your OS and Balena OS.

Ah, you’re very correct. The device, on initially powering-up, will need to have a working network interface it can use to contact the backend and download the container images, inside of which are the modules that have been built, etc. In this case, you have three options:

  1. preload the device with your built image [1] (device boots up, runs the container(s), one of which (or… the only one, if there’s only one) installs the kernel module, enabling the wifi device)

  2. build your own BalenaOS with the kernel module included (requires a yocto build setup) [2] and then affiliate the device to the BalenaCloud backend [3].

  3. wait for our team to include the driver, if that turns out to be the path we take (I’ve forwarded this request to the engineers)

[1] https://www.balena.io/docs/learn/welcome/production-plan/#preloading-images
[2] https://www.balena.io/os/docs/custom-build/
[3] Building balenaOS from source and connecting to balenaCloud