Skip to main content

Scan2Deploy CE

Distribution

Scan2Deploy CE is pre-installed on devices that support the application. It can be upgraded using Scan2Deploy.

Overview

Scan2Deploy is an application devoted to the initial staging of devices by reading a barcode sequence. Depending on the content of the staging barcodes Scan2Deploy will (in this order):

  • configure the device Wi-Fi network,
  • download a data archive from a HTTP/HTTPS server and unpack it to the device,
  • execute a series of shell commands

It's worth noticing that the application is not a resident service. The above-mentioned actions are performed as long as Scan2Deploy is active and in use.

Creating Scan2Deploy files

You will need to create your Scan2Deploy JSON files using a text editor. A JSON schema is available to help ensure valid file content. There are several advantages to using an editor that supports this schema:

  • Provides help text for each field
  • Provides real-time compiler-like messages letting you know when you have made a mistake
  • Allows you to write files faster and with fewer mistakes

$schema

A JSON schema file is used to define the structure and features available in Scan2Deploy. The $schema tag is used to indicate which version of the schema you are using. You can get details regarding versions of the schema along with complete field documentation here.

The latest schema can be referenced like this:

{
"$schema": "https://raw.githubusercontent.com/datalogic/scan2deploy-ce-schema/master/schema.json"
}

You can also point to a specific version of the schema by pointing to the desired tag. For example:

{
"$schema": "https://raw.githubusercontent.com/datalogic/scan2deploy-ce-schema/v1-0-0/schema.json"
}

Choosing an editor

There are several good JSON editors available. We recommend Visual Studio Code. It is free and has many features designed to make writing JSON files easier, including utilizing JSON schemas.

By including the aforementioned $schema tag in you JSON file, Visual Studio Code will provide automatic tool tips and error underlining:

Some other editors know to use the schema files on schemastore.org when a given file uses a specific file extension that is registered on schemastore.org: file-name.dla.json

Barcode Generation using dl_config.exe

Scan2Deploy barcodes for Windows CE are generated with dl_config.exe, a Windows application that runs at the Command Prompt. Download the latest version here.

Important

dl_config.exe can trigger false positives in some anti-virus software packages, as dl_config.exe uses a popular PDF generation library that has unfortunately been utilized in some viruses as well. Since a portion of the file matches the signature of a virus, it is therefore falsely flagged by anti-virus software packages as potentially harmful. We apologize for any confusion or concerns this may cause, but dl_config.exe is safe to use on any version of Windows and contains no viruses.

Command Output

$ dl_config.exe
Datalogic Staging Configurator (ver 1.7.1524)
Copyright (c) 2016-2017 by Datalogic MCSA S.r.l.
======================================================================
Usage: dl_config.exe <input-file> <output-file> [options]
Options:
--outputfolder=<string>
--barcodetype=<1d|2d>
--barcode1dlimit=<integer>
--barcode2dlimit=<integer>
--legacymode=<boolean>
--version=<integer>
--enroll=<boolean>
--description=<string>
--encodeonly=<boolean>

Example

The following command will create a PDF document with a Scan2Deploy barcode, including a description of Store 123 Wi-Fi and apps:

dl_config.exe input.json output.pdf --description="Store 123 Wi-Fi and apps"

Required parameters

  • input-file is a JSON document, driving the application behavior
  • output-file is a PDF document that will be created based on the contents of the input-file.

Options

  • outputfolder: Deprecated
  • barcodetype: Controls the output barcode type to use, that is QRcode (2d) or CODE-128 (1d)- The default value is 2d.
  • barcode1dlimit: Maximum data length for each generated 1D barcode. The default value is 50.
  • barcode2dlimit: Maximum data length for each generated 2D barcode. The default value is 500.
  • legacymode: Deprecated
  • version: Controls the data encoding version and should not be used unless necessary. The default value is 0 for 1D barcodes, and -1 for 1D barcode.
  • enroll: Android Only Boolean flag instructing DL-Config to generate Scan2Deploy Device Owner Enrollment QRcode in output file. The default value is false.
  • description: Free-form description field. Description will be displayed in header of output file. The default description is none.
  • encodeonly: *Android Only Boolean flag. If set to true, the encoded data generated by the tool will only be displayed on the command line for easy copy-paste. This data can be included in a start-activity intent to Scan2Deploy Android, effectively allowing you to "scan" without a barcode and programmatically apply a given configuration. The filename provided for output-file will be ignored and a PDF file will not be created. You can therefore enter any value for output-file (- and dummy are valid values for instance) The default value for encodeonly is false.

