Skip to content

connect

Overloads

Name Description
connect(SIISLP800Printer printer) Starts a connection to the printer using the specified printer information.
connect(String address) Starts a connection to the printer using the specified address.
connect(String address, boolean secure) Starts a connection to the printer using the specified address, with optional secure mode for Bluetooth.

connect(SIISLP800Printer printer)

Description

Starts a connection to the printer using the specified printer information.
Call this method before using other SIISLP800PrinterManager methods.

Syntax

public void connect(SIISLP800Printer printer) throws SIISLP800PrinterException

Parameter

printer

The SIISLP800Printer instance retrieved from getFoundPrinter().

Note

  • A concurrent connection from multiple apps to one printer is not supported.

connect(String address)

Description

Starts a connection to the printer using the specified address.
The method connects to a Bluetooth printer when a Bluetooth device address is supplied, and to a USB printer when a USB device path is supplied.
Call this method before using other SIISLP800PrinterManager methods.

Syntax

public void connect(String address) throws SIISLP800PrinterException

Parameter

address

Specify one of the following:

  • USB device path (for USB connection)
    Example:"/dev/bus/usb/001/002"
  • Bluetooth device address (for Bluetooth connection)
    Example:"00:11:22:AA:BB:CC"

Sample

    var printerManager: SIISLP800PrinterManager = SIISLP800PrinterManager(context)

    try {
        printerManager.connect("00:11:22:AA:BB:CC")
    } catch (e: SIISLP800PrinterException) {
        Log.d("MyApp", e.getErrorCode())
    }    

Note

  • A concurrent connection from multiple apps to one printer is not supported.

connect(String address, boolean secure)

Description

Starts a connection to the printer using the specified address.
For Bluetooth connections, secure mode is enabled when `secure` is true.
For USB connections, the `secure` parameter is ignored.
Call this method before using other SIISLP800PrinterManager methods.

Syntax

public void connect(String address, boolean secure) throws SIISLP800PrinterException

Parameter

address

Specify one of the following:

  • USB device path (for USB connection)
    Example:"/dev/bus/usb/001/002"
  • Bluetooth device address (for Bluetooth connection)
    Example:"00:11:22:AA:BB:CC"
secure

Specifies whether Bluetooth secure mode is used.

  • true: Connects in secure mode
  • false: Connects in non‑secure mode

This parameter applies only to Bluetooth connections.
Secure mode is generally recommended for normal operation.

Sample

    var printerManager: SIISLP800PrinterManager = SIISLP800PrinterManager(context)

    try {
        printerManager.connect("00:11:22:AA:BB:CC", true)
    } catch (e: SIISLP800PrinterException) {
        Log.d("MyApp", e.getErrorCode())
    }    

Note

  • A concurrent connection from multiple apps to one printer is not supported.