AnsweredAssumed Answered

Problem with wifi configuration RTL8723BS on IMX6 SabreSD Android

Question asked by Ma Juani on May 9, 2017
Latest reply on May 12, 2017 by igorpadykov

Hello All!

Have i.MX 6Quad Freescale SabreSD with Android 4.3

I want to connect to SabreSD the wifi module RTL8723BS by SDIO.

The main problem is:

I configure everything according to the instructions, but unfortunately it is not going to build like a KO (module).

 

Step by step:

  1. vim kernel_imx/arch/arm/configs/imx6s_{yourdevice}_android_defconfig

 

CONFIG_CFG80211=y
CONFIG_MAC80211_MESH=y
CONFIG_MAC80211=y
CONFIG_HOSTAP=y
CONFIG_RTL8723BS=

 

2. vim device/fsl/{yourdevice}/BoardConfig.mk

 

BOARD_WIFI_VENDOR := realtek
ifeq ($(BOARD_WIFI_VENDOR), realtek)
    WPA_SUPPLICANT_VERSION := VER_0_8_X
    BOARD_WPA_SUPPLICANT_DRIVER := NL80211
    CONFIG_DRIVER_WEXT :=y
    BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_rtl
    BOARD_HOSTAPD_DRIVER        := NL80211
    BOARD_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 := rtl8192cu
    #BOARD_WLAN_DEVICE := rtl8723bu

    WIFI_DRIVER_MODULE_NAME   := "wlan"
    WIFI_DRIVER_MODULE_PATH   := "/system/lib/modules/wlan.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

 

3.  Add android.hardware.wifi.direct.xml

PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hard
ware.wifi.direct.xml

4. init.xxx.rc

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

5. Set wifi.interface

PRODUCT_PROPERTY_OVERRIDES += \
wifi.interface=wlan0

6. Apply wifi_realtek.c

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

7. wpa_supplicant_8

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

8. Adding or Selecting Target Platform

opt/kernel_imx/drivers/net/wireless/rtl8723bs/makefile

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

9. opt/kernel_imx/drivers/net/wireless/Makefile

obj-$(CONFIG_RTL8723AS) += rtl8723as/

 

10. opt/kernel_imx/drivers/net/wireless/Kconfig

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

 

The build is building success, but i don't get the KO module file in opt/out/target/product/sabresd_6dq/system/lib/module/

 

Thank's a lot for any help or ideas!

Outcomes