Site Tools


r502spy-usermanual

R502 SPY Reader Debug User Manual

R502 SPY reader is developed by JavaCardOS Technologies. It is based on Feitian R502 smart card reader. It supports not only contact cards compliant with ISO 7816 but also contactless cards compliant with ISO 14443,and has ISO14443 TypeA protocol debug function and Mifare command debug function. It also provides the online update feature. We will launch more protocol debug function in the future.

Contactless command

1. RF_ON

Open electromagnetic field.

2. RF_OFF

Close electromagnetic field.

3. RF_AUTO

Set to automatic communication status. In this status, anti-collision will be completed automatically.

4. RF_MANUAL

Set to manual operation status. In this status, all the commands will be sent by artificial, anti-collision program will not be executed automatically.

ISO14443-TypeA Debug

1. REQA

Command value is REQA . As the specification said, the command value is 0x26.

2. WUPA


Command value is WUPA. This command value is 0x52.

3. ANTICOLLISION

  • Level: Cascade level. Select cascade level 1, SEL is 0x93; Select cascade level 2, SEL is 0x95; Select cascade level 3, SEL is 0x97.
  • Byte Count: Specify the integer part of the number of all valid data bits transmitted by the PCD (including SEL and NVB) divided by 8.Consequently, the minimum value of “Byte count” is 2 and the maximum value is 7.
  • Bit Count: Specify the number of all valid data bits transmitted by the PCD (including SEL and NVB) modulo 8.

4. SELECT


  • Level: Cascade level. Select cascade level 1, SEL is 0x93;Select cascade level 2, SEL is 0x95;Select cascade level 3,SEL is 0x97.
  • Byte Count: Specify the integer part of the number of all valid data bits transmitted by the PCD (including SEL and NVB) divided by 8.Consequently, the minimum value of “Byte count” is 2 and the maximum value is 7.
  • Bit Count: Specify the number of all valid data bits transmitted by the PCD (including SEL and NVB) modulo 8.
  • UID: Unique Identifier.

5. RATS


  • Header: Start byte.
  • FSDI: Defines the maximum size of a frame the PCD is able to receive.
  • CID: Defines the logical number of the addressed PICC in the range from 0 to 14. The value 15 is RFU.

6. HLTA

Command value is HLTA. This value is 0x5000, provided by specification.

7. PPS

  • CID: Defines the logical number of the addressed PICC.
  • PPS1: Check V mark if there is PPS1 byte.
  • DSI: Bit 4 and 3 of PPS1. Code the selected divisor integer from PICC to PCD.
  • DRI: Bit 2 and 1 of PPS1.Code the selected divisor integer from PCD to PICC.

ISO14443-Block Transmission Debug

1. I-BLOCK

  • Chaining: If it’s not the last block of chain transmission, set it to 1, and set the last block to 0..
  • CID: Card IDentifier.
  • NAD: Node ADdress.
  • Block Number
  • INF
  • EDC

2. R-BLOCK

  • Type: R-Block type, ACK or NAK.
  • CID: Card IDentifier.
  • Block Number
  • INF
  • EDC

3. S-BLOCK

  • Type: If it’s not the last block of chain transmission, set it to 1, and set the last block to 0.
  • CID: Card Identifier.
  • INF
  • EDC

Mifare Debug

1. AUTHENTICATION

  • Mode: If it’s not the last block of chain transmission, set it to 1, and set the last block to 0.
  • Block Number: MIFARE Block address.
  • Key: Key value.
  • UID: Card Unique Identifier.

2. READ BLOCK

  • Block Number: MIFARE Block address.

3. WRITE BLOCK

  • Block Number: MIFARE Block address.
  • Data: Data to write. The length of data is block size 16 bytes.

4. INCREMENT

  • Block Number: MIFARE Block address.
  • Operand: Operand (4 byte signed integer).

5. DECREMENT

  • Block Number: MIFARE Block address.
  • Operand: Operand (4 byte signed integer).

6. TRANSFER

  • Block Number: MIFARE Block address.

7. RESTORE

  • Block Number: MIFARE Block address.

Script operation

1. Load script file

Select script directory and load script content. The script file extension is scd.

2. Save script file

Save the current editing script.

If the script file directory is selected, this script will cover the script file under the current directory. If the script file directory is not selected, the window “Save” will pop up for you to save the file.

3. Script operation

  • Forward: The current selected command moves forward 1 position.
  • Backward: The current selected command moves backward 1 position.
  • Delete: Delete the current command.

4. Script execution

  • Execute: Execute the current script from behind.
  • Step over: From the current position, step over command.If there is no current selected item, execute the script from the first command.
  • Stop: Stop current operation.

Error value check list

No. Value
1 0x02
2 0x03
3 0x04
4 0x05
5 0x06
6 0x0F
7 0x1B
8 0x40
9 0x41
10 0x42
11 0x43
12 0x45
13 0x46
14 0x47
15 0x48
16 0x49
17 0x4A
18 0x4B
19 0x4C
20 0x4D
21 0x4E
22 0x4F
23 0x60
24 0x61
25 0x62
26 0x63
27 0x64

Technical support

r502spy-usermanual.txt · Last modified: 2017/05/15 08:43 by JavaCardOS