Page 3
Elatec GmbH Transponder serial number related commands ..............19 6.3.1 Continuous read mode ‘c’ ......................19 6.3.2 Select single tag ‘s’........................19 6.3.3 MultiTag selection / tag list ‘m’ ....................20 Data-transaction related commands................... 21 6.4.1 Login (authenticate tag) ‘l’ ......................21 6.4.1.1...
Elatec GmbH 1. Introduction This document is the reference guide for Elatec’s Mifare® transponder reader family TWN3 Mifare® and NanoMF. The readers are using the same reading technology, so this documentation is applicable for both devices. Elatec’s proximity reader TWN3 Mifare® is an integrated compact reader for reading and writing 13.56MHz ISO14443A Mifare®...
Elatec GmbH 2. Installation of NanoMF This chapter covers the installation of NanoMF in an embedded environment. 2.1 Dimensions Dimensions: 30.48mm x 25.40mm x 3.5mm (1.2” x 1” x 0.14”) Connectors are in 2.54mm (0.1”) grid. Schematic representation (component side) 2.2 Pinning...
Elatec GmbH 2.3 Electrical Characteristics Frequency 13.56 MHz Power supply 3.3 – 5.0V DC Current consumption RF field off: RF field on: Typically 80mA, depending on antenna 2.4 External Connections The schematic below shows a typical application circuit for operating the reader module.
Elatec GmbH 2.4.2 Serial connection Because NanoMF is transmitting and receiving TTL levels, it can be directly connected to a microcontroller. If you plan to run NanoMF at a PC, an appropriate interface converter circuit must be connected that can handle 3.0V TTL levels.
Elatec GmbH 3. Setting up a Terminal Program In order to establish a connection between the reader and a terminal program, the following steps have to be done: Connect your reader to a PC • Start your preferred terminal program (for Windows e.g. HyperTerminal) •...
Elatec GmbH 4. 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 labeled RFU at their default state to guarantee further compatibility. Please consider that if any register is written, the reader needs a reset so that the changes may take effect.
Elatec GmbH 4.2 Station ID (04h) 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.
Elatec GmbH 4.3.4 Binary Timeout (default 0) This flag is only interpreted if the reader operates in binary mode. If set and the serial line stays idle for more than 96ms (no data is transmitted from the host to the reader), the reader invalidates all received data and waits for valid data frames beginning with the STX code.
Elatec GmbH 4.4 Baudrate control register (06h) The Baudrate control register defines the start-up baudrate of the reader. For baudrate values, refer to the tables below: Baudrate control register Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2...
Elatec GmbH 4.5 Reset Off Time (07h) The Reset Off Time register represents the time in milliseconds, the HF-field is switched off, after a reading attempt has finished. This register is used for the continuous read mode (‘c’). The higher the value of the register, the more energy can be saved. As soon as there is a transponder in range, the field turned on permanently.
Elatec GmbH 4.8 Beep tone and length (14h, NanoMF only) This register defines the beep tone (frequency) and beep length. It is only implemented on NanoMF. Beep tone and length register Bit 7 Bit 6 Bit 5 Bit 4 Bit 3...
Elatec GmbH 5. Communication Protocol 5.1 ASCII Protocol The ASCII protocol has been designed for easy handling. Data is 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: Mifare 1.11<CR><LF>...
Elatec GmbH 5.2.5 Block Check Character (BCC) The BCC is used to detect transmission errors. The BCC is calculated by XOR-ing each byte of the transmission frame except the STX/ETX characters. 5.2.6 ETX End of Transmission (03h) 5.2.7 Example This example shows how to log into sector 0 of a Mifare card, using transport key FFh: ®...
Elatec GmbH 6.2 Error Codes Following table shows an overview of all error messages of the reader device. Error Code Description ‘?<CR><LF>’ Unknown command ‘E<CR><LF>’ Invalid key format ‘F<CR><LF>’ General failure ‘I<CR><LF>’ Invalid value block (block does not match the value format) ‘N<CR><LF>’...
Elatec GmbH 6.3 Transponder serial number related commands 6.3.1 Continuous read mode ‘c’ The reader device 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.
Elatec GmbH 6.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.
Elatec GmbH 6.4 Data-transaction related commands 6.4.1 Login (authenticate tag) ‘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.
Elatec GmbH 6.4.2 Read data block ‘r’ / ‘rb’ This command reads an entire data block of a transponder. The range of valid block addresses depends on the used transponder. Keep in mind that any read- or write access requires a successful login into the respective sector.
Elatec GmbH 6.4.3 Write data block ‘w’ / ‘wb’ This command writes an entire data block to a 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®...
Elatec GmbH 6.4.4 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.
Elatec GmbH 6.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.
Elatec GmbH 6.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.
Elatec GmbH Examples Command Description -0800000001 Decrements block 08 by 00000001h -0812345678 Decrements block 08 by 12345678h 6.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.
Elatec GmbH 6.5 Setup-related commands of the reader 6.5.1 Read EEPROM register ‘re’ Use this command to read any internal reader EEPROM register. The register address must be range 00h … 14h. Command: ‘re[EERegAddr]’ Answer Answer Description Data<CR><LF> EEPROM data (1 byte)
Elatec GmbH 6.5.3 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.
Elatec GmbH 6.6 Miscellaneous commands 6.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) 6.6.2 Antenna power off ‘poff’ Use this command to turn off the HF-field and save energy. All present tags in the antenna field are powered down and reset.
Elatec GmbH 6.7 NanoMF related commands 6.7.1 Beep ‘b’ Use this command to perform a beep. Tone length and frequency are depending on the settings in the Beep tone and length register. The command answers with the value written in the Beep tone and length register.
Elatec GmbH 6.7.4 Read GPIO1 ‘pr’ Use this command to read GPIO1. GPIO1 is switched to input prior reading. The command has the same effect as command ‘ir01’. It has been implemented in order to maintain backward compatibility. Command: ‘pr’...
Elatec GmbH 7. Typical data transaction procedure 7.1 Mifare® Classic The following diagram shows the typical command-flow in order to access the data area of a Mifare® Classic transponder: Select transponder ‚s’ / ‚m’ Transponder selected? Login into sector ‚l’ / ‚nl’...
Elatec GmbH 8. Memory Organization of Mifare® transponders 8.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®...
Elatec GmbH 8.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: Bytes Sector Block addresses...
Elatec GmbH 8.3 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...
Elatec GmbH 8.4 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.
Elatec GmbH 9. 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 • On TWN3, the reader must be configured to run in Transparent Mode •...
Elatec GmbH 11. Trademarks All referenced brands, product names, service names and trademarks mentioned in this document are the property of their respective owners. Page 41 of 41...
Need help?
Do you have a question about the Mifare TWN3 and is the answer not in the manual?
Questions and answers