This document describes the procedures for integrating u-blox WiAndroid BSP. Based on an example that describes how to integrate the EMMYAndroid 9, the same procedures are also relevant for integrating other u-blox modules based on NXP
chipsets with different Android versions.
UBX-19035432 - R02
C1-Public www.u-blox.com
Android integration for NXP-based modules - Application note
UBX-19035432 - R02 Document information Page 2 of 40
C1-Public
-blox AG.
-blox.com.
to, with respect to the accuracy, correctness, reliability and fitness for a particular
-blox.
-blox assumes no liability for its use. No warranty, either express or
-blox at any time without notice. For the most recent
Android integration for NXP-based modules - Application note
Contents
Document information ................................................................................................................................ 2
2.3 Build system ................................................................................................................................................. 8
2.4.3 Vendor HAL ........................................................................................................................................ 11
3.2.4 Vendor HAL ........................................................................................................................................ 16
3.3 Integration with Android .......................................................................................................................... 17
3.3.1 Driver and HAL selection ................................................................................................................. 17
3.3.2 Enable HAL library ............................................................................................................................ 17
3.3.7 Loading the Wi-Fi driver .................................................................................................................. 19
3.3.8 Patching the SE Linux policy .......................................................................................................... 20
4 Bluetooth integration ........................................................................................................................ 21
4.1 Bluetooth architecture ............................................................................................................................. 21
7.1 Wi-Fi bring up ............................................................................................................................................. 29
7.2 Station mode.............................................................................................................................................. 31
7.3 Access point mode .................................................................................................................................... 32
7.5 Wi-Fi Direct ................................................................................................................................................. 33
7.6 Bluetooth bring up .................................................................................................................................... 34
7.7 Bluetooth verification ............................................................................................................................... 35
A Glossary ................................................................................................................................................. 37
Related documentation ........................................................................................................................... 38
Revision history .......................................................................................................................................... 39
u-blox have integrated and tested several modules, based on NXP1 chipsets, with different Android
versions. This application note describes the essential procedures for integrating NXP-based u-blox
modules with Android 9 or above.
Although this document describes how to integrate the EMMY-W1 module with Android 9 using
SDIO-UART driver package, the given procedures are also relevant for integrating other NXP-based ublox modules.
Section 3 and section 4 explain the procedures for integrating Wi-Fi and Bluetooth using SDIO and
UART, respectively.
Section 5 describes the additional changes that are required for designs that use the SDIO interface
for both radios.
☞ The Android package is provided by the host platform vendor. In this case, NXP semiconductors
who manufacture i.MX8 EVK platforms. The package is a customized version of the Android open
source package 9.0.0_2.3.4.
☞ The procedures described in this document are applicable to all u-blox modules based on NXP
chipsets – regardless of the Android package.
☞ All vendors that manufacture host platforms for Android development must provide the
appropriate set of kernel package and Android sources.
☞ Platform vendors normally integrate at least one Wi-Fi module with their manufactured platform.
Before starting any integration of u-blox modules, be sure to read the user guide for the EVK [2]
and host platform.
The supported module interfaces and the drivers used to test them are shown in Table 1.
EMMY-W1
LILY-W1
JODY-W2
Table 1: Driver packages used for tested interfaces
USB USB-UAPSTA-8801-U16-X86-W14.68.36.p146-C4X14666_B0-MGPL
SDIO SD-UAPSTA-8801-U16-X86-W14.68.36.p146-C4X14666_B0-MGPL
SDIO-SDIO SD-WLAN-SD-BT-8987-U16-MMC-W16.68.10.p33-16.26.10.p33-C4X16651-MGPL
1.1 Scope
Several regular use cases supported by Wi-Fi and Bluetooth, including station mode, access point,
peer to peer and BT connection, are routinely tested against the interfaces supported by u-blox
modules.
1
Earlier chipsets were sold under the banner of Marvell Semiconductors. After the acquisition, the packages and libraries are
renamed with NXP as the vendor.
UBX-19035432 - R02 Introduction Page 5 of 40
C1-Public
Android integration for NXP-based modules - Application note
u-blox have used the following hardware and software components for the integration:
• Android BSP: Android_9.0.0_2.3.4
• Host platform: i.MX8 MQ EVK
• Short range host-based module: EMMY-W1 (SDIO-UART)
☞ The main body of this document is primarily targeted towards the integration of the module
through the SDIO-UART interface. For information describing integration of the module through
the SDIO-SDIO interface, see section 5. When integrating u-blox modules based on NXP chipsets,
make sure that you have access to the appropriate System integration manual (SIM) and Data
sheet (DS) for your product.
1.2 Workflow
Use the following workflow to integrate the module:
1. Detect the module on host platform.
Check if the device is detected first on the machine after booting up. This step does not require
any change in the source code. Verifying this ensures that hardware integration is correct.
2. Load the driver and firmware followed by interface up.
Compile the driver and try to load during the initialization sequence. Communication with the
module has been established when the interfaces are shown after the firmware download.
3. Initialize Wi-Fi background services and libraries to bring up the interface.
At this point different layers in Android stack are connected and end-to-end communication is
established. The stack then confirms that the vendor HAL is configured properly.
4. Connect the GUI and check for individual use-cases: Station mode, Access point, Wi-Fi Direct, and
Bluetooth. For further details see section 7.
UBX-19035432 - R02 Introduction Page 6 of 40
C1-Public
Android integration for NXP-based modules - Application note
2 Components and device setup
2.1 Host platform
The u-blox EVK is evaluated together with the MCIMX8M-EVK host platform from NXP. The
configuration setup for the EVK and NXP host platform communication is shown in the Figure 2.
MCIMX8M-EVK supports the following features:
• Industrial grade NXP IMX8M host processor
• Support for both Yocto and Android
• Extensive peripherals for most evaluation scenarios
• Evolving update of BSP for the host platform
For more detailed information, check the specifications of the MCIMX8M-EVK Evaluation Kit for the
i.MX 8M Applications Processor [16].
Figure 1: NXP iMX8 MQEVK
UBX-19035432 - R02 Components and device setup Page 7 of 40
C1-Public
Android integration for NXP-based modules - Application note
Figure 2 shows the typical setup configuration for EVK with host platform communication.
i.MX8 MQ EVK
(NXP)
Figure 2: EVK and host platform communication
u-blox EVK
UART communication via USB (Bluetooth)
SDIO communication (Wi-Fi)
sddsdsdsdsds(hshshshshshs(Wi-Fi)
SMA connectors for
Wi-Fi and Bluetooth
antennas
2.3 Build system
A Linux host (for example Ubuntu 16.04 LTS) is required. You use this host to compile the Android
code. The recommended hardware requirements for the host include:
• Intel i7 or Xeon recommended
• 16GB+ RAM
• 200GB+ hard disk (SSD recommended)
2.4 Software packages
Different packages such as the Android open source code, drivers and HAL package required to
integrate the u-blox modules based on the NXP chipset with Android 9 or above are explained in brief
in the sections below.
2.4.1 Android Open Source Project
This section explains the procedure for building the Android image from scratch on an NXP i.MX8
platform. The following software packages are available for the host platform:
• Android 9.0.0_2.3.4
☞ The following process is generally relevant for the above packages and any future versions of the
Android BSP from NXP. The version of the Linux kernel integrated with this image is:
Follow the process outlined below to build the hardware image:
The directory includes the necessary configuration to fetch packages from the different
repositories.
4. Setup the source.
Run the setup script to clone Android source code. It is a modified version of open-source package
to cater the host platforms developed by NXP. It will have changes pertaining to device trees,
display drivers etc.. This typically takes 5-6 hours - dependent on the network speed and machine.
Path: imx-p9.0.0_2.3.4/
At this point, all the files and directories needed for Android image building are downloaded in the
folder
android_build. Before starting the build procedure, integrate the device driver and make
the necessary changes in different layers to work with the Wi-Fi and Bluetooth module.
5. Setup the build environment.
Enter the following terminal command to configure the Android build:
Path: imx-p9.0.0_2.3.4/android_build/
6. Enter the Android
images can be found in
lunch commandthe build has completed successfully. All build artefacts and
android_build/out/target/product/evk_8mq/.
2.4.2 Driver package
The reference driver developed by NXP is distributed exclusively to customers that have signed a
Limited Use License Agreement (LULA-M) with u-blox or Nondisclosure Agreement (NDA) with NXP.
To obtain the driver package and vendor HAL, contact u-blox support for your area, as shown in the
Contact section of this document.
The EMMY-W1 module is based on the NXP 88W8887 chipset. It can be connected to the host in
couple of ways using different physical interfaces that use the driver packages, as shown in Table 3.
For information about the specific driver packages used for testing each module variant, see Table 1.
Driver package
SDIO-UART-XX SDIO UART
SDIO-SDIO-XX SDIO SDIO
Table 2: Physical interfaces and driver packages
Wi-Fi Bluetooth
For information about the specific driver packages used for testing each module variant, see Table 1.
The SDIO-UART driver package structure is described below:
UBX-19035432 - R02 Components and device setup Page 9 of 40
C1-Public
Remarks
See section 5.
Android integration for NXP-based modules - Application note
├── FwImage sduart8887_combo_a2.bin is used for operating
│ ├── sd8887_wlan_a2.bin Wi-Fi and Bluetooth modules in Android. Rest
│ ├── sduart8887_combo_a2.bin are needed for individual radios.
│ └── uart8887_bt_a2.bin
├── SD-UAPSTA-8887-U16-MMC-W15.44.19.p36-C4X15657_A2-app-src.tgz
├── SD-UAPSTA-8887-U16-MMC-W15.44.19.p36-C4X15657_A2-GPL-src.tgz
├── SD-UAPSTA-8887-U16-MMC-W15.44.19.p36-C4X15657_A2-mlan-src.tgz
└── UART-BT-8887-U16-X86-15.100.19.p36-2.2-M2614100-GPL-src.tgz
UBX-19035432 - R02 Components and device setup Page 10 of 40
C1-Public
Android integration for NXP-based modules - Application note
NXP_Vendor_hal_005
└── wlan_lib Glue layer between wpa_supplicant and the framework
2.4.3 Vendor HAL
Both the driver package (SD-WLAN-UART-BT-8887-U16-MMC-W15.44.19.p36-15.100.19.p36C4X15657_A2-GPL) and vendor HAL (NXP Vendor HAL - v005) are developed by NXP
2
. It is expected
that the HAL structure will remain the same for all future packages. Moreover, all extracted library
content must be kept in specific path so that the HAL can compile together with future Android
builds.
├── libbt Source code for vendor HAL for Bluetooth
│ └── conf Conf file specific to Bluetooth of the combo chip
└── wlan
├── 1.2 Service to integrate with native Wi-Fi framework├── config Config files needed to start wpa_supplicant
├── libwifi-hal Library which provides services specific to scanning
│└── wifi_hal-mrvl collection of stats used by the host framework.
2
The driver and vendor HAL have been previously developed by Mavell and some places in the soure code still use Marvell designations.
UBX-19035432 - R02 Components and device setup Page 11 of 40
C1-Public
Android integration for NXP-based modules - Application note
3 Wi-Fi integration
3.1 Wi-Fi architecture
Android applications use managers to access system services like Wi-Fi. These managers access
some of the vendor-specific functionalities through Hardware Abstraction Layer (HAL).
The Wi-Fi manager accesses the kernel through several layers, including HAL, as shown in Figure 3.
Figure 3: Android Wi-Fi architecture
WifiSettings is an application in the default AOSP build used to control Wi-Fi connections. It uses
WifiManager to access Wi-Fi services.
WifiManager provides the following functionalities:
• Provides a list of configured networks
• Monitors the current active Wi-Fi network
• Scans local access points and connects to the network that caters best for the user.
Each action of the Wi-Fi operation is managed in several different logical layers of the module. The
initialization process is shown in Figure 4.
UBX-19035432 - R02 Wi-Fi integration Page 12 of 40
C1-Public
Loading...
+ 28 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.