Table Of ContentFactory Test Mode Procedure for NFC
Test
Application Note
80-Y0597-20 Rev. A
August 2014
Submit technical questions at:
https://support.cdmatech.com
Confidential and Proprietary – Qualcomm Atheros, Inc.
NO PUBLIC DISCLOSURE PERMITTED: Please report postings of this document on public servers or websites to:
DocCtrlAgent@qualcomm.com.
Restricted Distribution: Not to be distributed to anyone who is not an employee of either Qualcomm or its subsidiaries without
the express approval of Qualcomm’s Configuration Management.
Not to be used, copied, reproduced, or modified in whole or in part, nor its contents revealed in any manner to others without the
express written permission of Qualcomm Atheros, Inc.
Qualcomm is a registered trademark of QUALCOMM Incorporated. Atheros is a registered trademark of Qualcomm Atheros,
Inc. All other registered and unregistered trademarks are the property of QUALCOMM Incorporated, Qualcomm Atheros, Inc.,
or their respective owners and used with permission. Registered marks owned by QUALCOMM Incorporated and Qualcomm
Atheros, Inc. are registered in the United States and may be registered in other countries.
This technical data may be subject to U.S. and international export, re-export, or transfer (“export”) laws. Diversion contrary to
U.S. and international law is strictly prohibited.
Qualcomm Atheros, Inc.
1700 Technology Drive
San Jose, CA 95110
U.S.A.
© 2014 Qualcomm Atheros, Inc.
Revision history
Revision Date Description
A August 2014 Initial release
80-Y0597-20 Rev. A MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION 2
Confidential and Proprietary – Qualcomm Atheros, Inc.
Contents
1 Introduction ...................................................................................................... 5
1.1 Purpose.......................................................................................................................... 5
1.2 Scope ............................................................................................................................. 5
1.3 Conventions .................................................................................................................. 5
1.4 References ..................................................................................................................... 5
1.5 Technical assistance ...................................................................................................... 6
1.6 Acronyms ...................................................................................................................... 6
2 NCI Wrapper FTM Functions .......................................................................... 7
2.1 General QRCT procedure for NFC setup ..................................................................... 8
2.2 Sending any NCI command and getting the NCI response .......................................... 9
2.3 Sending a sequence of NCI commands ...................................................................... 11
2.4 Getting NCI notification packets ................................................................................ 11
3 High Level FTM Tests Using QRCT .............................................................. 14
3.1 Self-test ....................................................................................................................... 15
3.2 Initiator mode testing .................................................................................................. 18
3.3 Target mode testing .................................................................................................... 19
3.4 TX CW ........................................................................................................................ 22
3.5 SWP1 detection test .................................................................................................... 23
80-Y0597-20 Rev. A MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION 3
Confidential and Proprietary – Qualcomm Atheros, Inc.
Factory Test Mode Procedure for NFC Test Application Note Contents
Tables
Table 1-1 Reference documents and standards ............................................................................................ 5
Table 2-1 QRCT steps to perform NFC setup ............................................................................................. 8
Table 2-2 QRCT steps for NCI command - response ................................................................................ 10
Table 2-3 QRCT Steps for sequencing NCI commands ............................................................................ 11
Table 2-4 QRCT Steps for NCI notifications ............................................................................................ 12
Table 3-1 Steps to perform NFC self-test with QCA1990 ......................................................................... 16
Table 3-2 Steps to perform initiator tests with QCA1990 ......................................................................... 18
Table 3-3 Steps to perform target tests with QCA1990 ............................................................................. 20
Table 3-4 Steps to perform TX CW tests with QCA1990 ......................................................................... 22
Table 3-5 Steps to perform SWP1 detection test with QCA1990 .............................................................. 23
80-Y0597-20 Rev. A MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION 4
Confidential and Proprietary – Qualcomm Atheros, Inc.
1 Introduction
1.1 Purpose
This document provides the procedures to perform NFC tests using the Qualcomm Radio Control
Toolkit (QRCT) and Factory Test Mode (FTM) commands.
1.2 Scope
This document is intended for use by test engineers and test equipment companies that need to
control devices based on Qualcomm NFC chipsets. Procedures are included for QCA1990™.
1.3 Conventions
Function declarations, function names, type declarations, and code samples appear in a different
font, e.g., #include.
Button and key names appear in bold font, e.g., click Save or press Enter.
1.4 References
Reference documents, which may include QUALCOMM®, standards, and resource documents,
are listed in Table 1-1. Reference documents that are no longer applicable are deleted from this
table; therefore, reference numbers may not be sequential.
Table 1-1 Reference documents and standards
Ref. Document
[1] Application Note: Software CL93-V3077-1
Glossary for Customers
[2] Factory Test Mode Miscellaneous 80-VA360-9
Procedures
[3] Factory Test Mode Test 80-VH937-1
Equipment Requirements
[4] Factory Test Mode Common API 80-VA888-1
Commands
[5] QCA1990 FTM Introduction 80-Y0597-2
[6] QCA1990 Device Specification 80-Y0597-1
[7] NFC Controller Interface (NCI) NFCForum-TS-
Specification NCI-1.0
80-Y0597-20 Rev. A MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION 5
Confidential and Proprietary – Qualcomm Atheros, Inc.
Factory Test Mode Procedure for NFC Test Application Note Introduction
1.5 Technical assistance
For assistance or clarification on information in this guide, submit a case to Qualcomm CDMA
Technologies at https://support.cdmatech.com/.
If you do not have access to the CDMATech Support Service website, register for access or send
email to support.cdmatech@qualcomm.com.
1.6 Acronyms
Acronym Description
DH Device Host
DUT Device Under Test
HLOS High Level Operating System
MSM Mobile Station Modem
NCI NFC Controller Interface
(NFC Forum standard interface between the DH and NFCC)
NFC Near Field Communications
NFCC NFC Controller
NFC Execution Environments (e.g. SWP1 & SWP2)
NFCEE
QMSL QUALCOMM Manufacturing Support Library
QRCT QUALCOMM Radio Control Tool
RFU Reserved for Future Use
SWP Single Wire Protocol
(a connection between a UICC and a NFC chip)
For definitions of terms and abbreviations, see [1].
80-Y0597-20 Rev. A MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION 6
Confidential and Proprietary – Qualcomm Atheros, Inc.
2 NCI Wrapper FTM Functions
This chapter describes QRCT procedures for NCI wrapper FTM commands. These NCI wrapper
functions consist of methods for routing NCI packets between the host PC and the NFCC.
This includes:
NFC FTM setup
Sending any NCI Command and getting the NCI Response
Sending a Sequence of NCI commands with text files
Getting NCI Notification packets
QMSL header files for Connectivity can be found in
C:\Program Files (x86)\Qualcomm\QDART\QMSL\inc\inc\QMSL_Connectivity
Usage of these NCI wrapper commands requires a high level of familiarity with the NFC Forum
NOTE:
NCI standard. To make testing easier, high level NFC FTM functions were developed that use the
NCI wrapper functions in specific sequences internally. The high level NFC FTM functions are
described in Chapter 3.
80-Y0597-20 Rev. A MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION 7
Confidential and Proprietary – Qualcomm Atheros, Inc.
Factory Test Mode Procedure for NFC Test Application Note NCI Wrapper FTM Functions
2.1 General QRCT procedure for NFC setup
Table 2-1 QRCT steps to perform NFC setup
Step QRCT procedure – NFC Setup QMSL equivalent
This instruction is for Android platforms only. Other HLOS may have a
1.
functional equivalent.
On the phone GUI, disable the NFC service in Android Wireless &
Networks setting on the Android target.
This is to prevent the phone’s processor from acting as the DH for NFC.
Instead the tester PC will act as the DH with NCI messaging sent via
FTM diag packets.
This instruction is for Android platforms only. Other HLOS may have a
2.
functional equivalent.
Execute the ftmdaemon in the Android target. From a cmd shell, execute
the following commands
adb root
adb shell /system/bin/ftmdaemon -n (some targets may not require the –
n parameter)
3. Start QRCT. Under the Target menu, select the appropriate target type; QLIB_SetTargetType( 0
MSM/MDM or APQ. );
// MSM/MDM
or
QLIB_SetTargetType( 1
);
// APQ
4. Select QMSL Library Mode. Use QPST if it is installed. Otherwise select QLIB_SetLibraryMode( 1
QMSL Internal (QPHONEMS) );
// QLIB_LIB_MODE_QPST
or
QLIB_SetLibraryMode( 0
);
//
QLIB_LIB_MODE_QPHONEMS
5. Click the COM Port button to scan COM ports. QLIB_GetAvailablePhone
Then click the drop down list next to the COM Port button and select the sPortList()
desired port to connect to the phone. QLIB_ConnectServerWith
Wait(
COM13,2000)
Note: If the device’s port does not show up, and QPST is being used,
then check QPST Configuration to see if QPST detects the device and
has the port enabled.
80-Y0597-20 Rev. A MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION 8
Confidential and Proprietary – Qualcomm Atheros, Inc.
Factory Test Mode Procedure for NFC Test Application Note NCI Wrapper FTM Functions
Step QRCT procedure – NFC Setup QMSL equivalent
6. Select FTM Command →NFC
7. Enable NFC log packets by clicking the Enable Logs button. This only QLIB_FTM_NFC_EnableLog
needs to be done once. s( HANDLE
hResourceContext )
8. One could start from a known state by sending the Core Reset NCI Core Reset
command followed by the Core Init command.
QLIB_FTM_NFC_NFCC_CMD_
RSP(20 00 01 01)
NCI Core Init
QLIB_FTM_NFC_NFCC_CMD_
RSP(20 01 00)
see parameters for
QLIB_FTM_NFC_NFCC_CM
D_RSP
in paragraph 2.2
(the values shown above are
for parameter
pNfc_nfcc_cmd)
2.2 Sending any NCI command and getting the NCI response
Any NCI command can be sent from the host PC to the NFCC within the DUT by wrapping the
NCI command packet within a (FTM) diag request packet.
80-Y0597-20 Rev. A MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION 9
Confidential and Proprietary – Qualcomm Atheros, Inc.
Factory Test Mode Procedure for NFC Test Application Note NCI Wrapper FTM Functions
The corresponding NCI response packet will sent by the DUT back to the host PC wrapped
within a (FTM) diag response packet.
This is done with QMSL function QLIB_FTM_NFC_NFCC_CMD_RSP.
Table 2-2 QRCT steps for NCI command - response
Step QRCT procedure – NCI Command - Response QMSL equivalent
1. The NCI Command-Response section in QRCT can be used to send unsigned char
any NCI command and get the corresponding NCI Response. QLIB_FTM_NFC_NFCC_CMD_RSP(
Simply type the NCI command packet in the text input section and HANDLE hResourceContext,
click the Send NCI cmd button. unsigned short
Enter the byte sequence in hexadecimal format, 2 characters per Nfc_nfcc_cmd_len,
byte, with a single space between each byte, as in the example unsigned char*
below. pNfc_nfcc_cmd,
QRCT will decode the NCI command and response type from the first unsigned short*
2 bytes of each command/response and display it below the raw pNfc_nfcc_rsp_len,
bytes of the packet. unsigned char*
pNfc_nfcc_rsp );
80-Y0597-20 Rev. A MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION 10
Confidential and Proprietary – Qualcomm Atheros, Inc.