We are facing issue with the wifi, while working on smart4418 1711 SOM module.

We have two different type of smart4418 1711 module with us

1 . Smart 4418 1711 (s1814) NDUN27 ARM NEXELL

2. Smart 4418 1711 (s1940) NHU1YBG ARM NEXELL


So, while working we get to know that,

Wifi is getting detected and working with Smart 4418 1711 (s1814) NDUN27 ARM NEXELL module, with linux 3.4 and android 4.4 OS.
Problem is occured when we flash the same OS (which is linux 3.4 and android 4.4) on Smart 4418 1722 (s1940) NHU1YBG ARM NEXELL module, Wifi is not getting detected at all.


In order to resolve the issue we have perform some testing at our end
Following are the results of testing




We tried take some log for wifi and attaching with this mail for reference.
nanopi2:/ # dmesg | grep wifi
[ 22.299999] wifi_platform_set_power = 1
[ 22.529999] wifi_platform_bus_enumerate device present 1
[ 24.573333] wifi_platform_set_power = 0
[ 24.709999] wifi_platform_bus_enumerate device present 0
[ 24.753333] wifi_platform_set_power = 1
[ 24.993333] wifi_platform_bus_enumerate device present 1
[ 27.043333] wifi_platform_set_power = 0
[ 27.186666] wifi_platform_bus_enumerate device present 0
[ 27.206666] wifi_platform_set_power = 1
[ 27.466666] wifi_platform_bus_enumerate device present 1
[ 29.503333] wifi_platform_set_power = 0
[ 29.633333] wifi_platform_bus_enumerate device present 0
[ 29.649999] wifi_platform_set_power = 1
[ 29.879999] wifi_platform_bus_enumerate device present 1
[ 31.916666] wifi_platform_set_power = 0
[ 32.046666] wifi_platform_bus_enumerate device present 0
[ 32.073333] unregister wifi platform drivers
[ 32.086666] wifi_platform_set_power = 1
[ 32.316666] wifi_platform_bus_enumerate device present 1
[ 34.353333] wifi_platform_set_power = 0
[ 34.483333] wifi_platform_bus_enumerate device present 0
[ 34.499999] wifi_platform_set_power = 1
[ 34.729999] wifi_platform_bus_enumerate device present 1
[ 36.766666] wifi_platform_set_power = 0
[ 36.896666] wifi_platform_bus_enumerate device present 0
[ 36.913333] wifi_platform_set_power = 1
[ 37.143333] wifi_platform_bus_enumerate device present 1
[ 39.179999] wifi_platform_set_power = 0
[ 39.309999] wifi_platform_bus_enumerate device present 0
[ 39.326666] wifi_platform_set_power = 1
[ 39.556666] wifi_platform_bus_enumerate device present 1
[ 41.593333] wifi_platform_set_power = 0
[ 41.723333] wifi_platform_bus_enumerate device present 0
[ 41.746666] unregister wifi platform drivers
[ 41.763333] wifi_platform_set_power = 1
[ 41.989999] wifi_platform_bus_enumerate device present 1
[ 44.026666] wifi_platform_set_power = 0
[ 44.156666] wifi_platform_bus_enumerate device present 0
[ 44.173333] wifi_platform_set_power = 1
[ 44.403333] wifi_platform_bus_enumerate device present 1
[ 46.439999] wifi_platform_set_power = 0
[ 46.569999] wifi_platform_bus_enumerate device present 0
[ 46.586666] wifi_platform_set_power = 1
[ 46.816666] wifi_platform_bus_enumerate device present 1
[ 48.853333] wifi_platform_set_power = 0
[ 48.983333] wifi_platform_bus_enumerate device present 0
[ 48.999999] wifi_platform_set_power = 1
[ 49.229999] wifi_platform_bus_enumerate device present 1
[ 51.266666] wifi_platform_set_power = 0
[ 51.396666] wifi_platform_bus_enumerate device present 0
[ 51.419999] unregister wifi platform drivers
[ 51.436666] wifi_platform_set_power = 1
[ 51.663333] wifi_platform_bus_enumerate device present 1
[ 53.699999] wifi_platform_set_power = 0
[ 53.829999] wifi_platform_bus_enumerate device present 0
[ 53.846666] wifi_platform_set_power = 1
[ 54.076666] wifi_platform_bus_enumerate device present 1
[ 56.113333] wifi_platform_set_power = 0
[ 56.243333] wifi_platform_bus_enumerate device present 0
[ 56.259999] wifi_platform_set_power = 1
[ 56.489999] wifi_platform_bus_enumerate device present 1
[ 58.526666] wifi_platform_set_power = 0
[ 58.656666] wifi_platform_bus_enumerate device present 0
[ 58.673333] wifi_platform_set_power = 1
[ 58.903333] wifi_platform_bus_enumerate device present 1
[ 60.939999] wifi_platform_set_power = 0
[ 61.069999] wifi_platform_bus_enumerate device present 0
[ 61.093333] unregister wifi platform drivers

