Select your printer model
start
Starts searching for the specified device type.
Each device is reported by the callback as it is detected.
Syntax
+ (int) start:(Epos2FilterOption *)filterOption delegate:(id<Epos2DiscoveryDelegate>)delegate; |
Parameter
filterOption
In order to filter the search result, set the filter option in the Epos2FilterOption type and specify it in the parameter. When nil is specified, search is run with the default settings.
The following information is stored in the Epos2FilterOption type.
- portType
Selects the port to search. -
Value
Description
EPOS2_PORTTYPE_ALL (default)
Search for all devices which can be connected via TCP, Bluetooth, USB or BLE.
EPOS2_PORTTYPE_TCP
Search for devices connected to the network.
EPOS2_PORTTYPE_BLUETOOTH
Search for devices which can be connected via Bluetooth.
EPOS2_PORTTYPE_USB
Search for devices which can be connected via USB.
EPOS2_PORTTYPE_BLUETOOTH_LE
Search for devices that can be connected via Bluetooth Low Energy.
- broadcast
Specify a Broadcast Address for TCP search as a string. -
Value
Description
"255.255.255.255" (default)
-
- deviceModel
Specifies the device model to search for. -
Value
Description
EPOS2_MODEL_ALL
Search for all models.
- deviceType
Specifies the device type to search for.
The device type settings other than "EPOS2_TYPE_ALL" can be used for the following systems connected using Wi-Fi or Ethernet.
• Customer Display Models (SSL/TLS communication only)
• TM Printer + DM-D + barcode scanner model
• TM Printer + barcode scanner model
• POS Terminal Model -
Value
Description
EPOS2_TYPE_ALL (default)
Search for all devices.
EPOS2_TYPE_PRINTER
Search for printers.
EPOS2_TYPE_HYBRID_PRINTER
Searches for hybrid model printers.
EPOS2_TYPE_DISPLAY
Search for customer displays.
EPOS2_TYPE_KEYBOARD
Search for keyboards.
EPOS2_TYPE_SCANNER
Search for barcode scanners.
EPOS2_TYPE_SERIAL
Search for serial communication devices.
EPOS2_TYPE_POS_KEYBOARD
Search for the POS keyboard.
EPOS2_TYPE_MSR
Search for the MSR.
EPOS2_TYPE_GFE
Search for the German fiscal element (TSE).
EPOS2_TYPE_OTHER_PERIPHERAL
Search for other peripheral devices.
delegate
Specifies an object conforming to the Epos2DiscoveryDelegate protocol.
Return value
Error status |
Description |
---|---|
EPOS2_SUCCESS |
The function was executed successfully. |
EPOS2_ERR_PARAM |
An invalid parameter was passed. |
EPOS2_ERR_ILLEGAL |
Tried to start search when search had been already done. |
EPOS2_ERR_MEMORY |
Memory necessary for processing could not be allocated. |
EPOS2_ERR_FAILURE |
An unknown error occurred. |
EPOS2_ERR_PROCESSING |
Could not run the process. |
Protocol declaration
@protocol Epos2DiscoveryDelegate <NSObject> @required - (void) onDiscovery:(Epos2DeviceInfo *)deviceInfo; @end |
Parameter
deviceInfo
The device information of the detected device is stored in the Epos2DeviceInfo type.
The following device information is stored.
- deviceType
The device type is stored. -
Device type
Status
For a printer
EPOS2_TYPE_PRINTER
For hybrid model printers
EPOS2_TYPE_HYBRID_PRINTER
For a customer display
EPOS2_TYPE_DISPLAY
For a keyboard
EPOS2_TYPE_KEYBOARD
For a barcode scanner
EPOS2_TYPE_SCANNER
For a serial communication device
EPOS2_TYPE_SERIAL
For POS keyboard
EPOS2_TYPE_POS_KEYBOARD
For MSR
EPOS2_TYPE_MSR
For German fiscal element (TSE)
EPOS2_TYPE_GFE
For other peripheral devices
EPOS2_TYPE_OTHER_PERIPHERAL
- target
The connection target of a device which can be specified by connectAPI is stored as a string.
Example)
"TCP:192.168.192.168"
"BT:00:22:15:7D:70:9C"
"USB:000000000000000000"
"TCP:192.168.192.168[local_printer]"
"TCP:192.168.192.168[local_display]"
"TCP:12:34:56:78:56:78"
"BLE: 00:22:15:7D:70:9C"
- deviceName
The name set to the device is stored.
If it could not be acquired, "" (blank character) is stored.
Example)
For a printer: "TM-T88V"
- ipAddress
The IP address is stored.
If it could not be acquired, "" (blank character) is stored.
Example)
TCP: "192.168.192.168"
BT: ""(blank character)
USB: ""(blank character)
BLE: ""(blank character)
- macAddress
The MAC address is stored.
If it could not be acquired, "" (blank character) is stored.
Example)
TCP: "12:34:56:78:56:78"
BT: ""(blank character)
USB: ""(blank character)
BLE: ""(blank character)
- bdAddress
The BD address is stored.
If it could not be acquired, "" (blank character) is stored.
Example)
TCP: ""(blank character)
BT: "12:34:56:78:56:78"
USB: ""(blank character)
BLE: ""(blank character) - leBdAddress
The Bluetooth Low Energy BD address is stored.
If it could not be acquired, "" (blank character) is stored.
Example)
TCP: ""(blank character)
BT: ""(blank character)
USB: ""(blank character)
BLE: "00:22:15:7D:70:9C"
Supplementary explanation
- The search result of this API is reported to the callback function for each device
detected.
An already opened device is also reported. However, an already opened Bluetooth device is not reported. - In search for TCP devices, if multiple devices with the same IP address exist, the device information is treated as a single device. Consistency for such device information is not guaranteed.
- If the printer has its TCP address and TCPS address, and the both are detected, only the TCPS address is reported to the callback function.
- Hybrid model printers can be detected as deviceType of EPOS2_TYPE_PRINTER and EPOS2_TYPE_HYBRID_PRINTER.
- After the search begins and the process ends, make sure to end the search.
- In iOS14 or later, when a dialog asking permission to access the local network appears after this API is executed, execute stop after permission to access the local network is granted, end the search, and then execute this API again and perform a search.
Quick Access
- [Name]
- [Format]
- [Range]
- [Description]
- [Notes]
- Introduction
- help
- Epos2Printer class
- initWithPrinterSeries
- connect
- disconnect
- startMonitor
- stopMonitor
- getStatus
- sendData
- beginTransaction
- endTransaction
- requestPrintJobStatus
- clearCommandBuffer
- addTextAlign
- addLineSpace
- addTextRotate
- addText
- addTextLang
- addTextFont
- addTextSmooth
- addTextSize
- addTextStyle
- addHPosition
- addFeedUnit
- addFeedLine
- addImage
- addLogo
- addBarcode
- addSymbol
- addHLine
- addVLineBegin
- addVLineEnd
- addPageBegin
- addPageEnd
- addPageArea
- addPageDirection
- addPagePosition
- addPageLine
- addPageRectangle
- addRotateBegin
- addRotateEnd
- addCut
- addPulse
- addSound
- addFeedPosition
- addLayout
- addCommand
- getMaintenanceCounter
- resetMaintenanceCounter
- getPrinterSetting
- setPrinterSetting
- getPrinterSettingEx
- setPrinterSettingEx
- setPrinterSettingEx[Obsolete]
- verifyPassword
- getPrinterInformation
- downloadFirmwareList
- getPrinterFirmwareInfo
- verifyUpdate
- updateFirmware
- forceRecover
- forcePulse
- forceStopSound
- forceCommand
- forceReset
- setStatusChangeEventDelegate
- setReceiveEventDelegate
- setGetPrinterSettingExDelegate
- setSetPrinterSettingExDelegate
- setVerifyPasswordDelegate
- interval
- Epos2LFCPrinter class
- Epos2HybridPrinter class
- initWithLang
- connect
- disconnect
- startMonitor
- stopMonitor
- getStatus
- sendData
- beginTransaction
- endTransaction
- clearCommandBuffer
- selectPaperType
- waitInsertion
- cancelInsertion
- ejectPaper
- readMicrData
- cleanMicrReader
- forceRecover
- forcePulse
- forceCommand
- forceReset
- paperType
- interval
- waitTime
- mode40Cpl
- setStatusChangeEventDelegate
- setReceiveEventDelegate
- Epos2LineDisplay class
- initWithDisplayModel
- connect
- disconnect
- getStatus
- sendData
- clearCommandBuffer
- addInitialize
- addCreateWindow
- addDestroyWindow
- addSetCurrentWindow
- addClearCurrentWindow
- addCreateScreen
- addCreateScreenCustom
- addCreateTextArea
- addDestroyTextArea
- addSetCurrentTextArea
- addClearCurrentTextArea
- addSetCursorPosition
- addMoveCursorPosition
- addSetCursorType
- addText
- addReverseText
- addMarqueeText
- addSetBlink
- addSetBrightness
- addBackgroundColor
- addStartSlideShow
- addStopSlideShow
- addDownloadImage
- addRegisterDownloadImage
- addNVImage
- addClearImage
- addSymbol
- addClearSymbol
- addShowClock
- addCommand
- setReceiveEventDelegate
- Epos2Keyboard class
- Epos2POSKeyboard class
- Epos2BarcodeScanner class
- Epos2MSR class
- Epos2SimpleSerial class
- Epos2GermanyFiscalElement class
- Epos2OtherPeripheral class
- Epos2CommBox class
- Common to all classes
- Epos2Discovery class
- Epos2Log class
- Epos2BluetoothConnection class
- EasySelect class
- EasySelectInfo class
- Appendix
- Status list
- Key code list
- List of Supported Classes
- List of Supported APIs
- Printer-specific Support Information
- TM-m10
- TM-m30
- TM-m30II
- TM-m30II-H
- TM-m30II-NT
- TM-m30II-S
- TM-m30II-SL
- TM-m30III
- TM-m30III-H
- TM-m50
- TM-m50II
- TM-m50II-H
- TM-T20
- TM-T20II
- TM-T20III
- TM-T20IIIL
- TM-T20IV-L
- TM-T20X
- TM-T20X-II
- TM-T60
- TM-T70
- TM-T70II
- TM-T81II
- TM-T81III
- TM-T82
- TM-T82II
- TM-T82III
- TM-T82IIIL
- TM-T82IV-L
- TM-T82X
- TM-T82X-II
- TM-T83III
- TM-T83IV
- TM-T88V
- TM-T88VI
- TM-T88VII
- TM-T100
- TM-L90 Liner-Free Label Printer Model
- TM-L100
- TM-U220
- TM-U330
- TM-P20
- TM-P20II
- TM-P60 (Receipt)
- TM-P60 (Peeler)
- TM-P60II (Receipt)
- TM-P60II (Peeler)
- TM-P80
- TM-P80II
- TM-H6000V
- TM-T20II-i
- TM-T70-i
- TM-T82II-i
- TM-T83II-i
- TM-T88V-i
- TM-T88VI-iHUB
- TM-U220-i
- TM-T70II-DT
- TM-T70II-DT2
- TM-T88V-DT
- TM-T88VI-DT2
- TM-H6000IV-DT
- TM-T88IV
- TM-T90
- TM-L90
- TM-H6000IV
- Usage restriction by firmware version