Host-based Card Emulation (HCE, NFC)¶
The Tapkey Mobile SDK enables communication with Tapkey-enabled locks via Near Field Communication (NFC) using Host-based Card Emulation (HCE) mode. In this mode, the smartphone emulates an NFC transponder, allowing secure and direct communication with the lock.
Due to platform-specific constraints and technical limitations, there are several requirements and usage restrictions that must be considered.
Requirements¶
- A custom AID (Application Identifier) must be registered and managed by the integrator.
- Locks must be configured to recognize and support the chosen AID.
- On iOS, HCE functionality is only supported within the European Economic Area (EEA).
- On iOS, the HCE entitlement must be requested from Apple.
AID (Application Identifier)¶
The Application Identifier (AID) is a unique identifier used during NFC communication to direct an NFC reader to the correct app and service on the smartphone. It ensures that the right application responds in each scenario—for example, a payment terminal opens the banking app, while a smart lock triggers the corresponding access management app.
To ensure the correct app is used when interacting with different types of locks or readers, each integrator must use their own AID. This allows the system to distinguish between devices that should be opened with the Tapkey app and those intended for the integrator’s custom app, preventing misrouting and ensuring the correct user experience.
Structure and Standardization¶
AIDs are specified by the ISO/IEC 7816-5
standard and typically consist of two parts:
- RID (Registered Application Provider Identifier): A globally or nationally registered identifier assigned to the application provider.
- PIX (Proprietary Application Identifier Extension): A custom extension defined by the provider to uniquely distinguish their applications.
Depending on the scope of deployment, the RID must be registered either internationally or nationally. You can find more details about international RID registration through ANSI’s RID Registration Program or by consulting the ISO/IEC 7816-5
standard directly.
Lock Configuration for Custom AID¶
By default, Tapkey-enabled locks are configured to recognize the official Tapkey AID for NFC communication. When using a custom AID (as required for HCE integration), each lock must be explicitly configured to accept the selected AID.
Important:
Not all Tapkey-compatible locks support configuration for custom AIDs. This capability depends on the hardware and firmware version of the specific lock model.
It is required to coordinate with the lock manufacturer and confirm that their selected devices support the required AID configuration for HCE-based communication.