Star 39652190 User Manual

Star JavaPOS Driver

for mCollection

- Software Manual -

Rev. 1.0

Contents

1. Getting Started.............................................................................................

3

2. Operating Environment..............................................................................

4

2.1

Operating System........................................................................................................

4

2.2

Java Operation Environment.....................................................................................

4

2.3

Supported Models.......................................................................................................

5

3. Installation....................................................................................................

6

4. JavaPOS Driver Settings.............................................................................

7

4.1

Common Settings........................................................................................................

8

4.2

POS Printer Connection Settings............................................................................

11

4.3

CashDrawer Connection Settings...........................................................................

12

5. Sample Program.........................................................................................

13

6. Service Objects...........................................................................................

17

6.1

POS Printer..................................................................................................................

17

6.2

Cash Drawer................................................................................................................

24

7. Version History...........................................................................................

26

Notice

Windows is a registered trademark of Microsoft Corporation.

Mac, MacOS, MacBook, iMac are trademarks of Apple Inc., registered in the U.S. and other countries.

The Bluetooth® word mark and logos are registered trademarks owned by the Bluetooth SIG, Inc.

Company and product names are trademarks or registered trademarks of their respective companies.

Reproduction of any part of this documentation is prohibited.

The contents of this documentation are subject to change without notice.

We can assume no responsibility for any results which may come out of the usage instructed in this documentation.

©2018 Star Micronics Co., Ltd.

Star JavaPOS Driver Software Manual

1. Getting Started

Star JavaPOS driver offers full compliance with the JavaPOS Ver. 1.13.

This manual supports the following Star JavaPOS driver packages.

starjavapos_mCollection_1.13.x*_windows_32bit.zip

starjavapos_mCollection_1.13.x*_windows_64bit.zip

starjavapos_mCollection_1.13.x*_linux_32bit.zip

starjavapos_mCollection_1.13.x*_linux_64bit.zip

▪starjavapos_mCollection_1.13.x*_mac.zip

* x : Version No.

This manual describes the setup procedures, specifications, and limitations of the Star JavaPOS driver, which is used to run Star mCollection printers and peripheral devices.

This manual is intended for developers who design application systems that use JavaPOS devices. The manual assumes that the reader is familiar with the following topics.

General specifications of the JavaPOS 1.13.

General specifications of the Star POS Printers.

Java terminology and architecture.

The host operating system.

Target Model and Firmware Versions

 

 

Target Model

Printer F/W

 

 

 

 

MCP31LB, MCP31L

Ver 1.0 or later

 

 

 

 

MCP20, MCP20B

Ver 1.0 or later

 

 

 

 

 

MCP21LB

Ver 1.0 or later

 

 

 

 

 

POP10

Ver 1.0 or later

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

- 3 -

Star JavaPOS Driver Software Manual

2.Operating Environment

2.1Operating System

This software supports the following operating systems.

Windows 10* 32-bit and 64-bit (except Windows 10 Mobile and Windows 10 IoT Core) Windows 8.1* 32-bit and 64-bit (except Windows RT 8.1)

Windows 8 * 32-bit and 64-bit (except Windows RT) Windows 7 32-bit and 64-bit

*Limitation for Windows 8/8.1/10

-Windows UI (Modern UI) do not support.

Linux 32-bit and 64-bit*

-Red Hat Enterprise Linux

-openSUSE

-Fedora

-ubuntu

-CentOS

*The latest evaluation environment, please check the readme_en.txt .

macOS 10.13 macOS 10.12 Mac OS X 10.11 Mac OS X 10.9

2.2Java Operation Environment

This driver is compatible with Java Runtime Environment (JRE) Ver. 1.4.2 and later, but we recommend that you use Java Runtime Environment (JRE) Ver. 1.5 or later.

On Windows OS, set the PATH variable if you want to be able to conveniently run the JDK executables (javac. exe, java.exe, javadoc.exe, etc.) from any directory without having to type the full path of the command. To set the PATH permanently, add the full path of the following directory to the PATH variable.

<JDK installation directory>\bin

Example: C:\Program Files\Java\jdk1.6.0_18\bin

- 4 -

Star JavaPOS Driver Software Manual

2.3 Supported Models

The driver supports the operating systems and interfaces listed below.

Models

Linux OS

Windows OS

Mac OS

 

 

 

 

MCP31LB (MCP31)

USB / Ethernet / Bluetooth*1

USB / Ethernet / Bluetooth*1

USB / Ethernet / Bluetooth*1

 

 

 

 

MCP31L (MCP31)

USB / Ethernet

USB / Ethernet

USB / Ethernet

 

 

 

 

MCP20 (MCP20)

USB / Ethernet

USB / Ethernet

Ethernet

 

 

 

 

MCP20B (MCP20)

USB / Ethernet / Bluetooth*1

USB / Ethernet / Bluetooth*1

Ethernet / Bluetooth*1

 

 

 

 

MCP21LB (MCP21)

USB / Ethernet / Bluetooth*1

USB / Ethernet / Bluetooth*1

USB / Ethernet / Bluetooth*1

 

 

 

 

POP10

USB / Bluetooth*1

USB / Bluetooth*1

USB / Bluetooth*1

 

 

 

 

*1 The communication of Bluetooth interface is "SPP".

- 5 -

Star JavaPOS Driver Software Manual

3. Installation

Install the 32-bit or 64-bit driver, whichever is appropriate for your Java runtime environment.

1.Uncompress this package.

2.Files which are existed in unzipped package is able to put on a particular place.

Files : “class libraries(jar file)”

“file of JavaPOS driver settings (jpos.xml)”]