Examples

In order to describe the JSON input-file structure, the following example templates show how the available parameters are used:

Example: EAP-FAST and applying a .dxu file

{
"$schema": "https://raw.githubusercontent.com/datalogic/scan2deploy-ce-schema/master/schema.json",
"layout": {
"description": "This is for our WEC7 devices, configures EAP-FAST network and applies .dxu file"
},
"global": {
"target-path": "\\FlashDisk",
"action": "warm-boot",
"ping-timeout": 1000
},
"settings": {
"usb-function": "usblan"
},
"network": {
"profile": "my_fast",
"essid": "eapfast",
"mode": "wpa2-aes",
"eap-method": "fast",
"eap-username": "eapfast",
"eap-password": "1234567890",
"credentials-type": "password",
"credentials-source": "profile",
"validate-server": false,
"connect-to-server": false,
"connect-to-server-names": "",
"server-cert-name": "",
"outer-identity": "",
"fast-reconnect": false,
"inner-method": "eap-MsChapV2",
"auto-pac": true,
"pac-file-path": "",
"pac-aid-info": ""
},
"deployment": {
"scheme": "http",
"host": "10.1.20.123",
"port": 8080,
"path": "target.zip"
},
"shell": {
"cmds" : [
{
"app-name": "\\windows\\dldxu.exe",
"args": "\\FlashDisk\\target\\config.dxu"
}
]
}
}

Example: WPA2-PSK and firmware update

{
"$schema": "https://raw.githubusercontent.com/datalogic/scan2deploy-ce-schema/master/schema.json",
"layout": {
"description": "This is for our WEC7 devices, configures wpa2-psk network and performs firmware update"
},
"global": {
"target-path": "\\FlashDisk",
"action": "close",
"ping-timeout": 1000
},
"settings": {
"usb-function": "active-sync-usb"
},
"network": {
"profile": "my_psk",
"essid": "tsunami",
"mode": "wpa2-psk",
"mode-key": "1234567890",
"eap-method": "none"
},
"deployment": {
"scheme": "http",
"host": "10.1.20.123",
"port": 8080,
"path": "target.zip"
},
"shell": {
"cmds" : [
{
"app-name": "\\windows\\fupdate.exe",
"args": "\\FlashDisk\\target\\nk.img"
}
]
}
}

Example: WEP, MS-DOS commands, and applying a .dxu file

{
"$schema": "https://raw.githubusercontent.com/datalogic/scan2deploy-ce-schema/master/schema.json",
"layout": {
"description": "This is for our WEC7 devices, configures WEP network and applies .dxu file"
},
"global": {
"target-path": "\\",
"action": "warm-boot",
"ping-timeout": 1000
},
"settings": {
"usb-function": "usblan"
},
"network": {
"profile": "my_wep",
"essid": "tsunami",
"mode": "wep-104",
"mode-key": "1234567890123",
"index": 1,
"eap-method": "none"
},
"deployment": {
"scheme": "http",
"host": "10.1.20.123",
"port": 8080,
"path": "FlashDisk.zip",
"skip-inflation": false
},
"shell": {
"cmds" : [
{
"app-name": "\\windows\\cmd.exe",
"args": "/c copy \\FlashDisk\\config.dxu \\Temp"
},
{
"app-name": "\\windows\\dldxu.exe",
"args": "\\Temp\\config.dxu"
},
{
"app-name": "\\windows\\cmd.exe",
"args": "/c del \\Temp\\config.dxu"
}
]
}
}

Example: Download an executable file and run executable with a shell command

{
"$schema": "https://raw.githubusercontent.com/datalogic/scan2deploy-ce-schema/master/schema.json",
"layout": {
"description": "download and run 'myapp.exe' on CE device"
},
"global": {
"target-path": "\\FlashDisk",
"action": "close"
},
"network": {
"profile": "my_psk",
"essid": "tsunami",
"mode": "wpa2-psk",
"mode-key": "1234567890"
},
"deployment": {
"scheme": "http",
"host": "10.1.20.123",
"port": 8080,
"path": "apps/myapp.exe",
"skip-inflation": true
},
"shell": {
"cmds": [
{
"app-name": "\\FlashDisk\\myapp.exe"
}
]
}
}