|
Renesas PTX1xxR IoT-Reader API Version 7.3.1
Renesas Software Stack for IoT-Reader Applications
|
This document describes the PTX IoT-Reader API library for the PTX1xxR-Reader products PTX100R and PTX105R (both further referenced as PTX1xxR).
The corresponding IoT-Reader API is intended to be used for general reader applications based on various different RF-technologies and -protocols.
The intended audience for this document are
In order to integrate / execute the IoT-Reader API incl. the PTX "NSC Software Stack" the following requirements must be fullfilled by the target platform:
The IoT-Reader API is based on the PTX "NSC Software Stack" which consists of multiple layers and components and has been written in ANSI C.
This component- and layered-based approach allows a simplified target integration as well as an easy way for adding extensions and / or customized features.
Application Layer
This layer implements the PTX NSC IoT-Reader API Component which is the main software interface for the target application.
The IoT-Reader API provides a variety of methods to
Add-on APIs Component
This layer contains various optional add-on APIs which can be used on top of the NSC IoT-Reader API such as
A detailed flow of how to use the IoT-Reader API is shown in IoT-Reader API State Machine.
Integration Layer ("INT")
This layer implements a collection of all APIs of the NSC component including all its submodules.
Component Layer ("COMPS")
This layer implements the API to the internal NSC component which provides the following functionality:
Hardware- and Operating System Abstraction Layer
This layer implements the SW interfaces for the
The PTX NSC IoT-Reader API Component follows a object-oriented approach where a so called "Stack-Object" needs to be allocated first.
This object contains all the internal data structures and information which is further used in every following API call.
State: START
A "Stack-Object" needs to be allocated via a call to ptxIoTRd_Allocate_Stack().
State: RESET
Initialize the IoT-Reader API and the internal NSC components via a call to ptxIoTRd_Init_Stack().
This call takes parameters to initialize the intended host-interface including characteristics and the file path to the mandatory RF- and SYSTEM-configuration files "NSC_RF_CONFIG.dat" and "NSC_SYS_CONFIG.dat"
State: INITIALIZED
Once the IoT-Reader API and the NSC components themselves have been initialized, the PTX1xxR needs to be initialized and configured (handled automatically) via a call to ptxIoTRd_Init_NSC().
State: READY
After IC initialization, the IoT-Reader API is ready to discover cards in the field via a call to ptxIoTRd_Initiate_Discovery().
The behavior of the discovery-loop is configurable where a user can change for example:
- poll for Type-A
- poll for Type-B
- poll for Type-F (Parameter "PollTypeF212" == 1 for 212 kBit/s, "PollTypeF212" == 1 and "PollTypeF424" == 1 for 424 kBit/s)
- poll for Type-V
- use Low-Power-Card-Detection ("LPCD")
- ...
If enabled in the System-configuration parameters, the PTX1xxR supports detection of critical errors like over current and temperature. In case such an error occurs,
the PTX1xxR shuts down automatically all relevant HW-blocks and informs the stack about the changed state. This state can be read via a call to ptxIoTRd_Get_Status_Info() (Status Type == System).
In addition, the following optional functions can be executed exclusively in this state:
– ptxIoTRd_Update_ChipConfig()
– ptxIoTRd_Set_Power_Mode()
– ptxIoTRd_Get_Revision_Info()
– ptxFeliCa_DTE* (except API/component (un)initialization)
– ptxRF_Test* (except API/component (un)initialization)
– ptxTransparent_Mode* (except API/component (un)initialization)
The IoT-Reader also supports higher bitrates for Type-A and Type-B polling. The default configuration only supports 106kbit/s. Higher bitrates can be configured by a call to ptxIoTRd_ConfigHBR(). The higher bitrate is only used if the card supports it. If the card does not support the configured higher bit rates, the reader uses the default speed of 106kbit/s.
State: TEST (Optional)
This optional state allows the application to perform various system and / or RF-tests using the add-on APIs described in this document. The transition from and back to state READY is shown in the figure below.
State: POLLING
The current status of the polling operation can be retrieved via a call to ptxIoTRd_Get_Status_Info() (Status Type == Discover).
This function provides the information whether
An ongoing discover operation can be stopped via a call to ptxIoTRd_Reader_Deactivation().
State: HOST CARD EMULATION
This state is reached if an external field is discovered. Once entered this state, the application communicates with the external reader device and only leaves this state if the external field is turned off again. All data and notifications are written into a message queue and can then be processed by the HCE API. The application uses ptxHCE_GetEvent() to receive the next event in the queue, and processes it according to the event type. Possible event types can be
State: WAIT FOR SELECTION
This state is reached if multiple cards were previously discovered or if a specific card was deactivated. The application can use the function ptxIoTRd_Get_Card_Registry() to gather information about all available cards. To select a specific card and / or to activate a specific RF-protocol, a call to ptxIoTRd_Activate_Card() is required before an actual RF data exchange can be executed.
State: DATA EXCHANGE
In this state RF data can be exchanged with the active card via
The RF-protocols ISO- and NFC-DEP are handled internally by the PTX1xxR, all other (NFC-Forum) protocols like T2T, T3T and T5T have to be handled by the application and / or the add-on APIs on top.
The API contains additionally the following functions which may / have to be used in this state:
Like in state "POLLING", completed RF data exchanges can be stopped via a call to ptxIoTRd_Reader_Deactivation().
State: FINISHED
Once the complete IoT-Reader application shall be stopped or shut-down, it is required to call function ptxIoTRd_Close_Stack() to free previously allocated system ressources like memory, drivers etc.
The internal Host Card Emulation (HCE) component is initialized together with the IoT-Reader API and ready to use when the IoT-Reader API is. The HCE component will be active if in the polling configuration the ListenTypeA parameter is set to 1. This parameter enables the listen mode and allows the API to receive listen events. The HCE component uses a message queue, to queue received events and processes them in ptxIoTRdInt_DemoState_HostCardEmulation().
The following section describes the states used in ptxIoTRdInt_DemoState_HostCardEmulation(). The states START, RESET, INIT, and READY are the same as in IoT-Reader API State Machine. All transitions between the states are done via ptxHCE_GetEvent().
State: FIELD ON
The message queue contains this state if the PTX1xxR detects an external field from a reader. The PTX1xxR can now receive and send data.
State: FIELD OFF
The message queue contains this state if the PTX1xxR does not detect an external field. No more transactions are possible.
State: ACTIVATED LISTEN A
The message queue contains this state if the external reader has successfully activated the emulated card. The PTX1xxR receives the protocol information which should be activated.
State: DATA
The message queue contains this state if the external reader is sending data to the emulated card on a protocol level. The emulated card receives the command from the reader, processes it, and returns the requested data together with a status code.
State: DEACTIVATED
The message queue contains this state if the emulated card is deactivated. Currently there are three possible reasons:
- a DESELECT command is received
- a RELEASE command is received
- The reader has turned off the external field
State: NO DATA AVAILABLE
The message queue contains this event if the transmission from the reader does not contain any data.
See PTX NSC IoT-Reader API Component
See PTX NSC Native-Tag API Component
See PTX NSC NDEF API Component
See GPIO Operation API
See RF Test API
See FeliCa DTE API
See Transparent Mode API
See Transparent Data Channel (TDC) API
| Version | Date | Comment |
|---|---|---|
| 1.0.0 | February 2020 | Initial SDK-Release with basic RF-functionality |
| 1.0.1 | April 2020 | SDK-Release V1.0.0 including system-features |
| 1.1.0 | June 2020 | SDK-Release V1.1.0 including extended feature-set |
| 1.2.0 | September 2020 | SDK-Release V1.2.0 including NativeTag- and NDEF-API references |
| 2.0.0 | December 2020 | SDK-Release V2.0.0 including refactored API-functions |
| 3.0.0 | April 2021 | SDK-Release V3.0.0 refactored demo examples |
| 4.0.0 | June 2021 | SDK-Release V4.0.0 Host Card Emulation API-functions |
| 5.0.0 | September 2021 | SDK-Release V5.0.0 including higher bit rates |
| 6.0.0 | December 2021 | SDK-Release V6.0.0 including NFC Forum compliance, FeliCa compliance, GPIO-control, low-power mode for HCE, FeliCa-DTE- and RF-Test API |
| 6.0.1 | January 2022 | SDK-Release V6.0.1 bug-fix for PRBS-test |
| 6.1.0 | February 2022 | SDK-Release V6.1.0 INTERNAL RELEASE: Switch from Renesas S128 MCU platform to Renesas RA4M2 MCU for non-OS Stacks |
| 6.2.0 | February 2022 | SDK-Release V6.2.0 including new Revision-Info type (Product ID), fixed bitrate card parameter, change meta-info for RF-Config |
| 6.3.0 | July 2022 | SDK-Release V6.3.0 including removal of function ptx[POS | IoTRd]_Send_Data (deprecated, ptxHCE_Send_Data shall be used instead), added support for LPCD-notification, extended FeliCa-DTE by "FeliCa Reader/Writer Digital Protocol" test-sequences |
| 6.3.1 | August 2022 | SDK-Release V6.3.1 INTERNAL RELEASE: Rework of FeliCa-DTE. |
| 6.3.2 | September 2022 | SDK-Release V6.3.2 INTERNAL RELEASE: Changed format of output data of "ptx[POS | IoTRd]_T3T_SENSFRequest" (indicates a collision within same timeslot). |
| 7.0.0 | December 2022 | SDK-Release V7.0.0 Added I2C reference implementation for Linux incl. refactored Stack-initialization. Bug-fix added to FeliCa-DTE API (424 kBit/s now supported too). Corrected issue in HCE-mode where RF-On/-Off was not correctly indicated on some systems. |
| 7.1.0 | April 2023 | SDK-Release V7.1.0 Added UART reference implementation for Linux. Added Transparent-Mode API. |
| 7.2.0 | May 2024 | SDK-Release V7.2.0 Improved description of API Init-/Open-functions. Fixed issue related to EMV-collision if multiple Type-B cards used (POS-SDK only). Added support for B-Prime RF-Technology in Transparent-Mode API. Integrated Transparent Data Channel (TDC). |
| 7.3.0 | September 2025 | SDK-Release V7.3.0 Removed usage of VLAs. Fixed too high current conumption in CE + LPCD mode. Fixed and exposed FeliCa polling parameters. Added sanity checks in FeliCa-DTE. |
| 7.3.1 | January 2026 | SDK-Release V7.3.1 Improved handling of Temperature-sensor inside FW (no functional change). |