BIXOLON SPP-R210 Reference Manual
BIXOLON SPP-R210 Reference Manual

BIXOLON SPP-R210 Reference Manual

Mobile printer
Hide thumbs Also See for SPP-R210:

Advertisement

Windows Phone SDK API
Reference Guide
Mobile Printer
Rev. 1.00
SPP-R210
SPP-R200II
SPP-R300
SPP-R400
http://www.bixolon.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SPP-R210 and is the answer not in the manual?

Questions and answers

Summary of Contents for BIXOLON SPP-R210

  • Page 1 Windows Phone SDK API Reference Guide Mobile Printer SPP-R210 Rev. 1.00 SPP-R200II SPP-R300 SPP-R400 http://www.bixolon.com...
  • Page 2: Table Of Contents

    Mobile Printer ■ Contents 1. About This Guide ......................3 1-1 Supported O/S & Platform ..................3 2. Property .......................... 4 2-1 CharacterSet (LONG R/W) ..................4 2-2 International CharacterSet (LONG R/W) ..............5 2-3 State (LONG R) ......................6 2-4 PowerValue (LONG R) ....................
  • Page 3: About This Guide

    This SDK Reference Guide documents the information about the dll files required for the development of applications for Windows OS. At Bixolon, we continually strive to improve the performance and quality of our products. As a result, their specifications and user guides are subject to change without prior notice.
  • Page 4: Property

    Mobile Printer 2. Property The constant values used by the dll files provided are declared in BxlConst.cs. The development environment is C#. 2-1 CharacterSet (LONG R/W) The attribute which defines the printer's code page is set to BXL_CS_437 by default. Use SetCharacterSet(), GetCharacterSet() to set new values or load the preset values.
  • Page 5: International Characterset (Long R/W)

    Mobile Printer 2-2 International CharacterSet (LONG R/W) The attribute which defines the printer's International character Set is set to BXL_ICS_USA by default. Use SetInterCharSet(), GetInterCharSet() to set new values or load the preset values. The following International Character Set can be used: Code Value Description...
  • Page 6: State (Long R)

    Mobile Printer 2-3 State (LONG R) This attribute sets the printer's state. It is read only and the printer's state can be verified and read by calling CheckPrinterStatusAsync. More than one State value can be set and each value can be checked through bitwise operations. The following values represent the printer's state: Code Value...
  • Page 7: Powervalue (Long R)

    Mobile Printer 2-4 PowerValue (LONG R) This attribute sets the printer's battery status. It is read only and set each time the battery status changes. The value can be read using CheckPowerAsync. The following values represent the battery status: Code Value Description BXL_PWR_FULL...
  • Page 8: Method

    Mobile Printer 3. Method The development environment is C#. 3-1 ConnectToPrinterAsync This function sets the connection to enable communication with the printer. async Task<Int32> ConnectToPrinterAsync(string inputAddr) [Parameters] * inputAddr This is [in] string Data. When connecting via Bluetooth interface, the MAC address of a device that is paired to a Windows phone is received while the IP address and port no.
  • Page 9: Closeprinter

    Mobile Printer 3-2 ClosePrinter This function terminates the connection with the printer. The printing and MSR-related features will no longer be available to use. void ClosePrinter(); [Parameters] None [Return Values] None * Example BxlWinPhoneSDK bxlPrinter = new BxlWinPhoneSDK(); …… bxlPrinter.ClosePrinter(); Rev.
  • Page 10: Linefeed

    Mobile Printer 3-3 LineFeed This function performs line feeding to the extent of the integer value conveyed as a factor. Int32 LineFeed (Int32 nFeed); [Parameters] * nFeed [in] The number of lines fed in integer values is delivered as a factor. [Return Values] Code Value...
  • Page 11: Printbarcode

    Mobile Printer 3-4 PrintBarcode This function supports one-dimensional and two-dimensional barcode printing. async Task<Int32> PrintBarcode( byte[] data, Int32 barcodeType, Int32 height, Int32 width, Int32 alignment, Int32 textPosition) async Task<Int32> PrintBarcode( string data, Int32 barcodeType, Int32 height, Int32 width, Int32 alignment, Int32 textPosition) [Parameters] * Data [in] This is byte array or string data which sends barcode data to print.
  • Page 12 Mobile Printer * TextPosition [in] This value sets the position of the barcode data. Two-dimensional barcodes only have the BXL_BC_TEXT_NONE value. Code Value Description BXL_BC_TEXT_NONE Do not print barcode data. BXL_BC_TEXT_ABOVE Print barcode data above the barcode. BXL_BC_TEXT_BELOW Print barcode data below the barcode. [Return Values] Code Value...
  • Page 13: Printtext

    Mobile Printer 3-5 PrintText This function supports text printing. long PrintText(byte[] writeData, Int32 alignment, Int32 attribute, Int32 textSize); long PrintText(string writeData, Int32 alignment, Int32 attribute, Int32 textSize); [Parameters] * writeData [in] This Unicode Data is terminated with null character and sends the barcode data to print.
  • Page 14 Value Description BXL_SUCCESS Returns when the function succeeds. BXL_STATUS_ERROR -103 Unable to print. BXL_WRITE_ERROR -300 Data transmission failed. * Example BxlWinPhoneSDK bxlPrinter = new BxlWinPhoneSDK(); …… bxlPrinter.PrintText("Bixolon Mobile Printer.\n", BXL_ALIGNMENT_LEFT, BXL_FT_DEFAULT, BXL_TS_0WIDTH | BXL_TS_0HEIGHT); …… Rev. 1.00 - 14 -...
  • Page 15: Printimage

    Mobile Printer 3-6 PrintImage This function prints image files. Supported formats vary with different platforms. async Task<Int32> PrintImage (string fileName, Int32 Width, Int32 Alignment, Int32 Level); [Parameters] * fileName [in] This is the string for the entire path of an image file. JPG, BMP and GIF are supported.
  • Page 16: Checkprinterstatusasync

    Mobile Printer 3-7 CheckPrinterStatusAsync This function checks the printer status (cover open, paper tray empty) and returns the status value. async Task<Int32> CheckPrinterStatusAsync(); [Parameters] None [Return Values] Code Value Description BXL_SUCCESS Returns when the function succeeds. BXL_STATUS_ERROR -103 Unable to print. BXL_READ_ERROR -301 Data reception failed.
  • Page 17: Initializeprinter

    Mobile Printer 3-8 InitializePrinter This function resets the current settings to the default values which are set when powered Int32 InitializePrinter(); [Parameters] None [Return Values] Code Value Description BXL_SUCCESS Returns when the function succeeds. BXL_STATUS_ERROR -103 Unable to print. BXL_WRITE_ERROR -300 Data transmission failed.
  • Page 18: Directioasync

    Mobile Printer 3-9 DirectIOAsync This function can send and read user-defined data. async Task<byte[]> DirectIOAsync (byte[] writeData, UInt32 readLen); [Parameters] * byte[] writeData, [in] This is the data to be sent to the printer. * UInt32 readLen [in] The caller receives the size of the data to be read. [Return Values] The read data is returned if readLen is 1 or higher, otherwise, it returns null.
  • Page 19: Msrreadready

    Mobile Printer 3-10 MSRReadReady This function switches the printer to the MSR Ready mode. The printing is disabled in the MSR Ready mode. When BXL_SUCCESS is returned, the printer is considered in standby mode. async Task<Int32> MSRReadReadyAsync(); [Parameters] None [Return Values] Code Value Description...
  • Page 20: Msrreadcancel

    Mobile Printer 3-11 MSRReadCancel This function deactivates the MSR Ready mode. async Task<Int32> MSRReadCancel(); [Parameters] None [Return Values] Code Value Description BXL_SUCCESS Returns when the function succeeds. BXL_WRITE_ERROR -300 Data transmission failed. BXL_MSR_NOTREADY -602 The printer is not in the MSR READY mode. * Example BxlWinPhoneSDK bxlPrinter = new BxlWinPhoneSDK();...
  • Page 21: Msrreadtrack

    Mobile Printer 3-12 MSRReadTrack This function retrieves the MSR data. If the MSR is in the Read Mode and BXL_MSR_DATAEMPTY is returned, it means the card has not been read by the MSR. In this case, scan the card with the MSR or use MSRReadCancel to deactivate the Read Mode.
  • Page 22: Msrreadfulltrack

    Mobile Printer 3-13 MSRReadFullTrack This function returns the entire MSR data. It returns error if it is not in the MSR Read Mode or no data is found. Use MSRReadCancel to deactivate the Read Mode. Int32 MSRReadFullTrack (ref byte[] msrData, Int32 dataLen); [Parameters] * ref byte[] msrData [in, out] Retrieves MSR Track Data to the buffer defined by the caller.
  • Page 23: Selectlabelmode

    Mobile Printer 3-14 SelectLabelMode This function selects the Label/Receipt Mode. Int32 SelectLabelMode(bool enable) [Parameters] * bool enable [in] Sends whether the Label Mode is used or not. If the value is TRUE, the Label Mode is selected. [Return Values] Code Value Description BXL_SUCCESS...
  • Page 24: Nextposition

    Mobile Printer 3-15 NextPosition This function feeds the paper to the next printing position and is only active when it is in the Label Mode. Int32 NextPosition(); [Parameters] None [Return Values] Code Value Description BXL_SUCCESS Returns when the function succeeds. BXL_STATUS_ERROR -103 Unable to print.
  • Page 25: Autocalibration

    Mobile Printer 3-16 AutoCalibration This function performs Auto Calibration if the printer is in the Label Mode. Int32 AutoCalibration() [Parameters] None [Return Values] Code Value Description BXL_SUCCESS Returns when the function succeeds. BXL_STATUS_ERROR -103 Unable to print. BXL_NOT_ SUPPORT -107 The printer is not in the Label Mode.
  • Page 26: Selectpagemode

    Mobile Printer 3-17 SelectPageMode This function selects whether to use the Page Mode. Int32 SelectPageMode(BOOL enable) [Parameters] * BOOL enable [in] Sends whether to use the Page Mode. If the value is TRUE, the Page Mode is selected. [Return Values] Code Value Description...
  • Page 27: Formfeed

    Mobile Printer 3-18 FormFeed This function prints all the data when it is in the Page Mode. After the printer finishes printing, it goes into the Standard Mode. Int32 FormFeed(Int32 feedCount) [Parameters] * long nFeed [in] The amount to be fed. [Return Values] Code Value...
  • Page 28: Setprintareainpm

    Mobile Printer 3-19 SetPrintAreaInPM This function sets the size and position of the printing area when it is in the Page Mode. Int32 SetPrintAreaInPM (Int32 x, Int32 y, Int32 width, Int32 height) [Parameters] * Int32 x [in] x-coordinate of the printing area * Int32 y [in] y-coordinate of the printing area * Int32 width...
  • Page 29: Setprintdirectioninpm

    Mobile Printer 3-20 SetPrintDirectionInPM This function sets the direction of printing when it is in the Page Mode. Int32 SetPrintDirectionInPM (Int32 direction) [Parameters] * Int32 direction Printing Starting printDirection Value Rotation Direction Position BXL_PD_LEFT_TO_RIGHT Left -> Right Top left 0 degree BXL_PD_BOTTOM_TO_TOP Bottom ->...
  • Page 30: Setverticalpositioninpm

    * Example BxlWinPhoneSDK bxlPrinter = new BxlWinPhoneSDK(); …… // Select Page Mode if (bxlPrinter.SelectPageMode(true) != BXL_SUCCESS) return; bxlPrinter.SetPrintAreaInPM(0, 0, 416, 416); bxlPrinter.SetPrintDirectionInPM(BXL_PD_LEFT_TO_RIGHT); bxlPrinter.SetVerticalPositionInPM(160); bxlPrinter.SetHorizontalPositionInPM(40); bxlPrinter.PrintText(“Bixolon Mobile Printer.”, 0, BXL_FT_DEFAULT, BXL_TS_0WIDTH | BXL_TS_0HEIGHT); …… bxlPrinter.PrintDataInPM(); bxlPrinter.FormFeed(2); Rev. 1.00 - 30 -...
  • Page 31: Sethorizontalpositioninpm

    * Example BxlWinPhoneSDK bxlPrinter = new BxlWinPhoneSDK(); …… // Select Page Mode if (bxlPrinter.SelectPageMode(true) != BXL_SUCCESS) return; bxlPrinter.SetPrintAreaInPM(0, 0, 416, 416); bxlPrinter.SetPrintDirectionInPM(BXL_PD_LEFT_TO_RIGHT); bxlPrinter.SetVerticalPositionInPM(160); bxlPrinter.SetHorizontalPositionInPM(40); bxlPrinter.PrintText(“Bixolon Mobile Printer.”, 0, BXL_FT_DEFAULT, BXL_TS_0WIDTH | BXL_TS_0HEIGHT); …… bxlPrinter.PrintDataInPM(); bxlPrinter.FormFeed(2); Rev. 1.00 - 31 -...
  • Page 32: Printdatainpm

    * Example BxlWinPhoneSDK bxlPrinter = new BxlWinPhoneSDK(); …… // Select Page Mode if (bxlPrinter.SelectPageMode(true) != BXL_SUCCESS) return; bxlPrinter.SetPrintAreaInPM(0, 0, 416, 416); bxlPrinter.SetPrintDirectionInPM(BXL_PD_LEFT_TO_RIGHT); bxlPrinter.SetVerticalPositionInPM(160); bxlPrinter.SetHorizontalPositionInPM(40); bxlPrinter.PrintText(“Bixolon Mobile Printer.”, 0, BXL_FT_DEFAULT, BXL_TS_0WIDTH | BXL_TS_0HEIGHT); …… bxlPrinter.PrintDataInPM(); bxlPrinter.FormFeed(2); Rev. 1.00 - 32 -...
  • Page 33: Scrpowerup

    Mobile Printer 3-24 ScrPowerUp This function turns on the SCR and retrieves the ATR (Answer To Reset) data and is only available to use with SPP-R210 SCR. async Task<SCRData> ScrPowerUp (); [Parameters] None [Return Values] * SCRData class class SCRData public byte[] ATR { get;...
  • Page 34: Scrpowerdown

    Mobile Printer 3-25 ScrPowerDown This function turns off the SCR and is only available to use with SPP-R210 SCR. async Task<byte> ScrPowerDown (); [Parameters] None [Return Values] * ResponseS [out] If the value is 0x00, it means that the SCR is successfully powered down, otherwise, it fails.
  • Page 35: Scroperationmode

    Mobile Printer 3-26 ScrOperationMode This function sets the operating mode and is only available to use with SPP-R210 SCR. async Task<byte> ScrOperationMode (uint mode); [Parameters] * UINT mode [in] Operating mode. Code Value Description BXL_SCR_MODE_APDU APDU mode BXL_SCR_MODE_TPDU TPDU mode...
  • Page 36: Screxchangeapdu

    Mobile Printer 3-27 ScrExchangeAPDU This function performs APDU/TPDU data communication and is only available to use with SPP-R210 SCR. async Task<SCRData> ScrExchangeAPDU (byte[] cmdAPDU, uint cmdAPDULen); [Parameters] * byte[] cmdAPDU [in] Command APDU data * UINT cmdAPDULen [in] Command APDU length...
  • Page 37: Scrcheckstatus

    Mobile Printer 3-28 ScrCheckStatus This function checks the status of the smart card and is only available to use with SPP- R210 SCR. async Task<SCRStatus> ScrCheckStatus (); [Parameters] None [Return Values] * SCRStatus class class SCRStatus public byte status { get; set; } public byte ResponseS { get;...
  • Page 38: Scrselectcard

    Mobile Printer 3-29 ScrSelectCard This function selects the communication with Smart card, SAM1 or SAM2 and is only available to use with SPP-R210 SCR. async Task<byte> ScrSelectCard (uint card); [Parameters] * UINT card [in] smart card for communication Code Value...

This manual is also suitable for:

Spp-r200iiSpp-r400Spp-r300

Table of Contents