How to Enable PCIe WiFi into i.MX6 Android Release?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to Enable PCIe WiFi into i.MX6 Android Release?

How to Enable PCIe WiFi into i.MX6 Android Release?

Overview

The purpose of this doument is to introduce how to enable PCIe WiFi into i.MX6 Android release.

Environment Setup

  • Hardware: i.MX6 SABRE-SD board
  • Software: Android Jelly Bean 4.2

Software Configurations

The source codes of Intel PCIe WiFi have been integrated for i.MX6 SABRE-SD board into i.MX6 Android release. However it's disabled by default. To enable it for i.MX6 SABRE-SD board, you can do the following:

  • Change BOARD_WLAN_VENDOR to INTEL in device/fsl board configuration files. For example,

diff --git a/sabresd_6dq/BoardConfig.mk b/sabresd_6dq/BoardConfig.mk
index 9c8a32d..912e752 100755
--- a/sabresd_6dq/BoardConfig.mk
+++ b/sabresd_6dq/BoardConfig.mk
@@ -11,7 +11,7 @@ TARGET_BOOTLOADER_BOARD_NAME := SABRESD
PRODUCT_MODEL := SABRESD-MX6DQ

# Wifi
-BOARD_WLAN_VENDOR                       := ATHEROS
+BOARD_WLAN_VENDOR                       := INTEL
# for atheros vendor
ifeq ($(BOARD_WLAN_VENDOR),ATHEROS)
BOARD_WLAN_DEVICE                       := ar6003
@@ -30,6 +30,7 @@ WIFI_COMPAT_MODULE_ARG                         := ""
endif
#for intel vendor
ifeq ($(BOARD_WLAN_VENDOR),INTEL)
+BOARD_WLAN_DEVICE                       := INTEL
BOARD_HOSTAPD_PRIVATE_LIB               ?= private_lib_driver_cmd
BOARD_WPA_SUPPLICANT_PRIVATE_LIB        ?= private_lib_driver_cmd
WPA_SUPPLICANT_VERSION                  := VER_0_8_X

  • After changing BOARD_WLAN_VENDOR as "INTEL", the following files will be compiled for intel WiFi:
    • device/fsl-proprietary/pcie-wifi/
    • external/wpa_supplicant_8
    • hardware/imx/wlan/intel/
    • hardware/libhardware_legacy/wifi/wifi_intel.c
  • Enable PCIe WiFi driver in kernel_imx by running "make menuconfig" command:
    • Select "System Type -> Freescale MXC Implementations -> PCI Express support" as "*"
    • Select "Networking support -> Wireless ->  cfg80211 - wireless configuration API" as "*". Then select "Networking support -> Wireless -> Generic IEEE 802.11 Networking Stack (mac80211)" as "*"
    • Select "Device Drivers ->  Network device support -> Wireless LAN -> Intel Wireless WiFi 4965AGN (iwl4965)" as "*"
    • Then run "make" command to build kernel.
    • The followings are the dependencies files to enable above configuration:

Kernel configuration:

* -> System Type

-> Freescale MXC Implementations

Select the PCI Express support.

Then config intel WIFI driver:

Generic IEEE 802.11 Networking Stack (mac80211) used by WIFI devices

Symbol: MAC80211 [=y]

Type : tristate

Prompt: Generic IEEE 802.11 Networking Stack (mac80211)

Defined at net/mac80211/Kconfig:1

Depends on: NET [=y] && WIRELESS [=y] && CFG80211 [=y]

Location:

-> Networking support (NET [=y])

-> Wireless (WIRELESS [=y])

Intel iwl4965 or iwl6300 card driver

Symbol: IWL4965 [=y]

Type : tristate

Prompt: Intel Wireless WiFi 4965AGN (iwl4965)

Defined at drivers/net/wireless/iwlegacy/Kconfig:65

Depends on: NETDEVICES [=y] && WLAN [=y] && PCI [=y] && MAC80211 [=y]

Location:

-> Device Drivers

-> Network device support (NETDEVICES [=y])

  • Then you can follow up the instructions into Android User guide to build Android image.

Known Limitation

  • PCIe low power mode is not supported according to BSP release note. So when building in PCIe, the system suspend/resume should be disabled now.
Labels (4)
Attachments
Comments

Hi Xiaoli,

I followed your instruction to build JB 4.2.2 with Intel mini-PCIe wifi support but got the error messages below. I was able to build ICS with the same configuration, strange.

make: *** No rule to make target `out/target/product/sabresd_6dq/obj/STATIC_LIBRARIES/private_lib_driver_cmd_intermediates/export_includes', needed by `out/target/product/sabresd_6dq/obj/EXECUTABLES/hostapd_intermediates/import_includes'.  Stop.

The attachment is some patches  to enable intel 4965 wifi card with android 4.2.2 on sabresd 6q.You can take it as a reference.

