Advertisement

Quick Links

SR200 & SR300 Card Printer:
SDK Guide
539903-001 Rev. B
November 2010

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SR200 and is the answer not in the manual?

Questions and answers

Summary of Contents for Entrust SR200

  • Page 1 SR200 & SR300 Card Printer: SDK Guide 539903-001 Rev. B November 2010...
  • Page 2 SR200 & SR300 Card Printer SDK Guide Notice See the “Software License Agreement” on the SR200 & SR300 Support CD. You must agree to the terms of the agreement before you can legally use the software interface and this document.
  • Page 3 SR200 & SR300 Card Printer SDK Guide Revision History June 2010 First release for SR200/SR300 printer and driver. November 2010 Updates for driver that includes Windows 7, 64-bit, and current information for laminator interface.
  • Page 4: Table Of Contents

    SR200 & SR300 Card Printer SDK Guide Contents Introduction ........................... 1 Overview ........................1 Control Libraries....................1 Operating Environment ....................1 System Configuration ......................2 About the API ........................3 Command Structure ....................... 3 Card Position ......................... 3 Print Area ........................3 Printer Control Functions ......................
  • Page 5 SR200 & SR300 Card Printer SDK Guide Encoding with ExtEscape() ..................54 Smart Card (IC) Programming ..................55 How to Override Driver Settings ..................57 Using ExtEscape() to Override a Setting ..............57 ExtEscape() Function ..................57 Change a Setting .................... 57 Get the Current Setting ...................
  • Page 6: Introduction

    Control Libraries For the SR200/SR300 printer, the Printer Control DLL (PCP21CT.DLL) is part of the USB driver. The API for the SR200/SR300 described in this document can be used only with the USB driver and a USB connection. The DLL is installed as part of driver installation.
  • Page 7: System Configuration

    System Configuration The following diagram shows the software components and their relationships. Items with a gray background are not included with the SR200 or SR300 printer and Support CD. Software components with a white background are installed from the Support CD.
  • Page 8: About The Api

    SR200 & SR300 Printer SDK Guide About the API This section provides background information about the printer driver API. Command Structure The structure of a command to the printer is according to the SCSI rule. A printer connected a PC is specified by both the Slot number and the ID of the printer. It makes it possible to control up to 10 printers.
  • Page 9: Printer Control Functions

    The Printer Control DLL (a Windows DLL) supports the printer control functions. The DLL is installed when the printer driver is installed. Name File Name Explanation SR200/SR300 CONTROL DLL for USB and 32-bit PCP21CT.DLL operating systems Printer Control DLL SR200/SR300 CONTROL DLL for USB and 64-bit PCP21CT64>DLL...
  • Page 10: Process Flow To Issue The Card

    SR200 & SR300 Printer SDK Guide Process Flow to Issue the Card First, use the Scan Printer function to obtain the Slot number and ID of the printer. When you have these values, you can use them to send commands to the printer.
  • Page 11: Scan Printer Functions

    SR200 & SR300 Printer SDK Guide Scan Printer Functions The API includes the following ♦ Scan Function ♦ Printer Check Function Scan Function Function Name Explanation int CXCMD_ScanPrinter Search for the first printer, and return the Slot number and ID. The result is set at piSlot and piID.
  • Page 12: Printer Status Functions

    SR200 & SR300 Printer SDK Guide Printer Status Functions You can use the following functions to retrieve printer status: ♦ Test Unit Ready Function ♦ Read Position Function Test Unit Ready Function Function Name Explanation int CXCMD_TestUnitReady Check the printer condition by issuing Test Unit (int iSlot, int iID) Ready command to the printer.
  • Page 13: Print On Retransfer Film Functions

    1 to use Buffer 1. How to Translate RGB to YMC Planes The SR200 & SR300 printers support printing to YMC planes to print a colored image. If the source image is in RGB format, it must be transformed to Y, M and C planes.
  • Page 14 SR200 & SR300 Printer SDK Guide About UV Ink UV ink becomes visible with ultraviolet rays. UV data is grayscale data, in the range of 0 to 255. 255 provides the maximum coverage. UV and YMCK inks cannot be transferred in the same area on the same retransfer panel.
  • Page 15 SR200 & SR300 Printer SDK Guide ♦ Portrait: The upper right location starts at 612,743. The lower left location starts at 19, 42. About the Pixel Order for Images Sent to the Printer Pixels must be sent to printer in Landscape order. If an image has portrait orientation, the application must change the pixel order to landscape when sending the data using the ImageOut function.
  • Page 16: Define Lut Function

    SR200 & SR300 Printer SDK Guide Define LUT Function Function Name Explanation int CXCMD_DefineLUT Change the look up table in the printer. (int iSlot,int iID, iColor Each color has its own look up table. Possible values are 2 for C, 4 for M, 6 for Y. (0 for K is reserved int iColor, for printer use.)
  • Page 17: Print Function

    SR200 & SR300 Printer SDK Guide Print Function Function Name Explanation Print on Retransfer film. int CXCMD_Print iColor Specify the color to print. (int iSlot,int iID, int iColor, Bit 0:YMC Bit 1: K int iBuffer, int iImmed) Bit 2: UV Bit 3:PO Bit 4-5: The location of the MAC address printed with UV.
  • Page 18: Functions For Moving And Discharging The Card

    SR200 & SR300 Printer SDK Guide Functions for Moving and Discharging the Card The API provides the following functions to move and discharge the card: ♦ Card Load Function ♦ Card Move Function Card Load Function Function Name Explanation int CXCMD_LoadCard Pick a card and move it to the specified position.
  • Page 19: Card Move Function

    SR200 & SR300 Printer SDK Guide Card Move Function Function Name Explanation int CXCMD_MoveCard Move a card (after it is picked) to the specified position. (int iSlot, int iID, iDest Destination to move card. int iDest, 0 Retransfer position int iFlip,...
  • Page 20: Retransfer To Card Functions

    SR200 & SR300 Printer SDK Guide Retransfer to Card Functions Retransfer Functions Function Name Explanation Retransfers the image from the film to the card, and CXCMD_RetransferAndEject then moves the card out through the card discharge slot (on the left side of the printer).
  • Page 21: Magnetic Stripe Encoding Functions

    SR200 & SR300 Printer SDK Guide Magnetic Stripe Encoding Functions The API provides the following functions for magnetic stripe encoding: ♦ Writing Function (for JIS) ♦ Reading Function (for JIS) ♦ Writing Functions (for ISO) ♦ Reading Function (for ISO)
  • Page 22: Reading Function (For Jis)

    SR200 & SR300 Printer SDK Guide Reading Function (for JIS) Function Name Explanation 1 Reads the data on the magnetic stripe on the card. CXCMD_ReadMagData pbyBuff Pointer to the memory location at which to store (int iSlot, int iID, the data read from the card. Data must be ASCII BYTE *pbyBuff, characters.
  • Page 23 SR200 & SR300 Printer SDK Guide Function Name Explanation pbyTrack2Buff Pointer to the data to write. Data must be ASCII characters. iTrack2DataLength Size of data in bytes in pbyTrack2Buff. ITrack3MagFormat Specify the magnetic stripe encoding format. 0x00 Do not write the track...
  • Page 24: Reading Function (For Iso)

    SR200 & SR300 Printer SDK Guide Reading Function (for ISO) Function Name Explanation 1 int CXCMD_ReadMagData Reads data from the 3-track (ISO) magnetic stripe on the (int iSlot, int iID, card. int iTrack1MagFormat, iTrack1MagFormat Specify the magnetic stripe encoding format.
  • Page 25: Smart Card (Ic) Function

    CXCMD_ICControl() is issued with iAction=0. ♦ If you use the printer driver, Entrust Software Plug-in for the SR200/SR300 printer, and smart card, the printer must be connected using a USB data cable. (Network connection is not supported for smart card.)
  • Page 26: Functions For Getting Information & Changing Settings

    SR200 & SR300 Printer SDK Guide Functions for Getting Information & Changing Settings The driver API provides the following functions: ♦ Inquiry Function ♦ Mode Sense Function ♦ Mode Select Function ♦ Log Sense Function ♦ Log Select Function These functions query the printer to obtain data.
  • Page 27: Mode Sense Function

    SR200 & SR300 Printer SDK Guide 71-78 Config Version (ASCII): Printer Configuration Version 79-86 Table Version (ASCII): Printer Table Version 87-95 Reserved If an option unit is not installed, the function returns the string ???? as the firmware version. Mode Sense Function...
  • Page 28 SR200 & SR300 Printer SDK Guide Ink Data (Page Code = 23H) Byte Page Code (0x23) Page Specific Parameter Length (0x26) Ink Code Reserved (MSB) Number of Sets of Ink Panels (LSB) Reserved Reserved Lot Number (ASCII) Only first 6 bytes are meaningful. The rest are filled with 0.
  • Page 29 SR200 & SR300 Printer SDK Guide Print Unit Data (Page Code=0x28) Byte Page Code (28H) Page Specific Parameter Length (0x3a) Reserved 2~3 (MSB) Basic Resolution X (012CH) (LSB) (MSB) Basic Resolution Y (012CH) (LSB) HR Temperature Control Reserved 10~11 (MSB)
  • Page 30 SR200 & SR300 Printer SDK Guide Byte Reserved Peel Wait Time Resin Black Level Resin Black Mode A0 Level A1 Level Buzzer Mode Power Save Mode Film Quantity Ink Quantity Card Quantity YMC Level Display Contrast Reserved (0xff) Display Mode...
  • Page 31 SR200 & SR300 Printer SDK Guide MG Peel Mode When MG Peel Mode is enabled, the retransfer film is peeled from the back side differently. The printer must have a mag stripe encoder and the card should use mag encoding if this setting is enabled.
  • Page 32 SR200 & SR300 Printer SDK Guide Power Save Mode The wait time to enable Power Save Mode, in minutes. 0 5(min) 1 10 2 15 3 20 4 25 5 30 6 45 7 60 8 Off Film Quantity Usable retransfer film quantity. The possible range is from 0 (None) to 10 (Full).
  • Page 33 SR200 & SR300 Printer SDK Guide Encode Unit Data (Page Code=0x2A) Byte Page Code (2AH) Page Specific Parameter Length (08H) ISO Mode JIS Mode 4 to 6 Reserved Read Write Retry Reserved Reserved ISO Mode Coercivity of ISO MG encoder.
  • Page 34 SR200 & SR300 Printer SDK Guide *In ”Film T Type” and ”Film B Type”, T (Top) references the lamination function on the top side of the card. B (Bottom) references the lamination function on the bottom side of the card.
  • Page 35 SR200 & SR300 Printer SDK Guide Film B Type The type of the lamination film on the bottom side. 0 Patch 1 Overlay NOTE: The LM300 laminator is designed to use same type of film in the top and bottom laminators. Using different types of film is not guaranteed.
  • Page 36 SR200 & SR300 Printer SDK Guide 47-62 IPv6 Address 63-79 Reserved Session Timeout The time interval to detect that the printer TCP session has been disconnected from the host PC. For best results, use 0. 0 Disabled 1 10 minutes...
  • Page 37: Mode Select Function

    SR200 & SR300 Printer SDK Guide Mode Select Function Function Name Explanation int CXCMD_ModeSelect Change printer settings by using Mode Select command. (int iSlot, int iID, Int iSp, int iPage, iSp Choose whether to save the setting in non-volatile memory.
  • Page 38 SR200 & SR300 Printer SDK Guide Print Unit Data (Page Code=0x28) Byte Page Code (0x28) Page Specific Parameter Length (0x1e) Reserved (0xff) Reserved (0xff) Heat Roller Temperature (Retransfer) Velocity (Retransfer) Velocity (Retransfer Back) Heat Roller Temperature (Card Fix) Velocity (Card Fix)
  • Page 39 SR200 & SR300 Printer SDK Guide Byte Reserved (0xff) Tips for Success • The contents of the Print Unit Data page are always kept in the EEPROM. If the setting is 0xff, it keeps the settings that are in the EEPROM. Other items are not changed.
  • Page 40 SR200 & SR300 Printer SDK Guide Buzzer Mode: Use 0 if the value for iSp is 0. 0 Enable Buzzer 1 Disable Buzzer Power Save Mode The wait time to enable Power Save Mode, in minutes. Use 0 if the value for iSp is 0.
  • Page 41 SR200 & SR300 Printer SDK Guide Encode Unit Data (Page Code=0x2a) Byte Page Code (0x2a) Page Specific Parameter Length (0x08) ISO Mode JIS Mode Reserved (0xFF) 4~6 Write Retry Reserved (0xFF) Reserved (0xFF) ISO Mode ISO (3-track) magnetic stripe encoder coercivity setting:...
  • Page 42 SR200 & SR300 Printer SDK Guide Laminator Unit Data (Page Code=0x2C) Byte Page Code (0x2c) Page Specific Parameter Length (0x16) Laminate Mode Film T Type Film T Position Heat Roller T Temp Laminate Speed Reserved (0xff) Laminate Cooling Time HR Control...
  • Page 43 SR200 & SR300 Printer SDK Guide Heat Roller T Temp The heat roller temperature for top-side lamination. Values specified here correspond to the following temperatures (degrees Centigrade). 0 90 1 95 2 100 3 105 4 110 5 115 6 120...
  • Page 44 SR200 & SR300 Printer SDK Guide Network Data (Page Code=0x2D) Byte Page Code (0x2d) Page Specific Parameter Length (0x4e) (MSB) IP Address (Binary) 2 to 5 (LSB) (MSB) Subnet Mask (Binary) 6 to 9 (LSB) (MSB) Default Gateway (Binary) 10 to 13...
  • Page 45 SR200 & SR300 Printer SDK Guide DHCP Whether DHCP is enabled. 0 Enabled 1 Disabled Host I/F The type of connection (interface) between the printer and PC. This programming interface supports only USB connection. 0 Ethernet 1 USB Printer Name The logical name of the printer. The remainder of the field is filled with 0 when the printer name contains fewer than 10 characters.
  • Page 46 SR200 & SR300 Printer SDK Guide Print Information Data (Page Code=0x2b) Byte Page Code (0x2b) Page Specific Parameter Length (0x16) Heat Roller Temperature (Retransfer) Velocity (Retransfer Front) Velocity (Retransfer Back) Heat Roller Temperature (Card Fix) Velocity (Card Fix) Peel Wait Time...
  • Page 47 SR200 & SR300 Printer SDK Guide Velocity for Card Fix From 0 (Slow) to 4 (Fast). Peel off Wait Time Wait time in seconds before peel. Not used. MG Peel Mode When MG Peel Mode is enabled, the retransfer film is peeled from the back side differently.
  • Page 48: Log Sense Function

    SR200 & SR300 Printer SDK Guide Log Sense Function Function Name Explanation int CXCMD_ LogSense Get Log Sense Data from printer. (int iSlot, int iID, iPage Choose Log Sense data. int iPage, 0x38 Medium Quantity page BYTE *pbyBuffer) 0x39 Miscellaneous page...
  • Page 49 SR200 & SR300 Printer SDK Guide Byte (MSB) Parameter Code (0x0002) (LSB) Parameter Length (0x04) (MSB) Head count (Number of panels printed. Each pass for a color adds 1 to this count.) (LSB) (MSB) Parameter Code (0x0003) (LSB) Parameter Length (0x0004)
  • Page 50 SR200 & SR300 Printer SDK Guide Log Sense Data Format (Miscellaneous Page: Page Code=0x39) Byte Reserved Page Code (0x39) Reserved (MSB) Page Length (0x0048) (LSB) (MSB) Parameter Code (0000H) (LSB) Parameter Length (0004H) (MSB) NG count The number of cards discharged to the NG or reject slot, since last reset.
  • Page 51 SR200 & SR300 Printer SDK Guide Byte Parameter Length (0004H) Printer Status Printer Error Status (Sense Key) Printer Error Status (Additional Sense Code) Printer Error Status (Additional Sense Qualifier) (MSB) Parameter Code (0x0004) (LSB) 0x00 Parameter Length (0x0004) (MSB) Unresetable Retransfer HR Power On Time...
  • Page 52 SR200 & SR300 Printer SDK Guide Printer Status Reports the current status of the printer, for display to the operator, which can be: 0 Ready 1 Initializing 3 Offline (such as in setting mode) 7 Preheating 51 Loading a card...
  • Page 53 SR200 & SR300 Printer SDK Guide 0x54: Lower film out of supply 0x55 Cannot detect upper film (No film or broken) 0x56 Cannot detect lower film (No film or broken) 0x57 Cannot detect upper film mark 0x58 Cannot detect lower film mark...
  • Page 54 SR200 & SR300 Printer SDK Guide Laminator Counters Page (Page Code = 0x3A) Byte Reserved Page Code (0x3a) Reserved (MSB) Page Length (0x0040) (LSB) (MSB) Parameter Code (0x0000) (LSB) 0x00 Parameter Length (0x0004) (MSB) Total Count (The total number of issued cards. This number cannot be reset.)
  • Page 55 SR200 & SR300 Printer SDK Guide Byte (MSB) Parameter Code (0x0003) (LSB) 0x00 Parameter Length (0x0004) (MSB) Resetable Heat Roller B Power On Time (Total Power On Time for Bottom Heat Roller) (LSB) (MSB) Parameter Code (0x0004) (LSB) 0x00 Parameter Length (0x0004)
  • Page 56: Log Select Function

    SR200 & SR300 Printer SDK Guide Byte (MSB) Parameter Code (0x0007) (LSB) 0x00 Parameter Length (0x0002) (MSB) Heat Roller B Current Temperature (Current Temperature of Bottom Heat Roller) (LSB) 64 to 75 Reserved Log Select Function Function Name Explanation int CXCMD_ LogSelect Reset both the Free Count and Error Count of the printer.
  • Page 57: How To Encode With The Printer Driver

    SR200 & SR300 Printer SDK Guide How to Encode with the Printer Driver Encoding includes magnetic stripe encoding and smart card (IC) encoding. The printer driver provides two methods for encoding data. They are: ♦ Inline Encoding ♦ Encoding with ExtEscape()
  • Page 58 SR200 & SR300 Printer SDK Guide *Max Length shows the maximum number of characters to encode using that method and format. Tips for success: ♦ The Printer Driver Printing Preferences setting for encoding must be enabled. ♦ The prefix and text must be successive (with no characters or spaces between) and they must be formatted with the same font.
  • Page 59: Encoding With Extescape()

    SR200 & SR300 Printer SDK Guide Encoding with ExtEscape() You can pass the encoding data to the printer driver by using the ExtEscape() function of WIN32 API. ExtEscape() Function int ExtEscape ( // handle to the device context. nEscape // Escape ID...
  • Page 60: Smart Card (Ic) Programming

    ♦ PDR22IC1.DLL for Contact IC encoding using the printer internal Network † connection † Installed with the Entrust Software SR200/SR300 Printer Plug-in. Sample IC Encode Functionality int stdcall Encode ( LPINT lpiPrinterAdr // pointer to the printer address LPINT...
  • Page 61 SR200 & SR300 Printer SDK Guide Negative, or value different from those listed here The printer driver displays an error. After the operator responds, any additional processing is based on the operator’s response. Tips for success ♦ If you encode or program smart cards, the PC can have only one instance (copy) of the printer driver installed.
  • Page 62: How To Override Driver Settings

    SR200 & SR300 Printer SDK Guide How to Override Driver Settings You can override settings in the printer driver using the Win32 ExtEscape() function. Tips for success ♦ You must call ExtEscape() function after StartDoc() and before StartPage() when you change settings.
  • Page 63: Get The Current Setting

    SR200 & SR300 Printer SDK Guide cbResult when successful Name Error Code Reserved Length in byte Value 0x00 Not defined cbResult when not successful Name Error Code Error Code-A Error Code-B Length in byte Value 0x00 1* See Errors returned on page...
  • Page 64: Programming Sample

    SR200 & SR300 Printer SDK Guide Programming Sample Change the “Number of copies” to 100 escape_id; unsigned short id, size; unsigned long data; unsigned char in[9], out[5]; ret; unsigned short error_code; escape_id = 9100; id = 257; size = 4; data = 100;...
  • Page 65 SR200 & SR300 Printer SDK Guide Refer to the “Number of copies” setting escape_id; unsigned short id, size; unsigned long data; unsigned char in[3], out[9]; ret; unsigned short error_code; escape_id = 9100; id = 257; in[0] = 'G'; in[1] = (unsigned char)((id >> 8) & 0xFF);...
  • Page 66: Cbparameter Values

    SR200 & SR300 Printer SDK Guide cbParameter Values All values must be set with Big Endian. Item Name Size Data Explanation Number of copies 0x0101 0x0004 0x00000001 The value must be from 1 to 999. 0x000003E7 Card Load/Eject 0x0103 0x0004 0x00000000 Do not turn the card.
  • Page 67: Errors Returned

    SR200 & SR300 Printer SDK Guide Item Name Size Data Explanation 0x00000011 Print black text of back side with K and print its background with YMC. 0x00000020 Print black color of back side with K ink. 0x00000021 Print black color of back side with K and print its background with YMC.
  • Page 68: Appendix A: Api Error Codes

    SR200 & SR300 Printer SDK Guide Appendix A: API Error Codes This appendix lists errors returned by the printer driver API. It includes: ♦ Error Format ♦ Driver Errors (0x02xxxxxx) ♦ Other Errors (0x09xxxxxx) Error Format This section shows the format of errors that the API returns.
  • Page 69: Driver Errors (0X02Xxxxxx)

    SR200 & SR300 Printer SDK Guide Driver Errors (0x02xxxxxx) Bit 31-24 Bit 23-16 Bit 15-0 Explanation (0x02) 0x02 Not enough memory 0x02 The Port Manager is busy, and the command cannot be accepted. 0x02 Command was aborted. 0x02 Time out.
  • Page 70: Appendix B: Magnetic Stripe Data

    SR200 & SR300 Printer SDK Guide Appendix B: Magnetic Stripe Data This section contains: ♦ 4-bit data ♦ Codes for 4-unit (bit) data ♦ 6-bit data ♦ Codes for 6-unit data ♦ 7-bit data ♦ Codes for 7-unit data 4-bit data...
  • Page 71 SR200 & SR300 Printer SDK Guide 6-bit data 6 unit code b2 b1 “ & ‘ < > Codes for 6-unit data Meaning Character Start Code (Sentinel) End Code (Sentinel) Separate Code ! “ & ‘ * + , : ; < = > @ [ \ ] _ Code for hardware control Do not use the End Code as magnetic stripe data.
  • Page 72 SR200 & SR300 Printer SDK Guide 7-bit data 7 unit code b7 0 b6 0 b5 0 b4 b3 b2 b1 “ & ‘ < > Codes for 7-unit data Meaning Character Start Code 0x7f (DEL) End Code 0x7f (DEL) Separate Code ! “...
  • Page 73: Appendix C: Card Printer Error Codes

    SR200 & SR300 Printer SDK Guide Appendix C: Card Printer Error Codes Error Code Name Contents No card There is no card, or the card hopper tray is not closed. Door Open Printer door is open or cleaning roller is not attached.
  • Page 74 SR200 & SR300 Printer SDK Guide Error Code Name Content Jam(Hopper) The card does not arrive at the card supply sensor within a predefined time. Jam(TurnOver) The card does not arrive at the sensor inside the turnover unit within a predefined time.
  • Page 75 SR200 & SR300 Printer SDK Guide Error Code Name Content MG Hardware A hardware error occurred in the magnetic stripe unit. EXT2. Communicate A communication error occurred during the laminator firmware update. Heater Cam The heater cam is out of order.
  • Page 76 SR200 & SR300 Printer SDK Guide Error Code Name Contents Invalid Command The content of the command is not valid. Operation Code Operation Code in CDB is not valid. Illegal Field in CDB The content of the command is not valid.
  • Page 77 SR200 & SR300 Printer SDK Guide Page 72...

This manual is also suitable for:

Sr300

Table of Contents