Skip to content

Sample app to demonstrate how to configure Zebra IoT Connector for scanner and send its data to external endpoints

Notifications You must be signed in to change notification settings

spoZebra/zebra-scanner-iot-connector

Repository files navigation

Zebra Scanner - IoT Connector Demo

Zebra IoT Connector for scanner is a utility capable of collecting and write scanner events/statistics/data to text files, Windows Event log or HTTP Post endpoints. This sample NodeJS app aims to demonstrate how to configure the connector and send data to HTTP Post endpoints. For more info you can refer to the official documentation here.

This demo works in both Windows and Linux environments.

Supported OS

  • Windows 11 64bit
  • Windows 10 32bit
  • Windows 10 64bit
  • All Linux distros mentioned here

Supported Devices

  • Almost all Zebra Scanners. Compatible HW Information can be found here

Project Structure

Configuration

You can configure the IoT Connector from its config file IoTConnector-Config.xml. All the available configurations are well documented using comments. In particular, if you wish to change the endpoint, you can do it from here:

<sink type="http_sink_mt" name="http_sink_mt">
<!-- URL of the server instance -->
<property key="url" value="http://localhost:3000/" />
<!-- HTTP headers for the request. Use semicolon(;) to separate multiple headers. Eg : header1;header2 -->
<property key="request_header" value="Host;Content-Type;Accept" />
<!-- Set the value to "true" to enable the batch mode. You can set the logging time interval and/or number of log entries(batch size) per batch -->
<property key="batch_mode" value="false" />
<!-- Number of logs per batch -->
<property key="batch_size" value="0" />
<!-- Set the value to true to get HTTP request/response information in a file named "logs/iotConnector-verbose.log"-->
<property key="verbose_mode" value="false" />
<!-- Pattern of a single log entry. Please refer to https://github.com/gabime/spdlog/wiki/3.-Custom-formatting for more information. -->
<property key="log_pattern" value='{"event":{"time": "%Y-%m-%d %H:%M:%S", "level": "%^%l%$", "hostname": "%J", "message": "%v"}}' />
<!-- Log level to be recorded. 2 = INFO, 3 = WARNING, 4 = ERROR, 5 = CRITICAL 6 = LOG_OFF, 0,1 = TRACE,DEBUG (Works only with debug build) -->
<property key="log_level" value="2" />
</sink>

Setup

Run the following command to start the app

node app.js

The app creates a local HTTP Server and run the Connector. Connect a scanner and enjoy 🦓

About

Sample app to demonstrate how to configure Zebra IoT Connector for scanner and send its data to external endpoints

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published