AnsweredAssumed Answered

Problem with rtl8723bs wifi SDIO on Android

Question asked by Ma Juani on May 23, 2017
Latest reply on May 23, 2017 by Ma Juani

Hello, and have a nice day!
I have Freescale IMX6q sabresd. and Android 4.3 on it.
Trying to connect SDIO wifi rtl8723bs. All configuratoin i do from manual with rtl8723bs.
Compiling the driver as module, then put it system/lib/modules and load by insmod. No warning then i load the module, but wifi is not working.If execute the netcfg or ifconfig, there is no wifi.
One obscure thing: My driver consists only of:
8723bs.ko
Other drivers consist of:

 


cfg80211.ko
compact.ko

 


Where to get the cfg80211.ko and compact.ko for my driver? how to compile them?

 


Here is log:

D/MtpServer( 2941): path: /storage/emulated/0/87238723bs2.ko parent: 0 storageID: 00
010001
I/wpa_supplicant( 3598): Successfully initialized wpa_supplicant
D/MtpService( 2941): updating state; isCurrentUser=true, mMtpLocked=false
D/MtpService( 2941): addStorageLocked 65537 /storage/emulated/0
D/MtpService( 2941): updating state; isCurrentUser=true, mMtpLocked=false
D/MtpService( 2941): starting MTP server in MTP mode
D/MtpService( 2941): addStorageLocked 65537 /storage/emulated/0
D/BluetoothAdapter( 2927): 1102533832: getState() : mService = null. Returning
STATE_OFF

The another problem is, then i trying to compile driver, i got warnings

 


Building modules, stage 2.MODPOST 1 modulesWARNING: "cfg80211_del_sta" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!WARNING: "cfg80211_mgmt_tx_status" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!WARNING: "wiphy_apply_custom_regulatory" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!WARNING: "ieee80211_frequency_to_channel" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!WARNING: "cfg80211_rx_mgmt" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!WARNING: "cfg80211_new_sta" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!WARNING: "cfg80211_connect_result" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!WARNING: "cfg80211_unlink_bss" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!WARNING: "wiphy_new" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!WARNING: "cfg80211_put_bss" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!WARNING: "cfg80211_roamed" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!WARNING: "cfg80211_scan_done" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!WARNING: "cfg80211_ibss_joined" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!WARNING: "cfg80211_michael_mic_failure" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!WARNING: "cfg80211_disconnected" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!WARNING: "cfg80211_get_bss" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!WARNING: "cfg80211_inform_bss_frame" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!WARNING: "wiphy_free" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!WARNING: "__ieee80211_get_channel" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!WARNING: "cfg80211_ready_on_channel" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!WARNING: "wiphy_unregister" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!WARNING: "cfg80211_remain_on_channel_expired" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!WARNING: "wiphy_register" [/home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko] undefined!CC /home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.mod.oLD [M] /home/mark/Android/opt/kernel_imx/drivers/net/wireless/rtl8723bs/8723bs.ko

 

 



step by step, go to driver folder

make clean
make

 


Here is my configuratoin of my makefile in driver:

 


Code:
ifeq ($(CONFIG_PLATFORM_FSL_IMX6Q), y)
Code:
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIANEXTRA_CFLAGS += -DRTW_USE_CFG80211_STA_EVENT -DCONFIG_IOCTL_CFG80211 ARCH := armCROSS_COMPILE := /home/mark/Android/opt/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi-KSRC := /home/mark/Android/opt/kernel_imxMODULE_NAME := 8723bsendif

if i delete or comment the -DCONFIG_IOCTL_CFG80211
the driver compile without any warnings.

 


I traed 3-5 different drivers drom github, but all they the same problem......

 


Hope for any tips, help from you
Thank's

 


Here my configs:

 

 

Code:
CONFIG_CFG80211=m
Code:
CONFIG_MAC80211_MESH=y CONFIG_MAC80211=y CONFIG_HOSTAP=y CONFIG_RTL8723BS=m


BoardConfig.mk

Code:
BOARD_WIFI_VENDOR := realtekifeq ($(BOARD_WIFI_VENDOR), realtek)WPA_SUPPLICANT_VERSION := VER_0_8_XBOARD_WPA_SUPPLICANT_DRIVER := NL80211CONFIG_DRIVER_WEXT :=yBOARD_WPA_SUPPLICANT_DRIVER := WEXTBOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_rtlBOARD_HOSTAPD_DRIVER:= NL80211BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_rtl BOARD_WLAN_DEVICE := rtl8723bs#BOARD_WLAN_DEVICE := rtl8192du#BOARD_WLAN_DEVICE := rtl8192ce#BOARD_WLAN_DEVICE := rtl8192de#BOARD_WLAN_DEVICE := rtl8723as#BOARD_WLAN_DEVICE := rtl8723au#BOARD_WLAN_DEVICE := rtl8189es#BOARD_WLAN_DEVICE := rtl8723bs#BOARD_WLAN_DEVICE := rtl8723bu WIFI_DRIVER_MODULE_NAME := "8723bs"WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/8723bs.ko"WIFI_DRIVER_MODULE_ARG:= "ifname=wlan0 if2name=p2p0" WIFI_FIRMWARE_LOADER := ""WIFI_DRIVER_FW_PATH_STA := ""WIFI_DRIVER_FW_PATH_AP:= ""WIFI_DRIVER_FW_PATH_P2P := ""WIFI_DRIVER_FW_PATH_PARAM := ""endif

init.xxx.rc

 

 

Code:
service rtw_suppl_con /system/bin/wpa_supplicant -ip2p0 -Dnl80211 -c /data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -N -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf class main socket wpa_wlan0 dgram 660 wifi wifi disabled oneshot  service rtw_suppl /system/bin/wpa_supplicant -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf socket wpa_wlan0 dgram 660 wifi wifi class main disabled oneshot

Set wifi.interface

 

 

Code:
PRODUCT_PROPERTY_OVERRIDES += wifi.interface=wlan0

Apply wifi_realtek.c

 

 

Code:
ifeq ($(BOARD_WIFI_VENDOR), realtek) LOCAL_SRC_FILES += ../realtek/wlan/libhardware_legacy/wifi/wifi_realtek.c else LOCAL_SRC_FILES += wifi/wifi.c endif

wpa_supplicant_8

 


Code:
ifeq ($(BOARD_WIFI_VENDOR), realtek)
Code:
L_CFLAGS += -DREALTEK_WIFI_VENDOR L_CFLAGS += -DANDROID_P2P L_CFLAGS += -DCONFIG_ANDROID_4_2_PERSISTENT_IOT Endif

Adding or Selecting Target Platform opt/kernel_imx/drivers/net/wireless/rtl8723bs/makefile

 

 

Code:
CONFIG_PLATFORM_FSL_IMX6Q = y CONFIG_PLATFORM_I386_PC = n CONFIG_PLATFORM_ANDROID_X86 = n CONFIG_PLATFORM_ARM_S3C2K4 = n CONFIG_PLATFORM_ARM_PXA2XX = n CONFIG_PLATFORM_ARM_S3C6K4 = n CONFIG_PLATFORM_MIPS_RMI = n CONFIG_PLATFORM_RTD2880B = n CONFIG_PLATFORM_MIPS_AR9132 = n CONFIG_PLATFORM_MT53XX = n CONFIG_PLATFORM_RTK_DMP = n

opt/kernel_imx/drivers/net/wireless/Makefile

Code:
obj-$(CONFIG_RTL8723AS) += rtl8723as/


opt/kernel_imx/drivers/net/wireless/Kconfig

 


Code:
source "drivers/net/wireless/rtl8723bs/Kconfig"

Outcomes