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
Android integration for NXP-based modules - Application note
Figure 4: Sequence diagram of Wi-Fi initialization
☞ Most problems in the initialization process are encountered during the loading and activation of
Wi-Fi. The Wi-Fi state machine should be of some help in debugging these kind of issues. Once the
Wi-Fi is enabled, further operations like scan and join perform smoothly as they do not need any
external intervention from the vendor-specific layers.
To get the Wi-Fi driver up and running, several changes must be made to the files and configurations.
Various files provided by the chip vendor must be altered to cater for the integration.
3.2 Components
3.2.1 Manifest
To choose the right HIDL interface among the options integrated in AOSP, several changes must be
made in the file manifest.
The Wi-Fi HAL chosen in the manifest and shown below uses HIDL interface to communicate with
WifiServices. The manifest must contain the tags that are shown and must be added if they are not
present already.
☞ If the BSP received from vendor already has these manifest snippets with a different version, then
do not alter it. The presence of these snippets indicate the version of the native library that is
tested by the vendor.
UBX-19035432 - R02 Wi-Fi integration Page 13 of 40
C1-Public
Android integration for NXP-based modules - Application note
NXP releases driver packages regularly and to obtain updated features and bug fixes we recommend
that you use the latest package. The package from NXP requires the contents of different folders to
be arranged in a format that reflects the destination of wireless drivers.
☞ Some of the paths shown in the Makefile above can vary depending on the Android package
supplied from the host platform vendor. Ensure that changes are made accordingly. Several
variables, like the path for cross compiler and architecture, might not be needed in the
These variables are handled by default settings in the Android build system. All the compiler
options are included.
UBX-19035432 - R02 Wi-Fi integration Page 15 of 40
C1-Public
Makefile.
Android integration for NXP-based modules - Application note
├── Kconfig New files as mentioned above for compiling drivers.
├── Makefile
├── muart_src
└── wlan_src
├── mapp├── mlan
└── mlinux
3.2.3 Firmware binary
Different variants of the firmware are added in the package by default. Choose one of the firmware
binaries shown in Table 4.
Firmware Wi-FiBluetooth
sd8887_wlan_a2.bin
uart8887_bt_a2.bin
SDIO N/A
SDIO UART
N/A UART
Table 3: Firmware images used with the EMMY-W1 module
To copy the final image, firmware files must be copied to the following path:
☞ Choose the firmware binary based on the usage of the module for applications. The
sduart8887_combo_a2.bin file is recommended as it supports both Wi-Fi and Bluetooth
functionality.
3.2.4 Vendor HAL
NXP provides a vendor HAL library that is integrated in the vendor-specific implementation. The
library includes native commands used in the upper layers.
Copy the entire directory that includes this library from the extracted package, as shown below:
☞ Along with defining Marvell components, ensure that configurations pertaining to other
Wi-Fi and Bluetooth vendors are disabled in this file. For example, BOARD_HAVE_BLUETOOTH_BCM,
WIFI_DRIVER_FW_PATH_PARAM must be disabled to avoid compilation and run-time errors.
3.3.2 Enable HAL library
Enable Marvell HAL implementation library.
3.3.3 File placement
The host platform specific Makefile in the Android source code must include the required changes to
copy the files to the right directories.
The Wi-Fi hardware abstraction layer (HAL) provides standard interfaces that expose device
hardware capabilities to the higher-level Java API framework. It includes the following HIDL packages:
• Vendor HAL
• Supplicant HAL
UBX-19035432 - R02 Wi-Fi integration Page 17 of 40
C1-Public
Android integration for NXP-based modules - Application note
wificond
setprop wifi.direct.interface p2p0
oneshot
When a framework API makes a call to access device hardware interface, the Android system loads
the library module for that hardware component. These abstraction layers are already part of the
AOSP and are chosen as part of the manifest changes in section 3.2.1.
The following packages are needed for the execution of the complete Wi-Fi stack:
•android.hardware.wifi@1.0-service: This is the root of the HAL module and is the service invoked
by the native framework.
• Wifilogd: This is a logging module used for debug and analysis
• Wificond: It communicates with the Wi-Fi driver over standard nl80211 commands.
Add the appropriate components into the host platform specific file, as shown below:
-e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
class main
socket wpa_wlan0 dgram 660 wifi wifi
user root
group root
disabled
As shown in the command above, for wpa_supplicant to run, it needs couple of configuration files.
Contents of these files are as below. These files are copied into the root file system as specified in the
section 3.3.3.
UBX-19035432 - R02 Wi-Fi integration Page 18 of 40
C1-Public
Android integration for NXP-based modules - Application note
Drivers are loaded using an insmod script which references a configuration file with paths to the kernel
modules. Both the script and configuration are added in the file excerpt shown below.
#! /vendor/bin/sh
# cfg file format:
# [path for modules along with parameters]
cfg_file=$1
if [ -f $cfg_file ]; then
while IFS=" " read -r line
do
insmod $line
done < $cfg_file
fi
# set property even if there is no insmod config
# as property value "1" is expected in early-boot trigger
service early_init_sh /vendor/bin/init.insmod.sh /vendor/etc/early.init.cfg
sys.all.early_init.ready
class main
user root
group root system
disabled
3.3.8 Patching the SE Linux policy
To edit files on the root file system or use any device node, explicit permissions must be given to the
vendor HAL layers. You set these permissions by applying
below.
Command: git apply policy_changes_androidp.patch
The patch applies the appropriate permissions for both Wi-Fi and Bluetooth.
policy_changes_androidp.patch, as shown
☞ Contact your local u-blox support team for the patch file.
UBX-19035432 - R02 Wi-Fi integration Page 20 of 40
C1-Public
Android integration for NXP-based modules - Application note
CONFIG_USB_SERIAL_FTDI_SIO=y
4 Bluetooth integration
4.1 Bluetooth architecture
To enable Bluetooth, you must execute the appropriate set of configuration and files. The logical
functions of the stack in relation to the Bluetooth architecture are shown in Figure 5.
Figure 5: Bluetooth architecture
4.2 Components
4.2.1 Driver source
AOSP includes the HCI UART as an embedded driver in the kernel. NXP provides a modified version of
this code, which is needed for the EMMY-W1 series modules. To enable HCI UART driver you need to
include some changes in the code parameters. These parameters can include different compile
options, like m or y, and need to be set as shown in the snippet below. Note that the configuration
parameter option CONFIG_USB_SERIAL_FTDI_SIO is only necessary if you are accessing UART
interface over FTDI.
As described earlier, NXP_Vendor_hal_005 contains the vendor library for Bluetooth. To build this
together with the other modules it must be copied to the correct path as shown below.
Path: android_build/hardware/marvell/
├── libbt Vendor HAL for Bluetooth
4.3.1 Makefile changes
To specify the vendor for Bluetooth, include the following variables into the BoardConfig.mk file.
BOARD_HAVE_BLUETOOTH := true
Ensure that Bluetooth configurations from other vendors are removed from BoardConfig.mk.
4.3.2 BT interface configuration
Default values needed for BT interface are defined in the libbt. These parameters can be changed in
the application design. In which case, these are specified in the
module. A file example is shown below.
Several of the parameters shown above can vary between different u-blox modules, namely:
•mchar_port is needed when UART is used as an interface for BT communication. Along with it,
is_uart_port must also to be set. Configuration of the SDIO interface is described in section 5.2.3.
• baudrate_bt and
baudrate_fw_init must be carefully chosen to suit the design of the module. The
values used here should match with the baud rate programmed in the module’s OTP memory.
Otherwise, communication fails regardless of whether the file descriptor opens successfully.
4.3.3 SE-Linux labelling
Assign permission to the device node /dev/ttyUSB0. Although permissions are modified with chmod at
the start of the init, Android policy prevents file access.
Explicit file permissions can be configured, as shown below:
☞ In the above example, /dev/ttyUSB0 is the port to connect the UART interface over USB. This can
be arranged differently depending on the type of connection to the module. The port in this
configuration must be in sync with the port configuration file of the vendor
4.3.5 Additional packages
AOSP provides a default Bluetooth stack that supports both Bluetooth BR/EDR and Bluetooth Low
Energy. The android.hardware.bluetooth package provides the interface required between the
Bluetooth controller and stack.
To enable the package, include the variables shown below into the build configuration:
├── FwImage sd8887_uapsta_a2.bin is used for operating
│ ├── sd8887_uapsta_a2.bin Wi-Fi and Bluetooth modules in Android. Rest
│ ├── sd8887_wlan_a2.bin are needed for individual radios.
│ └── sd8887_bt_a2.bin
├── SD-UAPSTA-8887-U16-MMC-W15.68.19.p38-C4X15659_A2-app-src.tgz
├── SD-UAPSTA-8887-U16-MMC-W15.68.19.p38-C4X15659_A2-MGPL-src.tgz
├── SD-UAPSTA-8887-U16-MMC-W15.68.19.p38-C4X15659_A2-mlan-src.tgz
Copy the firmware in the designated location. The firmware binaries should be copied in the Android
source as mentioned in the section 3.2.3.
# Wi-Fi and Bluetooth Firmware
PRODUCT_COPY_FILES += vendor/nxp/imxfirmware/mrvl/88W8887/sd8887_uapsta_a2.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/mrvl/sd8
Include the drivers. Additionally mbt8xxx.ko is needed for Bluetooth.
The SDIO driver for Bluetooth creates a separate device node
hardware. For the vendor HAL to communicate to the driver, some permissions in the init.rc file need
to be set. Use the chmod command to set the permissions, as shown below.
# /dev/mbtchar0 is the device node created
mbtchar0
for operating with the
☞ Before enabling Bluetooth, make sure that this device node is created.
5.2.6 Patch the Bluetooth code
Patch the system Bluetooth using the snippet below.
- ret = TEMP_FAILURE_RETRY(writev(uart_fd_, iov, sizeof(iov) / sizeof(iov[0])));
- } while (-1 == ret && EAGAIN == errno);+ // TODO(bcf): Fix the driver to handle this split into multiple writes.
+ std::vector<uint8_t> tmp;
+ tmp.reserve(1 + length);
+ tmp.push_back(type);
+ tmp.insert(tmp.end(), data, data + length);
- if (ret == -1) {
- ALOGE("%s error writing to UART (%s)", __func__, strerror(errno));
- } else if (ret < static_cast<ssize_t>(length + 1)) {
- ALOGE("%s: %d / %d bytes written - something went wrong...", __func__,
Connect the EVK to the Windows machine using a type-C USB cable.
Run the batch script to flash the eMMC:
Before running this command, some more utilities are needed on Windows. For more information, see
the WIN7 User Guide for MFGTools [13].
UBX-19035432 - R02 Flashing the image Page 28 of 40
C1-Public
Android integration for NXP-based modules - Application note
HCI UART driver ver 2.2-M2614100
7 Validation
After the image has been flashed and the host platform has booted, check that the following files,
required for Wi-Fi, are present in the path locations shown below:
All the modes have been tested and verified to work with Android 9 (Android Pie) and the EMMY-W1
module. After all components have been successfully built and installed, as described in sections 3
and 4, the following kernel messages are output in the kernel log during the host boot.
Check the post-boot log copy of the message buffer in the /var/log/dmesg log to ensure that the
driver and firmware are loaded correctly.
evk_8mq:/ # dmesg
mlan: module license 'Marvell Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
Registered swp emulation handler
Console: switching to colour dummy device 80x25
watchdogd: watchdogd started (interval 10, margin 20)!
wlan: Loading MWLAN driver
Request firmware: mrvl/sduart8887_combo_a2.bin
random: crng init done
Wlan: FW download over, firmwarelen=621692 downloaded 621692
usb 1-1.4: new low-speed USB device number 6 using xhci-hcd
Enable the Wi-Fi using the command below. This translates to switching on the Wi-Fi in the GUI.
Use the
logcatcommand to verify the driver and firmware (shown as bold in the log example below)
are accessible to the android framework.
evk_8mq:/ # logcat
WificondControl: Setting up interface for client mode
wificond: subscribe scan result for interface with index: 7
hwservicemanager: getTransport: Cannot find entry
SupplicantStaIfaceHal: Can't call setupIface, ISupplicantStaIface is null
android_os_HwBinder: HwBinder: Starting thread pool for
default::android.hardware.wifi.supplicant@1.0::ISupplicant
WifiNative: Interface state changed on Iface:{Name=wlan0,Id=0,Type=STA}, isUp=true
WifiNative: Successfully setup Iface:{Name=wlan0,Id=0,Type=STA}
WifiClientModeManager: sending scan available broadcast: false
WifiClientModeManager: Wifi is ready to use for client mode
WifiClientModeManager: sending scan available broadcast: true
WifiStateMachinePrime: State changed from client mode. state = 3
WifiStateMachinePrime: client mode active
wpa_supplicant: the nl80211 driver cmd is MACADDR
wpa_supplicant: the nl80211 driver cmd len is 7
WifiScanningService: wifi driver loaded with scan capabilities: max buckets=16
WifiStateMachine: Setting OUI to DA-A1-19
WifiVendorHal: Driver: 15.44.19.p36 Firmware: 15.44.19.p36
UBX-19035432 - R02 Validation Page 30 of 40
C1-Public
Android integration for NXP-based modules - Application note
7.2 Station mode
Using the system settings on the host platform, scan and connect to the APs in the environment.
Settings > Wi-Fi & internet > Wi-Fi
Figure 6: Wi-Fi scanning
Figure 7: Wi-Fi connecting to a secured AP (WPA2-PSK)
UBX-19035432 - R02 Validation Page 31 of 40
C1-Public
Android integration for NXP-based modules - Application note
7.3 Access point mode
Access point mode (AP) is used for tethering the internet bandwidth from cellular with the other peers
in the environment. This mode is also used for sharing big data files between the devices.
By default, AP operates at 2.4 GHz. You can choose for AP operation at 5 GHz in the location settings.
To enable 5 GHz operation with Android enable CFG80211_INTERNAL_REGDB, as shown below:
bool "use statically compiled regulatory rules database" if EXPERT
default y depends on CFG80211
Copy the
also be provided with this when building the kernel. The database file,
channels supported in different countries. For further information about the
database, check the official Linux Wireless Wiki [7].
To configure the Wi-Fi hotspot settings shown in Figure 8, select:
db.txt file from the online repository [14] to the same location. A country database must
db.txt contains the list of
wireless-regdb
Figure 8: Wi-Fi hotspot creation
7.4 Throughput measurements
In general iperf is a reliable utility for measuring network throughput. On Android, an application
can be used for the purpose of measurement. “iPerf for Android” is a tool used for running different
versions of
UBX-19035432 - R02 Validation Page 32 of 40
C1-Public
iperf(2/3). For further information about the iperf tool and APK, see reference [15].
Android integration for NXP-based modules - Application note
7.5 Wi-Fi Direct
The Wi-Fi Direct standard used to connect Wi-Fi devices to one another is used in in a variety of
different use cases, like Wi-Fi display that works between two peers.
UBX-19035432 - R02 Validation Page 33 of 40
C1-Public
Android integration for NXP-based modules - Application note
Figure 11: Wi-Fi Direct connected state
☞ Wi-Fi display functionality is not yet supported in the Android image supplied by NXP. At the
moment, this functionality requires some additional application level libraries with the Wi-Fi direct
protocol.
7.6 Bluetooth bring up
Once the files are placed in the expected paths, Bluetooth will be enabled. Android services can also
be used to enable Bluetooth using the below-mentioned command.
# Enable Bluetooth via command line
service call bluetooth_manager 6
# Disable Bluetooth via command line
service call bluetooth_manager 8
To otherwise enable Bluetooth from the GUI, select:
Settings > Bluetooth & device connection > Bluetooth
UBX-19035432 - R02 Validation Page 34 of 40
C1-Public
Android integration for NXP-based modules - Application note
bt_core_module: module_start_up Started module "hci_module"
Some logs from the Android system when Bluetooth is successfully enabled are provided below:
bt_stack_manager: event_start_up_stack is bringing up the stack
Basic Bluetooth involves a discovery scan followed by connection between the two devices. The same
connection can be used for different applications such as file sharing or audio streaming. File transfer
using images between the devices works successfully and has been verified.
UBX-19035432 - R02 Validation Page 35 of 40
C1-Public
Android integration for NXP-based modules - Application note
Figure 12: Bluetooth scanning
Figure 13: Bluetooth connect
UBX-19035432 - R02 Validation Page 36 of 40
C1-Public
Android integration for NXP-based modules - Application note
Appendix
A Glossary
Abbreviation Definition
AOSP Android Open Source Project
ASCII American Standard Code for Information Interchange
ARM Arm (Advanced RISC Machines) Holdings
AEC Automotive electronics council
BBR Battery backed RAM
BER Bit error rate
CPU Central processing unit
UTC Coordinated Universal Time
DTE Data terminal equipment
DC Direct current
DRX Discontinuous reception
DDC Display data channel
DL Down link (Reception)
BT Bluetooth
Wi-Fi Wireless Fidelity
AP Access Point
Table 7: Explanation of the abbreviations and terms used
UBX-19035432 - R02 Appendix Page 37 of 40
C1-Public
Android integration for NXP-based modules - Application note
Related documentation
[1] EMMY-W1 series system integration manual, UBX-15024929
[2] EVK-EMMY-W1 user guide, UBX-15012713
[3] EVK-LILY-W1 user guide, UBX-15030290
[4] EVK-JODY-W2 user guide, UBX-19027118
[5] EMMY-W1 series data sheet, UBX-15011785
[6] Cross reference platform for Android code browsing:
http://aosp.opersys.com/xref/android-9.0.0_r47/
[7] Documentation of internal regulatory domain usage in kernel: