Mistake on this page? Email us

Using the Secure Factory CLI commands

Secure Factory CLI provides an interface that enables you or your factory tool to send commands to Secure Factory Service.

For information about integrating Secure Factory CLI with your factory tool, including a flow example, see Integrating Secure Factory CLI with your factory tool.

For information about CLI errors, see Secure Factory CLI errors.

Usage

Use this structure for all Secure Factory CLI commands:

factory_tool.exe [options] <command> [arguments]

Use factory_tool.exe --help for more information about all commands, or factory_tool.exe <command> --help for more information about a specific command, including its parameters and how to use them.

The parameters in square brackets are optional.

Commands

  • status

    Checks the factory workstation configuration status. Validates that the factory workstation and Secure Factory Service are well-configured and the workstation is registered on Secure Factory Service.

  • new_device [options] [DEVICE_SESSION_ID]

    Initiates the provisioning process for a new device.

    A successful response from Secure Factory Service contains a hexadecimal byte stream that the factory tool must pass to the device.

  • get_device_configuration [options] [DEVICE_SESSION_ID] [RESPONSE]

    Sends a request to provision device-specific configuration.

    A successful response from Secure Factory Service contains a hexadecimal byte stream that the factory tool must pass to the device.

  • handle_device_response [options] [DEVICE_SESSION_ID] [RESPONSE]

    Sends a request to process the final device response and finalize device manufacturing. This enables Secure Factory Service to verify that the factory provisioning process was successful and record the device as functional in manufacturing statistics.

    A successful response from Secure Factory Service contains the device certificate fingerprint.

  • report_error [options] [DEVICE_SESSION_ID] [ERROR_CODE] [ERROR_REASON]

    Reports an error from the device and ends the manufacturing procedure for the current device.

    Secure Factory Service records the device as malfunctioned in manufacturing statistics.

Arguments

Argument Description
DEVICE_SESSION_ID A unique identifier of the device.
RESPONSE The hexadecimal-format response that the device returns in the previous operation.
ERROR_CODE An integer value that identifies the error.
ERROR_REASON A textual description of the error.

Options

Option Description
-c, --config-file <file name> The name of the configuration file.
-l, --log-file <file name> The name of the file to write debug logs into.
-v, --verbose Add verbosity to the log when you log to a file.
--version Show the version and exit.
--help Show an explanation of each command, including its parameters and their usage, and exit.

Exit codes

Code Description
0 Success.
1 Device error.
2 Secure Factory Service error (bad request).