“files which are related to test application(java , gif, dll file(Windows), dylib file(Mac))”

*If do not need to put on particular place, be able to place files at same package)

*Library file(dll, dylib) needs to put on a folder which exists test application or a folder which is added path environment.

ex. Particular place :

<Windows>

jar file - “C:\Program Files\JavaPOS\lib”

xml, java, gif, dll - “C:\Program Files\JavaPOS\bin”

<Linux> <Mac>

jar file - “/usr/local/javapos/lib”

xml, java, gif, dylib(Mac) - “/usr/local/javapos/bin”

* (Only Linux) Need to install StarIO. Run “install.sh” which is in “StarIOPort_Install_x32(64)” folder of the unzipped package by administrator authority. Refer to readme.txt for detail.

On 64-bit operating systems, you can use either the 32-bit or the 64-bit Java runtime environment. Install the appropriate version of the Star JavaPOS driver for your Java runtime environment.

Example :

When using the 32-bit Java runtime environment on a 32-bit OS: When using the 32-bit Java runtime environment on a 64-bit OS: When using the 64-bit Java runtime environment on a 64-bit OS:

Use the 32-bit driver. Use the 32-bit driver. Use the 64-bit driver.

- 6 -

Star 39652190 User Manual

Star JavaPOS Driver Software Manual

4. JavaPOS Driver Settings

The Star JavaPOS Driver uses the JCL - Java Configuration Loader system for configuring the provided services. The file jpos.xml contained in this package has been prepared with device entries for Star's printer products.

Refer to the followings and adjust jpos.xml to fit the environment of use. The following is a setting example of MCP31POSPrinter and CashDrawer.

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE JposEntries PUBLIC "-//JavaPOS//DTD//EN" "jpos/res/jcl.dtd"> <JposEntries>

<JposEntry logicalName="POSPrinter_windows_Bluetooth">

<creation factoryClass="com.starmicronics.starjavapos.ServiceInstanceFactory" serviceClass="com.starmicronics.starjavapos.POSPrinterService" />

<vendor name="Star Micronics" url="www.star-m.jp/eng/index.htm" /> <jpos category="POSPrinter" version="1.13" />

<product description="Star receipt printer"> name="Star Micronics POSPrinter controller" url="www.star-m.jp/eng/index.htm" />

<prop name="model" type="String" value="MCP31" />

... 1

<prop name="portName" type="String" value="BT:COM10" />

... 2

<prop name="portSettings" type="String" value="" />

... 3

<prop name="ioTimeoutMillis" type="Integer" value="5000" />

... 4

</JposEntry>

<JposEntry logicalName="CashDrawer_Windows_Bluetooth">

<creation factoryClass="com.starmicronics.starjavapos.ServiceInstanceFactory" serviceClass="com.starmicronics.starjavapos.CashDrawerService" />

<vendor name="Star Micronics" url="www.star-m.jp/eng/index.htm" /> <jpos category="CashDrawer" version="1.13" />

<product description="Printer controlled cash drawer" name="Star Micronics cash drawer controller" url="www.star-m.jp/eng/index.htm" />

<prop name="portName" type="String" value="BT:COM10" /> <prop name="portSettings" type="String" value="" />

<prop name="capStatus" type="Boolean" value="True" />

<prop name="signalLevelHighWhenDrawerOpen" type="Boolean" value="True" />

</JposEntry>

</JposEntries>

- 7 -

Star JavaPOS Driver Software Manual

4.1 Common Settings

Enter the following settings according to the connection method of your device.

Model Name Setting ... 1

ex. <prop name="model" type="String" value="MCP31" />

Please input the appropriate model name which you would like to use.

Supported model names are as following.

MCP31, MCP20, MCP21, POP10

Note: You do not have to enter this property on cash drawer devices.

Port Name / Port Settings ... 2

ex. <prop name="portName" type="String" value="usbprn:Star MCP31" /> <prop name="portSettings" type="String" value="" />

Enter the printer's port name and port settings that are appropriate for your operating system and interface.

USB - Printer Class

[portName]

Two different port name parameter forms are accepted.

1.Do not specify the port name

2.Specifying USB serial number *Windows not supported

The "1." is useful when you are using only one printer and your printer does not have a USB serial number set (which is the default setting). The "2." is useful when you are using multiple printers.

1. Do not specify the port name

<Windows>

The port name parameter is formed by combining "usbprn:" with your printer's Windows printer queue name. For the sample program attached, the printer queue name was created with 1 byte character however, two byte characters also can be used.

For example, when you want to specify a Windows queue name as "Star MCP31", you may create it as:

"usbprn:Star MCP31"

<Linux> <Mac>

The port name parameter is formed by combining "usbprn:" with your printer's model name. For example, when you want to specify a model name as "MCP31", you may create it as:

"usbprn:MCP31"

- 8 -

Star JavaPOS Driver Software Manual

2. Specifying USB serial number * Windows not supported.

"usbprn:XXXXXXXX"

"usbprn:" causes StarIO to open the printer with the serial number you've specified. This is useful in two scenarios:

·To avoid new ports being created when the printer is connected to the computer's different USB ports.

·When you have multiple printers connected simultaneously, your printer can be identified.

Note: Star's printers do not have USB serial numbers configured from the factory default. You will have to write a serial number into the device in order to use this functionality.

[portSettings]

The port settings parameter must be an empty string.

Ethernet

[portName]

The port name parameter is formed by combining "TCP:" with your printer's IP address.

For example, if your printer is established on the 192.168.1.102 address then you would pass

"tcp:192.168.1.102"

[portSettings]

The port settings parameter must be an empty string.

- 9 -

Loading...
+ 18 hidden pages