Page 1 COMMAND INTERFACE - REFERENCE MANUAL Couplers - Reference Manuel V1.
Page 2 CONTENTS Introduction..........................................................................................................................................................4 Host – Coupler protocol.......................................................................................................................................4 Description......................................................................................................................................................
Page 3 Prototyping..............................................................................................................................................23 Parameters...............................................................................................................................................23 ASK RANDOM.............................................................................................................................................24 Use....................................
Page 4 Introduction This reference manual describes the command interface with INSIDE Contactless couplers and readers. Host – Coupler protocol Description The commands are modeled on the ISO 7816 command set. This protocol is used by all INSIDE’s couplers A typical protocol exchange includes: 1. The host sends a command to the coupler 2. The coupler executes the command 3.
Page 5 ISO In : The host sends a command + data and receives the status words. ISO Out : The host sends a command and receives data + the status words. Coupler with firmware former than 40-017F has only ISO NONE, ISO IN and ISO OUT protocol available. In all cases, status words are returned (SW1 and SW2). Case 1: ISO None Data Exchange Command Host Class Ins. P1 Status words P2 P3 Coupler nb. bytes SW1 5 bytes SW2 2 bytes Case 2 : ISO Out Data Exchange - Coupler ð Host Command Host Class Ins.
Page 6 • Class : always 80h • Instruction : command code • P1 & P2 : command parameters • P3: number of data bytes sent to the coupler. • Ack. : coupler acknowledgement. It is always equal to the command code, except when an error occurs. If Acknowledgement value is different than instruction byte, then the received byte is the first byte of a status error code coded on 2 bytes. • Data : data sent by host to the coupler. Size of data array has to be P3.
Page 7 Coupler's command overview Common functions Command INS Description SELECT_CARD ‘A4h’ Selects one contactless card following list of possible cards in the field SELECT_PAGE ‘A6h’ Selects a page in a multi-application chip TRANSMIT ‘C2h’ Sends and retrieve data from chip through contactless interface : Transparent mode GET_RESPONSE ‘C0h’ Reads the internal buffer of the coupler to retrieve chip answer for ISO 7816 T=0 protocol.
Page 8 SELECT CARD Use Select a card in order to get the serial number. This command manages anti-collision and authentication features. This command is able to test several communication protocol. It answers the number of protocol used to select the card. Prototyping • Command sent : A4h • Command type : ISO out Host 80h A4h P1 P2 P3 Coupler A4h Serial Number 90h 00h Parameters Bit 7 6 5 4 3 2 1 0 Function - - Key Auth Presel.
Page 9 PRE: 1: Increases pre-selection with INSIDE CONTACTLESSanti-collision and a large number of cards. 0: Standard anti-collision (best for 5 cards max.). AUTH: 1: Performs a standard INSIDE authentication. Authentication is performed if the key is set as the current key. Please refer to appendix A : «How to low a key» for key loading and key management operations details. 0: Does not perform an authentication. KEY: 1: Authenticates with Debit Key (Kd = Key 1) if AUTH is set.
Page 10 SELECT PAGE Use This command is used to select and authenticate in an INSIDE multi-application chip (8*2Ks...). Prototyping • Command sent : A6h • Command type : ISO Out Host 80h A6h P1 P2 08h Data Coupler A6h Chip's configuration block 90h 00h 1 0 Parameters Bit 7 6 5 4 3 2 Function - - - - Auth Page Selection P1: Parameter used for contactless configuration b3 : Auth 0 - Does not perform authentication after PAGESEL.
Page 11 Contactless Communication Protocol 00 ISO14 443 B PICO family chips 01 ISO15 693 PICO family chips 10 ISO14 443 B-3 11 User’s protocol Couplers - Reference Manuel V1.
Page 12 P2 : Page number to select and authenticate and cryptographic key to use Bit 7 Function 6 5 4 Reader key number 3 - 2 1 Page number b7-b4 : Reader key number This is the reader key number to use during authentication. The reader will use this key number (EEPROM) to diversify and authenticate the requested page with Kd or Kc. Note : 0 correspond to Kd0, 1 to Kc0, …, 14 to Kd7 and 15 to Kc7.
Page 13 TRANSMIT Use Transmits data from the coupler to the chip and read back chip response. This command is the one to use to read and write data in the chip.
Page 14 Bits 4 & 5 Time-out 15 693 Time-out 14 443 00 800 µs 200 µs 01 4 ms 1 ms 10 24 ms 6 ms 11 40 ms 10 ms b3: Send Signature: 1: Send a cryptographic signature calculated thanks to the coupler security module. This option may be used only for UPDATE command performed on secure PICO family chip. Set this value to 0 for non secure chip or any other manufacturer chips 0: Cryptographic signature is not sent. b2 : HOST - COUPLER protocol type 1 : Communication is ISO IN-OUT.
Page 15 Data: Commands and data to send to the chip All PICOTAG commands are detailed in PICOTAG datasheet. Response: • Chip answer • Status word. Couplers - Reference Manuel V1.
Page 16 GET RESPONSE Use This command returns the value contained in the internal buffer of the coupler. It has to be used to get chip answer when the TRANSMIT command is used with the ISO IN type to retreive the chip answer. Prototyping • Command sent :C0h • Command type : ISO out Host 80h C0h 00h 00h Coupler Parameters P3: Number of bytes of the coupler response It has to be less than 35 (23h). Response : Coupler’s buffer and status words Couplers - Reference Manuel V1.
Page 17 READ STATUS Use This command is used to get coupler parameters (communication speed…).
Page 18 SET STATUS Use This command sets configuration parameters and coupler’s I/O : • Communication speed • Protocols • State at Power ON • 2 outputs & 1 input The various parameters and data used by INSIDE couplers are stored in the EEPROM. When coupler is powered on, a part of these parameters are load in coupler’s RAM, so that parameters may be modified in coupler’s EEPROM and in coupler’s RAM. For a given parameter, RAM and EEPROM address are the same.
Page 19 b5-b2 : RFU (reserved for future use) b1-b0 : Parameter location 00 : Parameter value is read in coupler’s EEPROM (setting when power on) 01 : Coupler’s I/O 10 : Reserved for Future Use 11 : Parameter value is read in coupler’s RAM (current setting) P2: Sets the parameter address to update Valid values for P2 according to P1 value: • EEPROM : 00h to 07h and 3Eh to FFh. • I/O : 05h, 06h, 07h. • RAM : 50h to 6Fh.
Page 20 Send a SET_STATUS command (80h F4h 03h 6Dh 01h & 06h). The coupler responds (Status words) using 9600 bauds. State at power on - Is coupler emitting a field when it is powered on ? (please refer to ENABLE and DISABLE command chapters) Name Address State at power on 42h State Hex. value Enable 01h Disable 00h Available on... All reader Note : The ACTIVATE AT POWER ON parameter defines the state of the coupler when you turn it on.
Page 21 DISABLE COUPLER Use The coupler goes in SLEEPmode that allows low power consumption and RF carrier is desactivated. After this command, the coupler will not respond to any command except the ENABLE_COUPLERcommand. A new feature available only on M21xH 2G is that coupler can detect if a card approach the antenna and wake up on its own.
Page 22 DISABLE COUPLER ENHANCED Use As the DISABLE_COUPLERcommand, this specific version enables the user to asleep the reader. But M210H 2G and M260H 2G have the possibility to detect that a card approaches their antenna. As sooon as the card is detected, the coupler will turn the RF field on, and start a card selection. If no card answers to the anticollision process, the coupler go back asleep. If a card is selected, then the coupler stay awake.
Page 23 ENABLE COUPLER Use This command restores a normal coupler running, with RF emission. This command can only be used after a DISABLE_COUPLERcommand or if the coupler is desactivated after power on. Prototyping Command sent : AEh Command type : ISO none Host 80h AEh DAh BCh 00h 3Bh Coupler 00h Parameters Response : Status words The coupler will respond «Instruction not recognized» (6Dh 00h) if already activated. Important note : You have to send the ENABLE_COUPLERcommand in a window of 16ms.
Page 24 ASK RANDOM Use This command returns an 8 bytes random value from the coupler.This command has to be used to initialize the key loading procedure. Prototyping Command sent : 84h Command type : ISO out Host 80h 84h 00h 00h 08h Coupler Parameters Response : Random number; Status words Couplers - Reference Manuel V1.
Page 25 LOAD KEY FILE Use This function loads into the coupler’s security module a key to be used for authentication and security purposes. Key loading is a security sensitive operation. In order to protect the confidentiality of the keys transferred to the coupler, data is encrypted. A 4-byte checksum is also sent in order to guarantee the authenticity of the data, which could be corrupted either through transmission errors or by a deliberate attempt to fraud the system.
Page 26 10h - Credit key Kc7 Data This field contains: the 8-byte encrypted master key the 4-byte checksum Response: Status Words Couplers - Reference Manuel V1.
Page 27 SELECT CURRENT KEY Use This function allows to choose a key for future authentications. A key that has been deactivated or deleted cannot be selected. Only one of the 16 keys can be current at the same time. Prototype Command sent : 52h Command type : ISO In Host 80h 52h 00h P2h 08h 8 * 00h 52h Coupler 90h 00h Parameters P2 : Key number 01h - Debit Key Kd0 02h - Credit Key Kc0 03h - Debit Key Kd1 04h - Credit Key Kc1 .....
Page 28 DIVERSIFY KEY Use This function enables the user to calculate the result of key diversication with selected chip serial number. The key diversified value is used for authentication and signature calculation while writing a secure chip.
Page 29 GET CONFIG Use This command is used to read the ID of the MCU part. Prototype Command sent : CAh Command type : ISO In Host 80h CAh 00h 00h Coupler Parameters Data : MCU part’s ID Code Info (1 byte) : RFU Couplers - Reference Manuel V1.