RTL8192cu WiFi adapter fails to load drivers

852 views
Skip to first unread message

Dave McLaughlin

unread,
Oct 29, 2020, 12:12:02 PM10/29/20
to android-porting
I am trying to add an RTL8192cu WiFi module to an Android 7.1 build but I get the following when the device is detected. ifconfig shows nothing. Under Linux, it appears as an RTL8192cu but Android seems to recognise it as RTL8188CU but does attempt to load the correct driver but fails with the output below.

[ 1706.849999] usb 2-1.3: new high-speed USB device number 5 using exynos-ehci
[ 1706.946666] usb 2-1.3: New USB device found, idVendor=0bda, idProduct=8176
[ 1706.946666] usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber
=3
[ 1706.956666] usb 2-1.3: Manufacturer: Realtek
[ 1706.959999] usb 2-1.3: SerialNumber: 00e04c000001
[ 1707.143333] usb 2-1.3: Vendor: Realtek
[ 1707.143333] usb 2-1.3: Product:
[ 1707.143333] usb 2-1.3: RTL8188CU rev A (TSMC) 1T1R, TX queues 2, WiFi=1, BT=0
, GPS=0, HI PA=0
[ 1707.153333] usb 2-1.3: RTL8188CU MAC: e8:4e:06:1f:f9:cc
[ 1707.156666] usb 2-1.3: rtl8xxxu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bi
n
[ 1707.166666] usb 2-1.3: Direct firmware load for rtlwifi/rtl8192cufw_TMSC.bin
failed with error -2
[ 1707.173333] usb 2-1.3: Falling back to user helper
[ 1707.183333] usb 2-1.3: request_firmware(rtlwifi/rtl8192cufw_TMSC.bin) failed
[ 1707.186666] usb 2-1.3: Fatal - failed to load firmware
[ 1707.189999] rtl8xxxu: probe of 2-1.3:1.0 failed with error -11

The driver is located in /vendor/realtek/rtlwifi as the 
 Any ideas what is wrong?                                                               

khab1...@gmail.com

unread,
Oct 29, 2020, 2:07:22 PM10/29/20
to android-porting
Hello Dave,

According to your log, The issue is "failed to load firmware for rtl8192"
This line "[ 1707.166666] usb 2-1.3: Direct firmware load for rtlwifi/rtl8192cufw_TMSC.bin
failed with error -2". -2 mean -ENOENT (No such file or directory)".

So to fix your issue, You need to have firmware for rtl8192. Maybe you need to find rtl8192cufw_TMSC.bi
n in https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git. Then put it in /vendor/etc/firmware (I assume your kernel has been modified to load firmware from this directory).

Regards,
Kha Tran

Vào lúc 23:12:02 UTC+7 ngày Thứ Năm, 29 tháng 10, 2020, davemcla...@gmail.com đã viết:

Dave McLaughlin

unread,
Oct 30, 2020, 11:19:14 AM10/30/20
to android-porting
I do have the BIN file but it has been copied to /system/vendor/realtek/rtlwifi as the .ko module file is located in the /system/vendor/realtek directory. The .mk file has the following:

WIFI_DRIVER_FW_PATH_PARAM:="/system/vendor/realtek"

The module is being loaded so I am assuming the directory setup is correct. 

Trần Kha

unread,
Nov 1, 2020, 9:43:29 PM11/1/20
to davemcla...@gmail.com, android-porting
Hello Dave,

There is some misunderstanding here.

.ko is driver which supports for rtl8192. However, this wifi still requires firmware. So you need both.

Base on your provided log, I assume you load your module successfully (with your provided log and your explanation). It seems your current kernel configuration for rtl8192 is builtin. So rtl8192 was initialized. Please do the following things:

1.  Change kernel config to kernel module.
2. Copy your real ko file from your output kernel folder to your android OS (by PRODUCT_COPY_FILES). Then load it by insmod in your *.rc files.
3. Use PRODUCT_COPY_FILES to copy firmware for rtl8192 to android system. I assume you did modification to load firmware from  /vendor/etc/firmware. If not, please put debug in kernel to find where can put your firmware file to use.

Regards,
Kha Tran.



Vào Th 6, 30 thg 10, 2020 vào lúc 22:19 Dave McLaughlin <davemcla...@gmail.com> đã viết:
--
--
unsubscribe: android-porti...@googlegroups.com
website: http://groups.google.com/group/android-porting

---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-porti...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-porting/cfd5828a-e2d9-4dd8-ba4b-b4914b50544bn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages