This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

USB Wifi Realtek RTL8192cu on DM36x EVM

Hi,

We are using dvsdk 4.02 with linux kernel 2.6.32 and trying to port USB WIfi module based upon Realtek RTL8192cu chipset. We are able to cross compile it and make it work but its not working reliably. It gets disconnected frequently with following error logs:

no beacon to call receive_disconnect()
receive_disconnect
rtl8192: delete STA
roaming from UBNT_BULLET(00:27:22:e2:b5:fa), length:11
rtw_select_and_join_from_scanned_queue: return _FAIL(candidate == NULL)
rtl8192c_set_FwJoinBssReport_cmd mstatus(0)
survey done event(0)
rtw_select_and_join_from_scanned_queue: return _FAIL(candidate == NULL)
try_to_join, but select scanning queue fail, to_roaming:2
rtl8192c_dm_RF_Saving(): RF_Normal
survey done event(0)
rtw_select_and_join_from_scanned_queue: return _FAIL(candidate == NULL)
try_to_join, but select scanning queue fail, to_roaming:1
rtl8192c_set_FwJoinBssReport_cmd mstatus(0)

This solved by re connecting the USB module.

------------------------------------------------------------------------------------------

When following logs appear reboot is required to make wifi work again:

===> FirmwareDownload91C() fw:Rtl819XFwImageArray_TSMC
FirmwareDownload92C accquire FW from embedded image
fw_ver=v80, fw_subver=0, sig=0x88c0
fw download ok!
Set RF Chip ID to RF_6052 and RF type to 1T1R.
IQK:Start!!!
Path A Rx IQK fail!!
Path A Rx IQK fail!!
Path A IQK Only Tx Success!!
Path A Rx IQK fail!!
Path A Rx IQK fail!!
Path A IQK Only Tx Success!!
IQK: final_candidate is 0
IQK: RegE94=103 RegE9C=f RegEA4=0 RegEAC=0 RegEB4=0 RegEBC=0 RegEC4=0 RegECC=0
Path A IQ Calibration Success !
_PHY_PathAFillIQKMatrix only Tx OK
pdmpriv->TxPowerTrackControl = 1
MAC Address from REG_MACID = 00:c0:ca:66:09:5e
rtl8192cu_hal_init in 620ms
MAC Address = 00:c0:ca:66:09:5e
-871x_drv - drv_open, bup=1
ADDRCONF(NETDEV_UP): wlan0: link is not ready
root@IPCAMERA:~# iwconfig wlan0 mode managed
set_mode = IW_MODE_INFRA
root@IPCAMERA:~# iwconfig wlan0 channel 1
root@IPCAMERA:~# iwconfig wlan0 essid UBNT_BULLET
=>rtw_wx_set_essid
ssid=UBNT_BULLET, len=11
Set SSID under fw_state=0x00000008
<=rtw_wx_set_essid, ret 0
root@IPCAMERA:~# ifconfig wlan0 10.0.0.253 netmask 255.255.255.0
root@IPCAMERA:~# survey done event(16)
[by_bssid:0][assoc_ssid:UBNT_BULLET][to_roaming:0] new candidate: UBNT_BULLET(00:27:22:e2:b5:fa) rssi:-36
rtw_select_and_join_from_scanned_queue: candidate: UBNT_BULLET(00:27:22:e2:b5:fa)
link to new AP
link_timer_hdl:no beacon while connecting
report_join_res(-3)
_rtw_join_timeout_handler, fw_state=8
rtl8192c_set_FwJoinBssReport_cmd mstatus(0)

--------------------------------------------------------------------------------

Has anyone reliably used Realtek 8192cu on DM36x EVM? If yes, kindly let us know the steps and also the driver version used.

  • Yeah, I have similar issue.  I have dongle with  RTL8192cu chip. Linux drivers taken from CD retailed with dongle.

    I've builds two kind of 8192cu.ko:

    1- for x86 Linux (Debian) 2.6.32

    2- for DM368 Kernel 2.6.32.17, dvsdk 4.

    No any changes in the code, only cross compile options was changed.

    For x86 - everything works fine, no problems at all.

    For DM368 - I can only setup wlan0 interface, and get info about it.

    I cann't even scan for other devices, it gives me empty list:

    root@dm365-evm:~# iwlist wlan0 scan

    survey done event(0)
    wlan0 No scan results


    iwconfig results looks ok:

    root@dm365-evm:~# iwconfig wlan0
    wlan0 unassociated Nickname:"<WIFI@REALTEK>"
    Mode:Managed Frequency=2.412 GHz Access Point: Not-Associated
    Sensitivity:0/0
    Retry:off RTS thr:off Fragment thr:off
    Encryption key:off
    Power Management:off
    Link Quality:0 Signal level:0 Noise level:0
    Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
    Tx excessive retries:0 Invalid misc:0 Missed beacon:0

    So possible we have the same issues.

    Drivers looks so: rtl8192_8188CU_linux_v3.0.2164.20110715

    Chip version: Chip Version ID: VERSION_NORMAL_TSMC_CHIP_92C.

    Firmware info (your firmware is later): fw_ver=v75, fw_subver=0, sig=0x88c0

    So I don't know what's wrong there, possible TI guys can answer, or RTL support also.

  • yesterday i met the same issue,but now i reloved,here is my method:

    check the options below must be selected in the kernel source.

    <*>   USB Wireless Device Management support    

  • and

    <*> Enable Wireless USB extensions (EXPERIMENTAL)

  • Thanks for reply, but we're already finished with TI (I hope) processors.
    It's slow, high temperature, and not good supported.
    Now we're developing on AllWinner A10 chip.

    Regards,

        Alexey.

  • For those who are facing same kind of problem through USB Wifi in DM368 just disable the "DMA access in USB" in kernel config. My problem got solved using this. 

  • Yes, it did work.

  • Hi Alexey,

    Can you please tell me what are the big steps that you did to cross-compile the Realtek driver.

    Here is what I have tried :

    1- I downloaded the sources for RTL8192CU driver on Realtek's website. (v3.4.4.4749)

    2- I modified the Makefile to add a new config:

    ifeq ($(CONFIG_PLATFORM_ARM), y)
    EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_WEXT_PRIV
    ARCH := arm
    CROSS_COMPILE := arm-none-linux-gnueabi-
    KVER := 2.6.34
    KSRC ?= $(KERNEL_DIR)
    endif

    3- I called the Makefile. It seems to build the whole driver but at the end I have a lot of undefined functions :

    Building modules, stage 2.
    MODPOST 1 modules
    WARNING: "register_netdevice" [/home/RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/driver/rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105/8192cu.ko] undefined!
    WARNING: "__kmalloc" [/home/RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/driver/rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105/8192cu.ko] undefined!
    WARNING: "msleep" [/home/RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/driver/rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105/8192cu.ko] undefined!
    WARNING: "complete_and_exit" [/home/RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/driver/rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105/8192cu.ko] undefined!
    WARNING: "__copy_from_user" [/home/RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/driver/rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105/8192cu.ko] undefined!
    WARNING: "vmalloc" [/home/RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/driver/rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105/8192cu.ko] undefined!

    ...

    /home/RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/driver/rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105/8192cu.mod.c:8: error: variable '__this_module' has initializer but incomplete type
    /home/RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/driver/rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105/8192cu.mod.c:9: error: unknown field 'name' specified in initializer
    /home/RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/driver/rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105/8192cu.mod.c:9: warning: excess elements in struct initializer
    /home//RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/driver/rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105/8192cu.mod.c:9: warning: (near initialization for '__this_module')
    /home/RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/driver/rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105/8192cu.mod.c:10: error: unknown field 'init' specified in initializer
    /home/RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/driver/rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105/8192cu.mod.c:10: warning: excess elements in struct initializer
    /home/RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/driver/rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105/8192cu.mod.c:10: warning: (near initialization for '__this_module')
    /home/RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/driver/rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105/8192cu.mod.c:14: error: unknown field 'arch' specified in initializer
    /home/RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/driver/rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105/8192cu.mod.c:14: error: 'MODULE_ARCH_INIT' undeclared here (not in a function)
    /home/RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/driver/rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105/8192cu.mod.c:14: warning: excess elements in struct initializer
    /home/RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/driver/rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105/8192cu.mod.c:14: warning: (near initialization for '__this_module')
    make[2]: *** [/home/RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/driver/rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105/8192cu.mod.o] Error 1

    Do you have any advices ?

    Thank you !!

    Best regards,

    Nicolas


  • Hi Nicolas,

    Just put the downloaded driver folder to ${KERNEL_SRC}/driver/net/wireless,

    change the Makefile , add 

    obj-$(CONFIG_RTL8192CU) += rtl8192cu/ 

    change Kconfig , add

    source "drivers/net/wireless/rtl8192cu/Kconfig".

    Then make kernel, should work .

    Cheers,

    John

  • Hi John,

    Many thanks !!

    Nicolas

  • Hi john zhang1,

    i am working on am335xevm, i want to inerface wifi dongle,

    1)Just put the downloaded driver folder to ${KERNEL_SRC}/driver/net/wireless,

    Ans: i copied rtl8188eu driver folder to above location on sdk.



    2)change the Makefile , add
    obj-$(CONFIG_RTL8192CU) += rtl8192cu/

    Ans: which make file i need to change.... the make file present on wireless folder or main on sdk?


    3)change Kconfig , add
    source "drivers/net/wireless/rtl8192cu/Kconfig".

    Ans: how to change or add Kconfig file?



    4)Then make kernel, should work .
    Ans: i need to run make on main sdk or any sub directory.

    Regards,
    Mohammed Asif.