This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
r502-api-manual [2017/05/13 02:30] 127.0.0.1 external edit |
r502-api-manual [2017/05/15 08:32] (current) 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. | ||
* Return: Null. | * Return: Null. | ||
- | |||
====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. | ||
- False if failed to execute the command. | - False if failed to execute the command. | ||
- | \\ | ||
=== rfOff() === | === rfOff() === | ||
- | |||
* Function: Close smartcard reader electromagnetic field. | * Function: Close smartcard reader electromagnetic field. | ||
Line 48: | Line 38: | ||
* Parameter: Null. | * Parameter: Null. | ||
- | |||
* Return: | * Return: | ||
- True if the command is executed successfully. | - True if the command is executed successfully. | ||
- False if failed to execute the command. | - False if failed to execute the command. | ||
- | |||
=== 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 65: | Line 51: | ||
- True if the command is executed successfully. | - True if the command is executed successfully. | ||
- False if failed to execute the command. | - False if failed to execute the command. | ||
- | \\ | ||
=== rfManaul() === | === rfManaul() === | ||
- | |||
* 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 64: | ||
====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 74: | ||
=== 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 84: | ||
=== 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 94: | ||
=== 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 108: | ||
* 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 115: | ||
=== 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 125: | ||
=== 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 136: | ||
====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 148: | ||
====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 158: | ||
=== 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: | ||
- (True, block data) if the command is executed successfully. | - (True, block data) if the command is executed successfully. | ||
- (False, error code) if failed to execute the command. | - (False, error code) if failed to execute the command. | ||
- | \\ | ||
=== mifareBlockWrite(commandValue) === | === mifareBlockWrite(commandValue) === | ||
- | |||
* 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). | ||
- | \\ | ||
- | |||
- | |||
* Return: | * Return: | ||
- (True, ‘’) if the command is executed successfully. | - (True, ‘’) if the command is executed successfully. | ||
- (False, error code) if failed to execute the command. | - (False, error code) if failed to execute the command. | ||
- | \\ | ||
=== mifareIncrement(commandValue) === | === mifareIncrement(commandValue) === | ||
- | |||
* 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: | ||
- (True, ‘’) if the command is executed successfully. | - (True, ‘’) if the command is executed successfully. | ||
- (False, error code) if failed to execute the command. | - (False, error code) if failed to execute the command. | ||
- | \\ | ||
=== mifareDecrement(commandValue) === | === mifareDecrement(commandValue) === | ||
- | |||
* 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: | ||
- (True, ‘’) if the command is executed successfully. | - (True, ‘’) if the command is executed successfully. | ||
- (False, error code) if failed to execute the command. | - (False, error code) if failed to execute the command. | ||
- | \\ | ||
=== mifareRestore (commandValue) === | === mifareRestore (commandValue) === | ||
- | |||
* 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: | ||
- (True, ‘’) if the command is executed successfully. | - (True, ‘’) if the command is executed successfully. | ||
- (False, error code) if failed to execute the command. | - (False, error code) if failed to execute the command. | ||
- | \\ | ||
=== 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: | ||
- (True, ‘’) if the command is executed successfully. | - (True, ‘’) if the command is executed successfully. | ||
- (False, error code) if failed to execute the command. | - (False, error code) if failed to execute the command. | ||
- | \\ | ||