Elatec TWN3 Mini Reader Mifare NFC Technical Manual

Elatec TWN3 Mini Reader Mifare NFC Technical Manual

Transponder reader
Table of Contents

Advertisement

Quick Links

Transponder Reader
®
Mifare
NFC
Technical Manual
Doc.-Rev. 1.00

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TWN3 Mini Reader Mifare NFC and is the answer not in the manual?

Questions and answers

Summary of Contents for Elatec TWN3 Mini Reader Mifare NFC

  • Page 1 Transponder Reader ® Mifare Technical Manual Doc.-Rev. 1.00...
  • Page 2: Table Of Contents

    Elatec GmbH Content INTRODUCTION ............................5 ® INSTALLATION OF MINI READER MIFARE NFC ................6 ..........................6 ECHANICAL UTLINE ..............................6 INNING ......................7 LECTRICAL HARACTERISTICS (UART) ..................7 SYNCHRONOUS ERIAL ONNECTION (SPI) ..................... 8 YNCHRONOUS ERIAL ONNECTION 2.5.1 SPI Timing ............................. 10 2.5.2...
  • Page 3 Elatec GmbH 7.1.3 Mifare® PLUS Specific Commands ....................24 ............................24 RROR ODES ................ 25 RANSPONDER ERIAL UMBER ELATED OMMANDS Continuous read mode ‘c’ ......................25 7.3.1 Select Single Tag ‘s’ ........................25 7.3.2 MultiTag Selection / Tag List ‘m’....................26 7.3.3...
  • Page 4 Elatec GmbH ® PLUS ............................ 53 IFARE ® U ......................... 54 IFARE LTRALIGHT ® U C ........................55 IFARE LTRALIGHT 9.5.1 Example: Writing the Triple-DES Key ..................56 MIFARE® PLUS ............................ 57 10.1 ..........................57 ECURITY EVELS 10.2 ..........................58...
  • Page 5: Introduction

    Elatec GmbH 1. Introduction ® This document is the reference guide for the transponder reader family TWN3 Mifare NFC and Mini ® Reader Mifare NFC. The readers are using the same reading technology, so this document is applicable for both devices.
  • Page 6: Installation Of Mini Reader Mifare ® Nfc

    Elatec GmbH ® 2. Installation of Mini Reader Mifare ® This chapter covers the installation of Mini Reader Mifare NFC in an embedded environment. 2.1 Mechanical Outline All dimensions are in mm. Component side shown, Pin spacing: 2.54mm 2.2 Pinning...
  • Page 7: Electrical Characteristics

    Elatec GmbH 2.3 Electrical Characteristics Frequency 13.56 MHz Power supply 3.15V - 5.5V DC Current consumption RF field off: 10mA RF field on: Typically 80mA Power Down: < 2µA 2.4 Asynchronous Serial Connection (UART) ® Because Mini Reader Mifare NFC is transmitting and receiving TTL levels, it can be directly connected to a microcontroller.
  • Page 8: Synchronous Serial Connection (Spi)

    Elatec GmbH 2.5 Synchronous Serial Connection (SPI) ® Mini Reader Mifare NFC also offers synchronous data transfer via a 4-line SPI. In this case, the reader is always slave, it cannot initiate any data transfer by itself. All data transfer is initiated by the master by pulling the pin SS ¯¯...
  • Page 9 Elatec GmbH After sending the command frame, the master polls the reader for the response. This is done by cyclically sending 0x00 frames: Every command requires its individual processing time until a response is available. This response time also depends on the response polling frequency of the master, so it might be useful to slow down polling in order to increase processing speed of the reader.
  • Page 10: Spi Timing

    Elatec GmbH The previous image shows the response of the reader, in this case it is the ASCII-representation of the version string “MifareNFC 1.02<CR><LF>” (with leading length-byte 0x10). 2.5.1 SPI Timing SPI Interface: Timing requirements. Drawing is not for scale!
  • Page 11: Spi Software Implementation

    Elatec GmbH 2.5.2 SPI Software Implementation The following code demonstrates how to implement SPI communication in software for the host system, e.g. for a microcontroller: byte SPI_ReadWrite(byte Data) byte (i=0; i<8; i++) (Data & 0x80) MOSI_HIGH; else MOSI_LOW; SCK_HIGH; Data <<= 1;...
  • Page 12: Usage Of Gpios

    Elatec GmbH 2.6 Usage of GPIOs The reader provides four general purpose I/Os that can be configured individually. These I/Os can be read and written by commands. Please consider, that the GPIOs have limited current source and sink capability of max. 25mA. An overcharge of GPIO-pins can damage the module! 2.7 Asynchronous Reset...
  • Page 13: Supported Transponders

    Elatec GmbH 3. Supported Transponders ISO14443A ISO14443B ISO18092 Mifare Calypso FeliCa Classic 1k, 4k CEPAS DESFire EV1 Moneo Mini SRI512, SRT512, SRI4K, SRIX4K Plus S, X Inside Contactless PicoPass Pro X HID ICLASS SmartMX Ultralight Ultralight C Legic Advant SLE44R35...
  • Page 14: Register Set

    Elatec GmbH 5. Register Set The reader has several system flags customizing its behavior. The flags are stored non-volatile in its EEPROM. It is recommended to keep all bits and bytes labeled RFU at their default state to guarantee further compatibility.
  • Page 15: Station Id (0Ah)

    Elatec GmbH 5.2 Station ID (0Ah) In ASCII mode, the Station ID has principally no influence on the functional behavior of the reader. Nevertheless it can be used to identify a reader in a multi-reader environment. In Binary mode, the Station ID is used to address the reader in protocol header. The Station ID has the range 01h to FEh and can be set freely.
  • Page 16: Extendid

    Elatec GmbH 5.3.5 ExtendID If set, the unique serial number (UID) of the transponder is extended by a single prefix byte. This bit has only effect for ISO14443A transponders. This setting affects the commands continuous reading („c‟), single tag select („s‟) and multi tag select („m‟).
  • Page 17: Operation Mode Register 1 (0Eh)

    Elatec GmbH 5.5 Operation Mode Register 1 (0Eh) The Operation Mode Register 1 defines which tag types the reader shall support. Including or excluding transponder types has direct influence in the transponder detection speed of the reader. Operation Mode Register 1...
  • Page 18: Reset Off Time (14H)

    Elatec GmbH 5.7 Reset Off Time (14h) The Reset Off Time register represents the time in milliseconds, the RF-field is switched off before and after a reading attempt. This register is used for the continuous read mode („c‟). The higher the value of the register, the more energy can be saved. Keep in mind that increased saving of energy results in decreased detection speeds.
  • Page 19: Reset Recovery Time (15H)

    Elatec GmbH 5.8 Reset Recovery Time (15h) The Reset Recovery Time register represents the recovery time in milliseconds after the RF-field is turned on. This register is used for the continuous read mode („c‟), single tag select („s‟) and multi tag select („m‟) commands.
  • Page 20: Taginfo

    Elatec GmbH 5.9.2 TagInfo If set, the reader extends the UID by a single byte. The value of the byte gives information about the tag type. Default value: 0 Refer to the table below for tag types: Byte value Corresponding transponder type Mifare®...
  • Page 21: Communication Protocol

    Elatec GmbH 6. Communication Protocol 6.1 ASCII Protocol The ASCII protocol has been designed for easy handling. Data is always transmitted in hexadecimal notation, i.e. 5E. Every time the reader is powered up, a startup message is displayed. On the terminal screen this should look like this: MifareNFC 1.02<CR><LF>...
  • Page 22: Example

    Elatec GmbH 6.2.7 Example This example shows how to log into sector 0 of a Mifare card, using transport key FFh: ® Station ID Length Data 6C 00 FF 0D 6.2.8 Remarks If an invalid instruction frame is received (e.g. BCC is wrong) or if the requested Station ID does not match the internal ID of the reader, the command is not executed.
  • Page 23: Instruction Set

    Elatec GmbH 7. Instruction Set 7.1 Command Overview 7.1.1 Common Commands Command Description For details view chapter ‘ ’ Cancel command 7.6.6 ‘c’ Continuous read mode 7.3.1 ‘.’ Stop continuous read mode (in noisy environment) 7.6.6 ‘ei’ Init SAM card 7.5.9.1...
  • Page 24: Mifare® Classic Specific Commands

    Elatec GmbH 7.1.2 Mifare® Classic Specific Commands For details view Command Description chapter ‘+’ Increment value block 7.4.4.3 ‘-’ Decrement value block 7.4.4.4 ‘=’ Copy value block 7.4.4.5 ‘l’ Login (authenticate tag) 7.4.1.1 7.4.1.2 ‘rv’ Read value block 7.4.4.2 ‘wm’...
  • Page 25: Transponder Serial Number Related Commands

    Elatec GmbH 7.3 Transponder Serial Number Related Commands 7.3.1 Continuous read mode „c‟ The reader reads and displays serial numbers continuously while one or more tags remain in the field. This command stops as soon as any character is sent to the reader.
  • Page 26: Multitag Selection / Tag List 'M

    Elatec GmbH 7.3.3 MultiTag Selection / Tag List „m‟ This command detects several tags at the same time. It replaces the fast select command („s‟) in multiple tag surroundings. The MultiTag list command lists all present tags with their serial numbers.
  • Page 27: Mifare® Plus Virtual Card Select 'Nvcs

    Elatec GmbH 7.3.4 Mifare® PLUS Virtual Card Select „nvcs‟ Use this command to retrieve the „real‟ UID of the transponder in a virtual card environment. If a card is configured to show random IDs, the virtual card select command offers the possibility to retrieve the UID in a fast and secure way.
  • Page 28: Data-Transaction Related Commands

    Elatec GmbH 7.4 Data-Transaction Related Commands 7.4.1 Authenticate Tag 7.4.1.1 Mifare® Classic Login ‘l’ This command performs an authentication into a specific sector of a Mifare® Classic transponder. Only one transponder and only one sector can be accessed at the same time. Prior access, the transponder must be selected by either single tag or MultiTag selection commands.
  • Page 29: Mifare® Ultralight C Login 'L

    Elatec GmbH 7.4.1.2 Mifare® Ultralight C Login ‘l’ This command performs an authentication into a Mifare® Ultralight C transponder. The authentication scheme into this transponder type is different to Mifare® Classic due to the fact, that Ultralight C uses Triple-DES cryptography.
  • Page 30: Mifare® Plus Login 'Nl

    Elatec GmbH 7.4.1.3 Mifare® PLUS Login ‘nl’ Mifare® PLUS offers various authentication features to the user. Depending on the desired transaction or configured security level of the transponder, the appropriate authentication procedure must be chosen by the user. The reader always demands an AES key for authentication; if the transponder is configured to security level 2, optionally a Crypto1 key can be passed to the reader.
  • Page 31: Login In Multiple Tag Surroundings

    Elatec GmbH Examples Command Description ‘nl00AA50<CR>’ Authenticate to sector 00 using EEPROM AES key 00, type A ‘nl02BB51<CR>’ Authenticate to sector 02 using EEPROM AES key 01, type B ‘nl28AA52<CR>’ Authenticate with card master key using EEPROM AES key 02, KeyType is ignored but has to be transmitted to the reader.
  • Page 32: Read Data Block 'R' / 'Rb

    Elatec GmbH 7.4.2 Read Data Block „r‟ / „rb‟ This command reads an entire data block from a transponder. The range of valid block addresses depends on the used transponder. If you are working with Mifare® cards, keep in mind that any read- or write access requires a successful login into the respective sector.
  • Page 33: Write Data Block 'W' / 'Wb

    Elatec GmbH 7.4.3 Write Data Block „w‟ / „wb‟ This command writes an entire data block to the transponder. The range of valid block addresses depends on the used transponder. A read after write is done automatically to ensure data integrity. If you are working with Mifare®...
  • Page 34: Mifare® Value Block Related Commands

    Elatec GmbH 7.4.4 Mifare® Value Block Related commands A sector of a Mifare® transponder may contain so-called „value blocks‟. A value block is a usual data block, where the information is stored in a certain format. Special Mifare® commands like increment or decrement may be applied to such a block, e.g.
  • Page 35: Create Value Block 'Wv

    Elatec GmbH 7.4.4.1 Create Value Block ‘wv’ Use this command to format a common data block as a value block. The range of valid block addresses depends on the used transponder type. You must log into the respective sector before this command can be executed.
  • Page 36: Increment Value Block

    Elatec GmbH 7.4.4.3 Increment Value Block ‘+’ Use this command to increment a value block by a defined value. A read after increment is performed automatically. The command fails if the specified block is not formatted as value block. You must log into the respective sector before this command can be executed.
  • Page 37: Copy Value Block

    Elatec GmbH 7.4.4.5 Copy Value Block ‘=’ Use this command to copy a value block to another value block of the same sector. A read after copy is performed automatically. The command fails if one of the specified blocks is not in value format. You must log into the respective sector before this command can be executed.
  • Page 38: Mifare® Plus Related Commands

    Elatec GmbH 7.4.5 Mifare® PLUS Related Commands 7.4.5.1 Write Personalization Data ‘nwp’ Use this command to transmit personalization data to the transponder in SL0. At least Card Master key, Card configuration key, Level 2 switch key (Mifare® PLUS X only) and Level 3 switch key must be written in order to personalize the transponder.
  • Page 39: Commit Personalization 'Ncp

    Elatec GmbH 7.4.5.2 Commit Personalization ‘ncp’ Use this command to finish personalization and to switch the transponder from SL0 to SL1. If the personalized transponder is a so-called „L3‟-card, the transponder is switched to SL3. This command is only supported if the transponder is in SL0.
  • Page 40: Transparent Iso14443-4 Transponder Access 'T

    Elatec GmbH Answer Answer Description Data<CR><LF> Written data ‘F<CR><LF>’ Error: General failure ‘R<CR><LF>’ Error: Parameter out of range Examples Command Description nw00AA001122334455 Change AES sector key, sector 00, key type A to 00112233445566778899AABBCCDDEEFFh 66778899AABBCCDDEEFF nw01BB000000000000 Change AES sector key, sector 01, key type B to 00000000000000000000000000000000h...
  • Page 41: Setup Related Commands Of The Reader

    Elatec GmbH 7.5 Setup Related Commands of the Reader 7.5.1 Read Byte from EEPROM „rp‟ Use this command to read a byte from the internal reader EEPROM. Only the configuration bank is accessible by the user, it is not possible to read any stored keys. The address byte ranges from 00h to FFh.
  • Page 42: Set Configuration Flags 'Of

    Elatec GmbH 7.5.3 Set Configuration Flags „of‟ Use this command to set or clear the Configuration Flags of the reader. In contrast to the EEPROM registers, the settings of the „of‟ command are volatile, this means, they are taking effect on the behavior of the reader at once and they are lost, when a reset occurs or the reader is powered down.
  • Page 43: Set Tag Type 'Oa' / 'Ob' / 'Oj' / 'Op' / 'Os' / 'Ot

    Elatec GmbH 7.5.5 Set Tag Type „oa‟ / „ob‟ / „oj‟ / „op‟ / „os‟ / „ot‟ Use this command to search for only one specific transponder type (e.g. only ISO14443A). In contrast to the EEPROM registers, the settings of the „o‟ command are volatile, this means they are taking effect on the behavior of the reader at once and they are lost when a reset occurs or the reader is powered down.
  • Page 44: Key Management

    Elatec GmbH 7.5.8 Key Management 7.5.8.1 Write Mifare® Classic Key ‘wm’ Use this command to store a Mifare® Classic authentication key into the EEPROM of the reader. The reader is able to store up 32 keys. The key locations are write-only, so the keys can‟t be read back.
  • Page 45: Sam Related Commands

    Elatec GmbH 7.5.9 SAM related Commands The reader supports the connection of an ISO7816 compatible SAM card (Secure Access Module). The SAM card is driven by the reader via an ISO7816 compatible UART, using the following default parameters: f = 1.1 MHz; F = 372;...
  • Page 46: Miscellaneous Commands

    Elatec GmbH 7.6 Miscellaneous Commands 7.6.1 Get Station ID „g‟ Use this command to retrieve the station ID of the reader. Command: ‘g’ Answer Description Data<CR><LF> Station ID of the reader (1 byte) 7.6.2 Antenna Power Off „poff‟ Use this command to turn off the RF-field and save energy. All present tags in the antenna field are powered down and reset.
  • Page 47: Read Gpio 'Ir

    Elatec GmbH 7.6.7 Read GPIO „ir‟ Use this command to read a specified GPIO. The GPIO is switched to input prior reading. Command: ‘ir[GPIONumber]’ Answer Answer Description Data<CR><LF> Status of specified GPIO: 00 means Low; 01 means High. Example Command Description ‘ir02’...
  • Page 48: Typical Data Transaction Procedures

    Elatec GmbH 8. Typical Data Transaction Procedures 8.1 Mifare® Classic / Mifare® PLUS The following diagram shows the typical command-flow in order to access the data area of a Mifare® Classic / PLUS transponder: Select transponder ‚s‟ / ‚m‟ Transponder...
  • Page 49: Mifare® Ultralight

    Elatec GmbH 8.2 Mifare® Ultralight In contrast to Mifare® Classic transponders, no login is required to access the EEPROM memory: Select transponder ‚s‟ / ‚m‟ Transponder selected? Perform read/ write actions ‚r‟ / ‚w‟ Read/write successful? Read/write completed? Page 49 of 61...
  • Page 50: Mifare ® Ultralightc

    Elatec GmbH 8.3 Mifare® Ultralight C Accessing the EEPROM depends on the settings of the transponder, e.g. if an authentication is required. The following diagram shows the typical command-flow in order to access the data area of a Mifare® Ultralight C transponder:...
  • Page 51: Memory Organization Of Mifare® Transponders

    Elatec GmbH 9. Memory Organization of Mifare® Transponders 9.1 Mifare® Classic 1k A Mifare® Classic 1k transponder consists of 16 sectors. Each sector is organized in four data blocks. A data block stores 16 bytes of data. The following table shows the memory organization of a Mifare®...
  • Page 52: Mifare® Classic 4K

    Elatec GmbH 9.2 Mifare® Classic 4k A Mifare® Classic 4k transponder consists of 40 sectors. In contrast to the Mifare® standard 1k transponder, the 4k version has a different memory organization, shown in the following table: Sector Block addresses Login sector...
  • Page 53: Mifare® Plus

    Elatec GmbH 9.3 Mifare® PLUS Mifare® PLUS 2K/4K transponders have a similar memory organization like Mifare® Classic 4K. However, a 2Kbyte card only has the lower 32 Sectors built-in: Bytes Sector Block addresses Sector Block addresses 00h...03h 40h...43h 04h...07h 44h...47h 08h...0Bh...
  • Page 54: Mifare® Ultralight

    Elatec GmbH 9.4 Mifare® Ultralight A Mifare® Ultralight transponder consists of 16 pages with 4 bytes each. The UID is read-only and is also mapped into the memory area. Page Byte 0 Byte 1 Byte 2 Byte 3 Access rights...
  • Page 55: Mifare ® Ultralightc

    Elatec GmbH 9.5 Mifare® Ultralight C A Mifare® Ultralight C transponder consists of 48 pages with 4 bytes each. The UID is read-only and is also mapped into the memory area. The 16 bytes Triple-DES key is stored in the last 4 pages of the transponder.
  • Page 56: Example: Writing The Triple-Des Key

    Elatec GmbH 9.5.1 Example: Writing the Triple-DES Key This chapter shows how to write the Triple-DES key into the transponder. On example of Key1 = 0001020304050607h and Key2 = 08090A0B0C0D0E0Fh the command sequence shown in the table below has to be executed for writing the key. The following preconditions...
  • Page 57: Mifare® Plus

    Elatec GmbH 10. Mifare® PLUS 10.1 Security Levels Mifare® PLUS supports four security levels. The initial delivery configuration is SL0. Within this level, cards must be personalized. After that, the card is switched to a higher security level. Once a card has been switched to a higher level, it cannot be switched back to a lower level.
  • Page 58: Application Hints

    Elatec GmbH 10.2 Application Hints Have a look at the following hints when developing your Mifare® PLUS application. They will help you choosing the correct transponder and reader in order to satisfy your needs:  In SL3, value formats are only supported by Mifare® PLUS X cards ...
  • Page 59: Firmware Update

    Elatec GmbH 11. Firmware Update The reader contains a bootloader program which makes firmware updates possible. Complete the following steps to update the firmware:  Power up the reader  Ensure that the reader runs at 9600 bps  Start the application WinFlash.exe, you should see the following window ...
  • Page 60: Firmware History

    Elatec GmbH 12. Firmware History Version Changes  V1.00 Initial release  V1.02 New EEPROM configuration byte StartupDelay Page 60 of 61...
  • Page 61: Trademarks

    Elatec GmbH 13. Trademarks All referenced brands, product names, service names and trademarks mentioned in this document are the property of their respective owners. Page 61 of 61...

This manual is also suitable for:

Twn3 reader mifare nfc

Table of Contents