Site Tools


r502-api-manual

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
r502-api-manual [2017/05/13 02:30]
127.0.0.1 external edit
r502-api-manual [2017/05/15 08:27]
Tarantino
Line 8: Line 8:
 ==== 1. Constructor and initialization ==== ==== 1. Constructor and initialization ====
 === Constructor === === Constructor ===
- 
  
   * Parameter: scinterface   * Parameter: scinterface
Line 15: Line 14:
    
 === init() === === init() ===
- 
  
   * Function: Initialization.   * Function: Initialization.
    
- 
   * Parameter: Null.   * Parameter: Null.
    
Line 27: Line 24:
 ====2. Related contactless API==== ====2. Related contactless API====
 === rfOn() === === rfOn() ===
- 
  
   * Function: Open smartcard reader electromagnetic field.   * Function: Open smartcard reader electromagnetic field.
-  
- 
  
   * Parameter: Null.   * Parameter: Null.
    
- 
   * Return:   * Return:
         - True if the command is executed successfully. ​         - True if the command is executed successfully. ​
Line 55: Line 48:
  
 === rfAuto() === === rfAuto() ===
- 
  
   * Function: Set smartcard reader debug function to automatic status. In this status, anti-collision will be completed automatically.   * Function: Set smartcard reader debug function to automatic status. In this status, anti-collision will be completed automatically.
    
- 
   * Parameter: Null.   * Parameter: Null.
    
Line 72: Line 63:
   * Function: Set smartcard reader debug function to manual operation status. In this status, anti-collision program will be implemented by calling API interface.   * Function: Set smartcard reader debug function to manual operation status. In this status, anti-collision program will be implemented by calling API interface.
    
- 
   * Parameter: Null.   * Parameter: Null.
    
- 
   * Return:   * Return:
         - True if the command is executed successfully. ​         - True if the command is executed successfully. ​
Line 82: Line 71:
 ====3. ISO14443 TypeA protocol API==== ====3. ISO14443 TypeA protocol API====
 === claREQA(commandValue) === === claREQA(commandValue) ===
- 
  
   * Function: Send REQA command of ISO14443 TypeA.   * Function: Send REQA command of ISO14443 TypeA.
    
- 
   * Parameter: commandValue:​ the value of command. It is 0x26 as defined in ISO14443 specification.   * Parameter: commandValue:​ the value of command. It is 0x26 as defined in ISO14443 specification.
-  
- 
  
   * Return:   * Return:
Line 96: Line 81:
    
 === claWUPA(commandValue) === === claWUPA(commandValue) ===
- 
  
   * Function: Send WUPA command of ISO14443 TypeA.   * Function: Send WUPA command of ISO14443 TypeA.
    
- 
   * Parameter: commandValue:​ the value of command. It is 0x52 as defined in ISO14443 specification.   * Parameter: commandValue:​ the value of command. It is 0x52 as defined in ISO14443 specification.
    
- 
   * Return:   * Return:
         - (True, command response value: ATQA) if the command is executed successfully. ​         - (True, command response value: ATQA) if the command is executed successfully. ​
Line 109: Line 91:
    
 === claAnticollision(commandValue) === === claAnticollision(commandValue) ===
- 
  
   * Function: Send ANTICOLLISION command of ISO14443 TypeA.   * Function: Send ANTICOLLISION command of ISO14443 TypeA.
-  
  
   * Parameter: commandValue:​ the value of command. e.g.: e.g.: ‘93 20’, ‘95 20’, ‘97 20’.   * Parameter: commandValue:​ the value of command. e.g.: e.g.: ‘93 20’, ‘95 20’, ‘97 20’.
    
- 
   * Return:   * Return:
         - (True, command response value: UID CLn) if the command is executed successfully. ​         - (True, command response value: UID CLn) if the command is executed successfully. ​
Line 122: Line 101:
    
 === claSelect(commandValue) === === claSelect(commandValue) ===
- 
  
   * Function: Send SELECT command of ISO14443 TypeA.   * Function: Send SELECT command of ISO14443 TypeA.
-  
  
   * Parameter: commandValue:​ the value of command. e.g.:  ‘93 70’ + UID, ‘95 70’ + UID, ‘97 70’ + UID.   * Parameter: commandValue:​ the value of command. e.g.:  ‘93 70’ + UID, ‘95 70’ + UID, ‘97 70’ + UID.
    
- 
   * Return:   * Return:
         - (True, command response value: SAK) if the command is executed successfully. ​         - (True, command response value: SAK) if the command is executed successfully. ​
Line 139: Line 115:
   * Function: Send RATScommand of ISO14443 TypeA.   * Function: Send RATScommand of ISO14443 TypeA.
    
- 
   * Parameter: commandValue:​ the value of command. The format defined in specification:​ he format defined in specification:​ ‘E0’ + Parameter byte.   * Parameter: commandValue:​ the value of command. The format defined in specification:​ he format defined in specification:​ ‘E0’ + Parameter byte.
    
Line 147: Line 122:
    
 === claHLTA(commandValue) === === claHLTA(commandValue) ===
- 
  
   * Function:​Send HLTA command of ISO14443 TypeA.   * Function:​Send HLTA command of ISO14443 TypeA.
-  
  
   * Parameter: commandValue:​ the value of command. The format defined in specification:​ ‘50 00’.   * Parameter: commandValue:​ the value of command. The format defined in specification:​ ‘50 00’.
-  
  
   * Return:   * Return:
Line 160: Line 132:
    
 === claPPS(commandValue) === === claPPS(commandValue) ===
- 
  
   * Function:​Send PPS command of ISO14443 TypeA.   * Function:​Send PPS command of ISO14443 TypeA.
-  
  
   * Parameter: commandValue:​ the value of command. The format defined in specification:​ PPSS + PPS0 + PPS1.   * Parameter: commandValue:​ the value of command. The format defined in specification:​ PPSS + PPS0 + PPS1.
Line 173: Line 143:
 ====4. ISO14443 Block protocol API==== ====4. ISO14443 Block protocol API====
 === clTransmit(commandValue) === === clTransmit(commandValue) ===
- 
  
   * Function: Send ISO14443 block.   * Function: Send ISO14443 block.
    
- 
   * Parameter: commandValue:​ the value of command. It can be I-Block, R-Block or S-Block.   * Parameter: commandValue:​ the value of command. It can be I-Block, R-Block or S-Block.
    
Line 187: Line 155:
 ====5. MIFARE Command API==== ====5. MIFARE Command API====
 === mifareAuthentication(commandValue) === === mifareAuthentication(commandValue) ===
- 
  
   * Function: Send MIFARE Authentication command.   * Function: Send MIFARE Authentication command.
    
- 
   * Parameter: commandValue: ​ the value of command.Auth type + Mifare Block Addr + (authentication key(6 bytes) + UID).   * Parameter: commandValue: ​ the value of command.Auth type + Mifare Block Addr + (authentication key(6 bytes) + UID).
    
- 
- 
   * Return:   * Return:
         - (True, ‘’) if the command is executed successfully. ​         - (True, ‘’) if the command is executed successfully. ​
Line 201: Line 165:
    
 === mifareBlockRead(commandValue) === === mifareBlockRead(commandValue) ===
- 
  
   * Function: Send MIFARE Read command.   * Function: Send MIFARE Read command.
-  
  
   * Parameter: commandValue:​ the value of command.It is 0x30 + Mifare Block Addr.   * Parameter: commandValue:​ the value of command.It is 0x30 + Mifare Block Addr.
-  
- 
- 
  
   * Return:   * Return:
Line 221: Line 180:
   * Function: Send MIFARE Write command.   * Function: Send MIFARE Write command.
 \\  \\ 
- 
- 
  
   * Parameter: commandValue:​ the value of command It is 0xA0 + Mifare Block Addr + Data(16bytes).   * Parameter: commandValue:​ the value of command It is 0xA0 + Mifare Block Addr + Data(16bytes).
 \\  \\ 
- 
  
  
Line 239: Line 195:
   * Function: Send MIFARE Increment command.   * Function: Send MIFARE Increment command.
 \\  \\ 
- 
- 
  
   * Parameter: commandValue:​ the value of command.It is 0xC1 + Mifare Block Addr + Data(16 bytes).   * Parameter: commandValue:​ the value of command.It is 0xC1 + Mifare Block Addr + Data(16 bytes).
 \\  \\ 
- 
- 
  
   * Return:   * Return:
Line 257: Line 209:
   * Function: Send MIFARE Decrement command.   * Function: Send MIFARE Decrement command.
 \\  \\ 
- 
- 
  
   * Parameter: commandValue:​ the value of command.It is 0xC0 + Mifare Block Addr + Data(16bytes).   * Parameter: commandValue:​ the value of command.It is 0xC0 + Mifare Block Addr + Data(16bytes).
 \\  \\ 
- 
- 
  
   * Return:   * Return:
Line 275: Line 223:
    ​* ​ Function: Send MIFARE Restore command.    ​* ​ Function: Send MIFARE Restore command.
 \\  \\ 
- 
- 
  
   * Parameter: commandValue:​ the value of command.It is 0xC2 + Mifare Block Addr + Data(16bytes).   * Parameter: commandValue:​ the value of command.It is 0xC2 + Mifare Block Addr + Data(16bytes).
 \\  \\ 
- 
- 
  
   * Return:   * Return:
Line 289: Line 233:
  
 === mifareTransfer(commandValue) === === mifareTransfer(commandValue) ===
- 
  
   * Function: Send MIFARE Transfer command.   * Function: Send MIFARE Transfer command.
 \\  \\ 
- 
- 
  
   * Parameter: commandValue:​ the value of command.It is 0xB0.   * Parameter: commandValue:​ the value of command.It is 0xB0.
 \\  \\ 
- 
- 
  
   * Return:   * Return:
r502-api-manual.txt · Last modified: 2017/05/15 08:32 by Tarantino