Hi Xiaoli,

Is there support for the Atheros AR9K family and what would the differences be in the above instructions to build JB for a AR9K PCIe card?

I have two i.MX6 customers asking how to do this (one is Android JB and one is Linux). I plan on sharing your excellent document but wondered if you could share anything specific to the Atheros 9K family.

Thanks..>Andy

Ross,

Did you find solution to bringup wifi on Ath9K PCIe card?

we modified the changes in hardware/imx/wlan/atheros/compat-wireless/Android.mk to bringup WiFi feature.

Sandesh,

Thank you, yes I did. One of our engineers got our SX-PCEAN+ card (9280 based) working with the v3.0.35 Ubuntu BSP.

Everyone,

It should be noted that this process will not work with the Intel 3160 due to its support of P2P (I have never tried using the Intel 4965, don't have that part on hand in any case). We also have had trouble with P2P with the Atheros 9k (AR9462 part), but finally got basic Wifi functionality working. In general, I have been very disappointed with Wifi support in the JellyBean 4.3 BSP.

What would be nice to see is a patch released to upgrade  the wpa_supplicant to 2.1 stable (February 2014 release I think).

Michael Robbeloth

Dear Sir,

Our customer would like to use WiFi module: Intel Wifi Link 5100  Model:512AN_HMW  on Android 4.4 system.

Could you any suggestion for it?

Dear Sir,

We are using i.MX6DL with Android 4.4.2 kitkat.

WiFi module: Intel Wifi Link 5100  Model:512AN_HMW 

When trying to turn on wifi , it shows:

D/WifiService( 2625): setWifiEnabled: true pid=2943, uid=1000

W/WifiHW  ( 2625): got module patch /system/lib/modules/iwlagn.ko

E/WifiStateMachine( 2625): Failed to load driver

Any suggestions for it ?

Dear Sir,

I tried to load iwlagn.ko,

and i got those log when WIFI ON:

D/WifiService( 2578): setWifiEnabled: true pid=2831, uid=1000

W/WifiHW  ( 2578): is_wifi_driver_loaded

W/WifiHW  ( 2578): got module patch /system/lib/modules/iwlagn.ko

E/WifiStateMachine( 2578): Failed to reload STA firmware java.lang.IllegalArgumentException: command '12 softap fwreload wlan0 STA' failed with '501 12 SoftAP command has failed'

W/CommandListener( 2209): Failed to retrieve HW addr for wlan0 (No such device)

D/CommandListener( 2209): Setting iface cfg

E/WifiStateMachine( 2578): Unable to change interface settings: java.lang.IllegalStateException: command '14 interface setcfg wlan0 0.0.0.0 0 down' failed with '400 14 Failed to set address (No such device)'

D/WifiMonitor( 2578): startMonitoring(wlan0) with mConnected = false

E/WifiHW  ( 2578): Unable to open connection to supplicant on "/data/misc/wifi/sockets/wlan0": No such file or directory

D/BluetoothAdapter( 2831): 1102399976: getState() :  mService = null. Returning STATE_OFF

D/Tethering( 2578): sendTetherStateChangedBroadcast 1, 0, 0

I/wpa_supplicant( 3398): Successfully initialized wpa_supplicant

D/Tethering( 2578): InitialState.processMessage what=4

D/Tethering( 2578): sendTetherStateChangedBroadcast 0, 0, 0

E/WifiHW  ( 2578): Supplicant not running, cannot connect

E/WifiHW  ( 2578): Supplicant not running, cannot connect

E/WifiHW  ( 2578): Supplicant not running, cannot connect

E/WifiHW  ( 2578): Supplicant not running, cannot connect

E/WifiHW  ( 2578): Supplicant not running, cannot connect

E/WifiMonitor( 2578): startMonitoring(wlan0) failed!

E/WifiStateMachine( 2578): Failed to setup control channel, restart supplicant

W/WifiHW  ( 2578): is_wifi_driver_loaded

W/WifiHW  ( 2578): is_wifi_driver_loaded return 0

E/WifiStateMachine( 2578): Failed to reload STA firmware java.lang.IllegalArgumentException: command '17 softap fwreload wlan0 STA' failed with '501 17 SoftAP command has failed'

D/CommandListener( 2209): Setting iface cfg

D/CommandListener( 2209): Trying to bring down wlan0

E/WifiMonitor( 2578): startMonitor called with unknown iface=wlan0

D/BluetoothAdapter( 2831): 1102399976: getState() :  mService = null. Returning STATE_OFF

I/wpa_supplicant( 3416): Successfully initialized wpa_supplicant

But wifi still not work.

Any suggestions for it ?

HI Ross

     can you upload the doc? thanks~

Hi Sandesh

     can you tell me the changes?thank

No ratings
Version history
Last update:
‎02-06-2013 12:10 AM
Updated by: