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.
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.
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...
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...
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...
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.
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.
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...
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...
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 -...
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.
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.
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.
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.
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...
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();...
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.
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.
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...
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.
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.
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...
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...
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...
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 ->...
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;...
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.
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...
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...
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;...
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...
Need help?
Do you have a question about the SPP-R210 and is the answer not in the manual?
Questions and answers