amlib.ccid

## Class Reader6636

- java.lang.Object
- - amlib.ccid.Reader
  - - amlib.ccid.Reader6636

-     public class Reader6636
      extends Reader

- - ### Field Summary

    - ### Fields inherited from class amlib.ccid.Reader

      `CardModeASYNC, CardModeAT45D041, CardModeAT88SC102, CardModeAT88SC153, CardModeAT88SC1608, CardModeI2C, CardModeINPHONE, CardModeSLE4428, CardModeSLE4442, CardModeSLE6636, CCID_POWEROFF, CCID_POWERON, CCID_PROTOCOL_NA, CCID_PROTOCOL_T0, CCID_PROTOCOL_T1, SLOT_STATUS_CARD_ABSENT, SLOT_STATUS_CARD_ACTIVE, SLOT_STATUS_CARD_INACTIVE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Reader6636(HardwareInterface Dev)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `open()` To open the reader.
    `int` | `open(int slot)` To open reader with given slot
    `int` | `SLE6636Cmd_Authentication(byte bKeyNo, byte bClock, byte bWriteLen, byte[] pWChallengeBuf, byte bReadLen, byte[] pReadData, int[] pIntReturnLen)` SLE6636Cmd_Authentication send authentication command
    `int` | `SLE6636Cmd_ReadCounters(byte bReadLen, byte[] pReadData, int[] pIntReturnLen)` The SLE6636Cmd_ReadCounters function read Counter Area from the card.
    `int` | `SLE6636Cmd_ReadMemory(byte bAddress, byte bReadMEMLen, byte bReadLen, byte[] pReadData, int[] pIntReturnLen)` The SLE6636Cmd_ReadMemory function read Memory Area
    `int` | `SLE6636Cmd_Reload(byte bAddress, byte bReadLen, byte[] pReadData, int[] pIntReturnLen)` The SLE6636Cmd_Reload function reload(Erase 8 Bits with Carry Operation) .
    `int` | `SLE6636Cmd_Verification(byte bTC1, byte bTC2, byte bTC3, byte bReadLen, byte[] pReadData, int[] pIntReturnLen)` The SLE6636Cmd_Verification function
    `int` | `SLE6636Cmd_WriteCounter(byte bAddress, byte bWriteData, byte bReadLen, byte[] pReadData, int[] pIntReturnLen)` The SLE6636Cmd_WriteCounter function write Counter Area to the card.
    `int` | `SLE6636Cmd_WriteMemory(int intApduLen, byte bAddress, byte bWriteLen, byte[] pWriteBuffer, byte bReadLen, byte[] pReadData, int[] pIntReturnLen)` The SLE6636Cmd_WriteMemory function write Memory Area

    - ### Methods inherited from class amlib.ccid.Reader

      `close, escape, getAtr, getAtrString, getCardStatus, getCmdFailCode, getCurrentDev, getProtocol, getSN, setPower, setSlot, switchMode, transmit`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Reader6636

          public Reader6636(HardwareInterface Dev)
                     throws ReaderException

      Constructor
      Parameters:
        `Dev` - HardwareInterface object which has been initialed
      Throws:
        `ReaderException`
      See Also:
        `ReaderException`

  - ### Method Detail

    - #### open

          public int open(int slot)

      Description copied from class: `Reader`
      To open reader with given slot
      Overrides:
        `open` in class `Reader`
      Parameters:
        `slot` - slot number to open
      Returns:
        READER_SUCCESSFUL or other error code

    - #### open

          public int open()

      Description copied from class: `Reader`
      To open the reader.
      Overrides:
        `open` in class `Reader`
      Returns:
        READER_SUCCESSFUL or other error code

    - #### SLE6636Cmd_WriteMemory

          public int SLE6636Cmd_WriteMemory(int intApduLen,
                                            byte bAddress,
                                            byte bWriteLen,
                                            byte[] pWriteBuffer,
                                            byte bReadLen,
                                            byte[] pReadData,
                                            int[] pIntReturnLen)

      The SLE6636Cmd_WriteMemory function write Memory Area
      Parameters:
        `intApduLen` - Should set to 0.
        `bAddress` - Specifies the address to write to memory area.
        `bWriteLen` - Specifies the number of bytes to write to memory area.
        `pWriteBuffer` - Pointer to the buffer containing the data to be written to the card.
        `bReadLen` - Specifies the buffer length to be read from the card .
        `pReadData` - Pointer to the buffer that receives the data.
        `pIntReturnLen` - Pointer to the variable that receives the number of bytes read.
      Returns:
        zero for success.

    - #### SLE6636Cmd_ReadMemory

          public int SLE6636Cmd_ReadMemory(byte bAddress,
                                           byte bReadMEMLen,
                                           byte bReadLen,
                                           byte[] pReadData,
                                           int[] pIntReturnLen)

      The SLE6636Cmd_ReadMemory function read Memory Area
      Parameters:
        `bAddress` - Specifies the address to read from memory area.
        `bReadMEMLen` - Specifies the number of bytes to read from the memory.
        `bReadLen` - Specifies the buffer length to be read from the card.
        `pReadData` - Pointer to the buffer that receives the data.
        `pIntReturnLen` - Pointer to the variable that receives the number of bytes read.
      Returns:
        zero for success.

    - #### SLE6636Cmd_WriteCounter

          public int SLE6636Cmd_WriteCounter(byte bAddress,
                                             byte bWriteData,
                                             byte bReadLen,
                                             byte[] pReadData,
                                             int[] pIntReturnLen)

      The SLE6636Cmd_WriteCounter function write Counter Area to the card.
      Parameters:
        `bAddress` - Specifies address to write to counter area.
        `bWriteData` - Specifies the data to write to counter area.
        `bReadLen` - Specifies the buffer length to read from the card.
        `pReadData` - Pointer to the buffer that receives the data.
        `pIntReturnLen` - Pointer to the variable that receives the number of bytes read.
      Returns:
        zero for success.

    - #### SLE6636Cmd_ReadCounters

          public int SLE6636Cmd_ReadCounters(byte bReadLen,
                                             byte[] pReadData,
                                             int[] pIntReturnLen)

      The SLE6636Cmd_ReadCounters function read Counter Area from the card.
      Parameters:
        `bReadLen` - Specifies the buffer length to read from the card. It should be set to 8.
        `pReadData` - Pointer to the buffer that receives the data.
        `pIntReturnLen` - Pointer to the variable that receives the number of bytes read.
      Returns:
        zero for success.

    - #### SLE6636Cmd_Reload

          public int SLE6636Cmd_Reload(byte bAddress,
                                       byte bReadLen,
                                       byte[] pReadData,
                                       int[] pIntReturnLen)

      The SLE6636Cmd_Reload function reload(Erase 8 Bits with Carry Operation) .
      Parameters:
        `bAddress` - Specifies the address to reload.
        `bReadLen` - Specifies the buffer length to read from the card
        `pReadData` - Pointer to the buffer that receives the data.
        `pIntReturnLen` - Pointer to the variable that receives the number of bytes read.
      Returns:
        zero for success.

    - #### SLE6636Cmd_Authentication

          public int SLE6636Cmd_Authentication(byte bKeyNo,
                                               byte bClock,
                                               byte bWriteLen,
                                               byte[] pWChallengeBuf,
                                               byte bReadLen,
                                               byte[] pReadData,
                                               int[] pIntReturnLen)

      SLE6636Cmd_Authentication send authentication command
      Parameters:
        `bKeyNo` - Specifies the number of Key(0x01 or 0x02).
        `bClock` - Specifies the clock.
        `bWriteLen` - Specifies the data length of challenge data.
        `pWChallengeBuf` - Pointer to the buffer that to be challenge.
        `bReadLen` - Specifies the buffer length to read from the card.
        `pReadData` - Pointer to the buffer that receives the data.
        `pIntReturnLen` - Pointer to the variable that receives the number of bytes read.
      Returns:
        zero for success.

    - #### SLE6636Cmd_Verification

          public int SLE6636Cmd_Verification(byte bTC1,
                                             byte bTC2,
                                             byte bTC3,
                                             byte bReadLen,
                                             byte[] pReadData,
                                             int[] pIntReturnLen)

      The SLE6636Cmd_Verification function
      Parameters:
        `bTC1` -
        `bTC2` -
        `bTC3` -
        `bReadLen` - Specifies the buffer length to read from the card .
        `pReadData` - Pointer to the buffer that receives the data.
        `pIntReturnLen` - Pointer to the variable that receives the number of bytes read.
      Returns:
        zero for success.