nanopi2:/ # dmesg | grep wlan
[ 22.073333] dhd_wlan_init: START.......
[ 22.076666] dhd_wlan_init_gpio: inverted-power-control property not found
[ 22.083333] dhd_wlan_init_gpio: Run normal power control
[ 22.316666] dhd_wlan_power Enter: power on
[ 22.319999] dhd_wlan_power: run normal power control (onoff=1)
[ 22.533333] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=1
[ 22.543333] dhd_wlan_set_carddetect: Nobody to notify
[ 24.593333] dhd_wlan_power Enter: power off
[ 24.599999] dhd_wlan_power: run normal power control (onoff=0)
[ 24.713333] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=0
[ 24.736666] dhd_wlan_set_carddetect: Nobody to notify
[ 24.779999] dhd_wlan_power Enter: power on
[ 24.783333] dhd_wlan_power: run normal power control (onoff=1)
[ 24.999999] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=1
[ 25.013333] dhd_wlan_set_carddetect: Nobody to notify
[ 27.063333] dhd_wlan_power Enter: power off
[ 27.069999] dhd_wlan_power: run normal power control (onoff=0)
[ 27.193333] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=0
[ 27.199999] dhd_wlan_set_carddetect: Nobody to notify
[ 27.233333] dhd_wlan_power Enter: power on
[ 27.243333] dhd_wlan_power: run normal power control (onoff=1)
[ 27.469999] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=1
[ 27.479999] dhd_wlan_set_carddetect: Nobody to notify
[ 29.519999] dhd_wlan_power Enter: power off
[ 29.523333] dhd_wlan_power: run normal power control (onoff=0)
[ 29.636666] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=0
[ 29.646666] dhd_wlan_set_carddetect: Nobody to notify
[ 29.666666] dhd_wlan_power Enter: power on
[ 29.669999] dhd_wlan_power: run normal power control (onoff=1)
[ 29.883333] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=1
[ 29.893333] dhd_wlan_set_carddetect: Nobody to notify
[ 31.933333] dhd_wlan_power Enter: power off
[ 31.936666] dhd_wlan_power: run normal power control (onoff=0)
[ 32.049999] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=0
[ 32.059999] dhd_wlan_set_carddetect: Nobody to notify
[ 32.103333] dhd_wlan_power Enter: power on
[ 32.106666] dhd_wlan_power: run normal power control (onoff=1)
[ 32.319999] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=1
[ 32.329999] dhd_wlan_set_carddetect: Nobody to notify
[ 34.369999] dhd_wlan_power Enter: power off
[ 34.373333] dhd_wlan_power: run normal power control (onoff=0)
[ 34.486666] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=0
[ 34.496666] dhd_wlan_set_carddetect: Nobody to notify
[ 34.516666] dhd_wlan_power Enter: power on
[ 34.519999] dhd_wlan_power: run normal power control (onoff=1)
[ 34.733333] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=1
[ 34.743333] dhd_wlan_set_carddetect: Nobody to notify
[ 36.783333] dhd_wlan_power Enter: power off
[ 36.786666] dhd_wlan_power: run normal power control (onoff=0)
[ 36.899999] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=0
[ 36.909999] dhd_wlan_set_carddetect: Nobody to notify
[ 36.929999] dhd_wlan_power Enter: power on
[ 36.933333] dhd_wlan_power: run normal power control (onoff=1)
[ 37.146666] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=1
[ 37.156666] dhd_wlan_set_carddetect: Nobody to notify
[ 39.196666] dhd_wlan_power Enter: power off
[ 39.199999] dhd_wlan_power: run normal power control (onoff=0)
[ 39.313333] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=0
[ 39.323333] dhd_wlan_set_carddetect: Nobody to notify
[ 39.343333] dhd_wlan_power Enter: power on
[ 39.346666] dhd_wlan_power: run normal power control (onoff=1)
[ 39.559999] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=1
[ 39.569999] dhd_wlan_set_carddetect: Nobody to notify
[ 41.609999] dhd_wlan_power Enter: power off
[ 41.613333] dhd_wlan_power: run normal power control (onoff=0)
[ 41.726666] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=0
[ 41.736666] dhd_wlan_set_carddetect: Nobody to notify
[ 41.776666] dhd_wlan_power Enter: power on
[ 41.783333] dhd_wlan_power: run normal power control (onoff=1)
[ 41.993333] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=1
[ 42.003333] dhd_wlan_set_carddetect: Nobody to notify
[ 44.043333] dhd_wlan_power Enter: power off
[ 44.046666] dhd_wlan_power: run normal power control (onoff=0)
[ 44.159999] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=0
[ 44.169999] dhd_wlan_set_carddetect: Nobody to notify
[ 44.189999] dhd_wlan_power Enter: power on
[ 44.193333] dhd_wlan_power: run normal power control (onoff=1)
[ 44.406666] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=1
[ 44.416666] dhd_wlan_set_carddetect: Nobody to notify
[ 46.456666] dhd_wlan_power Enter: power off
[ 46.459999] dhd_wlan_power: run normal power control (onoff=0)
[ 46.573333] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=0
[ 46.583333] dhd_wlan_set_carddetect: Nobody to notify
[ 46.603333] dhd_wlan_power Enter: power on
[ 46.606666] dhd_wlan_power: run normal power control (onoff=1)
[ 46.819999] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=1
[ 46.829999] dhd_wlan_set_carddetect: Nobody to notify
[ 48.869999] dhd_wlan_power Enter: power off
[ 48.873333] dhd_wlan_power: run normal power control (onoff=0)
[ 48.986666] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=0
[ 48.996666] dhd_wlan_set_carddetect: Nobody to notify
[ 49.016666] dhd_wlan_power Enter: power on
[ 49.019999] dhd_wlan_power: run normal power control (onoff=1)
[ 49.233333] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=1
[ 49.243333] dhd_wlan_set_carddetect: Nobody to notify
[ 51.283333] dhd_wlan_power Enter: power off
[ 51.286666] dhd_wlan_power: run normal power control (onoff=0)
[ 51.399999] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=0
[ 51.409999] dhd_wlan_set_carddetect: Nobody to notify
[ 51.449999] dhd_wlan_power Enter: power on
[ 51.456666] dhd_wlan_power: run normal power control (onoff=1)
[ 51.666666] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=1
[ 51.676666] dhd_wlan_set_carddetect: Nobody to notify
[ 53.716666] dhd_wlan_power Enter: power off
[ 53.719999] dhd_wlan_power: run normal power control (onoff=0)
[ 53.833333] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=0
[ 53.843333] dhd_wlan_set_carddetect: Nobody to notify
[ 53.863333] dhd_wlan_power Enter: power on
[ 53.866666] dhd_wlan_power: run normal power control (onoff=1)
[ 54.079999] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=1
[ 54.089999] dhd_wlan_set_carddetect: Nobody to notify
[ 56.129999] dhd_wlan_power Enter: power off
[ 56.133333] dhd_wlan_power: run normal power control (onoff=0)
[ 56.246666] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=0
[ 56.256666] dhd_wlan_set_carddetect: Nobody to notify
[ 56.276666] dhd_wlan_power Enter: power on
[ 56.279999] dhd_wlan_power: run normal power control (onoff=1)
[ 56.493333] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=1
[ 56.503333] dhd_wlan_set_carddetect: Nobody to notify
[ 58.543333] dhd_wlan_power Enter: power off
[ 58.546666] dhd_wlan_power: run normal power control (onoff=0)
[ 58.659999] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=0
[ 58.669999] dhd_wlan_set_carddetect: Nobody to notify
[ 58.689999] dhd_wlan_power Enter: power on
[ 58.693333] dhd_wlan_power: run normal power control (onoff=1)
[ 58.906666] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=1
[ 58.916666] dhd_wlan_set_carddetect: Nobody to notify
[ 60.956666] dhd_wlan_power Enter: power off
[ 60.959999] dhd_wlan_power: run normal power control (onoff=0)
[ 61.073333] dhd_wlan_set_carddetect: notify_func= (null), mmc_host_dev= (null), val=0
[ 61.083333] dhd_wlan_set_carddetect: Nobody to notify
[ 61.109999] dhd_wlan_exit: exit
nanopi2:/ # logcat | grep wifi
03-06 10:43:09.402 470 470 I SystemServiceManager: Starting com.android.server.wifi.p2p.WifiP2pService
03-06 10:43:09.534 470 470 I WifiP2pService: Registering wifip2p
03-06 10:43:09.548 470 470 I SystemServiceManager: Starting com.android.server.wifi.WifiService
03-06 10:43:10.013 470 470 W art : Long monitor contention with owner WifiStateMachine (515) at boolean com.android.server.wifi.WifiNative.unloadDriverNative()(WifiNative.java:-2) waiters=0 in java.lang.String com.android.server.wifi.WifiNative.doStringCommand(java.lang.String) for 201ms
03-06 10:43:10.043 470 470 I WifiService: Registering wifi
03-06 10:43:10.054 470 470 I SystemServiceManager: Starting com.android.server.wifi.scanner.WifiScanningService
03-06 10:43:10.057 470 470 I WifiScanningService: Creating wifiscanner
03-06 10:43:10.067 470 470 I WifiScanningService: Publishing wifiscanner
03-06 10:43:10.087 470 470 D ConnectivityService: wifiOnly=false
03-06 10:43:10.474 470 470 I WifiScanningService: Starting wifiscanner
03-06 10:43:11.875 470 519 I WifiScanningService: wifi driver unloaded
^C



nanopi2:/sys/devices/platform/board # cat info
Hardware : NANOPI2
Revision : 0003
Serial : fa6818dba7110739

Model : Smart4418-Core
Manufacturer : FriendlyELEC Computer Tech. Co., Ltd.
nanopi2:/sys/devices/platform/board #

I attaching dtb files for your reference

We are using in built WIfi module which is AP6212. As per FriendlyARM Wiki page it shoud work directly but some how it is not working.
So,Can you please provide solution for Wifi bring up with Android7.1 OS suppport.