Command reference
You can run the Module Utility CLI from the command line or use the CLI within scripts. To run the Module Utility CLI, use the following syntax:| Command | Description |
|---|---|
barcode | Generates the product and package QR files for your product. The customer uses the barcode when they connect your device with Wi-Fi Simple Setup. For details, see general guidance on barcode printing. |
deviceinfo | Gets the device serial number (DSN), public key, and firmware version of the module. |
listports | Displays the available serial ports on your computer, and their connection statuses. |
lockmodule | Locks your module as a specific virtual product, such as a microwave. |
provision | Changes the module state to product provisioned, and generates device certificates used for authorization and registration with Alexa. |
reverttomoduleprovisioned | Reverts a module from a product provisioned state to a module provisioned state. |
updatemodule | Updates a module over-the-wire with a new firmware package from Amazon. |
version | Displays the current version of the ACK Module Utility. |
barcode
Thebarcode command generates the product and package QR files for your product. The command creates two files for the package and product barcodes:
- A .png image.
- A file that contains a string associated with the QR code.
| Parameter | Description | Required |
|---|---|---|
--port, -p <port> | The serial port that your device SoC or ACK module connects to | Yes |
--upc <upc> | The universal product code (UPC) is a 12 digit numeric value assigned for the product by the manufacturer. The UPC is used on the product’s outer packaging. | Yes |
--includedsndevice | This adds a device serial number (DSN) value to the barcode. | No |
--out, -o <output directory> | The output directory for the barcode image files. If not specified, the current directory is used. | No |
--loglevel | Set the type of messages to log. Logs are stored to your system’s TEMP directory. Valid values are off, info, warning, and error. The default is error. | No |
--dpi | Set an explicit DPI value for the barcode. Use any value supported by the Barcode4J library. If not specified, a value of 300 is used. | No |
--productsize | Set an explicit size in millimeters for the Product barcode. Use any value supported by the Barcode4J library. If not explicitly set, the command calculates the size automatically. | No |
--packagesize | Set an explicit size in millimeters for the Package barcode. Use any value supported by the Barcode4J library. | No |
--help, -h | Display help for the command. | No |
Barcode files successfully created in ./ directory.
deviceinfo
Thedeviceinfo command returns the device serial number (DSN), public key, and firmware version of the module. Information can be retrieved in any order, or in any combination. If you don’t include any parameters, all three are returned.
Syntax
deviceinfo --port <port> [--dsn] [--firmwareversion] [--puk]
Options
| Parameter | Description | Required |
|---|---|---|
--port, -p <port> | The serial port that your device SoC or ACK module connects to | Yes |
--dsn | Prints the module’s device serial number (DSN). | No |
--firmwareversion | Prints the module’s firmware version. | No |
--puk | Prints the public key for the module. | No |
--loglevel | Set the type of messages to log. Logs are stored to your system’s TEMP directory. Valid values are off, info, warning, and error. The default is error. | No |
--help, -h | Display help for the command. | No |
listports
Thelistports command shows the available serial ports on your computer, and their connection statuses. Use this command before other commands that require a --port parameter.
Syntax
listports
Options
| Parameter | Description | Required |
|---|---|---|
--loglevel | Set the type of messages to log. Logs are stored to your system’s TEMP directory. Valid values are off, info, warning, and error. The default is error. | No |
--help, -h | Display help for the command. | No |
- macOS
- Linux
- Windows
lockmodule
Thelockmodule command locks your module as a specific virtual product, such as a microwave. For details, see Module Life Cycle.
Syntax
lockmodule --port <port> [--noprompt]
Options
| Parameter | Description | Required |
|---|---|---|
--port, -p <port> | The serial port that your device SoC or ACK module connects to | Yes |
--noprompt | Locks the module without user confirmation. | No |
--loglevel | Set the type of messages to log. Logs are stored to your system’s TEMP directory. Valid values are off, info, warning, and error. The default is error. | No |
--help, -h | Display help for the command. | No |
provision
Theprovision command changes the module state to product provisioned, and generates device certificates used for authorization and registration with Alexa. For details, see Module Life Cycle.
provision (ACK managed services)
When you provision by using ACK managed services, theprovision command generates device certificates flashes them to the module’s memory. For step-by-step instructions, see Provision Your Module.
This method is the default method for the provision command. Unless you’re ready to start manufacturing your product, use this method.
Syntax
| Parameter | Description | Required |
|---|---|---|
--port, -p <port> | The serial port that your device SoC or ACK module connects to | Yes |
--provisionconfigfile <path>/ProvisioningInfo_[devicetypeid].conf | The path to the provisioning configuration file. You download the provisioning file from the ACK developer console. | You must specify either --provisionconfigfile, or all of --devicetype, --simplesetupid, and --simplesetupztskey. |
--devicetype, -d <device type ID> | A randomly generated string that corresponds to a unique device type. | You must specify either --provisionconfigfile, or all of --devicetype, --simplesetupid, and --simplesetupztskey. |
--simplesetupid, -i <simple setup ZTS key> | A string that’s used for Wi-Fi Simple Setup. | You must specify either --provisionconfigfile, or all of --devicetype, --simplesetupid, and --simplesetupztskey. |
--simplesetupztskey <simple setup ZTS key> | A string that’s used for Zero-Touch Setup. | You must specify either --provisionconfigfile, or all of --devicetype, --simplesetupid, and --simplesetupztskey. |
--loglevel | Set the type of messages to log. Logs are stored to your system’s TEMP directory. Valid values are off, info, warning, and error. The default is error. | No |
--help, -h | Display help for the command. | No |
The module is already provisioned as product AZCQX0BWIKW8F. Reprovision? Y/N appears. In this case, choose Y to provision the module again.
You can omit the configuration file and manually specify the --devicetype, --simplesetupid, and --simplesetupztskey. For example:
provision (Yubikey)
Provision by using a YubiKey when you’re ready to start manufacturing your product. This method relies on relies on device certificates stored on a YubiKey hardware security module, provided by Amazon. Contact your Amazon business representative to use this method. For step-by-step instructions, see Provision Your Module with a YubiKey. Syntax| Parameter | Description | Required |
|---|---|---|
--port, -p <port> | The serial port that your device SoC or ACK module connects to | Yes |
--provisionconfigfile <path>/ProvisioningInfo_[devicetypeid].conf | The path to the provisioning configuration file. You download the provisioning file from the ACK developer console. | You must specify either --provisionconfigfile, or all of --devicetype, --simplesetupid, and --simplesetupztskey. |
--devicetype, -d <device type ID> | A randomly generated string that corresponds to a unique device type. | You must specify either --provisionconfigfile, or all of --devicetype, --simplesetupid, and --simplesetupztskey. |
--simplesetupid, -i <simple setup ID> | A string that’s used for Wi-Fi Simple Setup. | You must specify either --provisionconfigfile, or all of --devicetype, --simplesetupid, and --simplesetupztskey. |
--simplesetupztskey <simple setup ZTS key> | A string that is used for Zero-Touch Setup. | You must specify either --provisionconfigfile, or all of --devicetype, --simplesetupid, and --simplesetupztskey. |
--yubikeypinfile <path>/YubiKeyPin.txt | The path to the file that contains the YubiKey pin. The file is named YubiKeyPin.txt. | Yes |
--yubikeyslot <slot number> | The YubiKey smart card slot number, as an integer. For Windows, specify the slot number if your YubiKey slot is different than 0. For Ubuntu 16.04 or earlier, specify the slot number if your YubiKey slot is different than 1. For Ubuntu 18.04 and later, always specify the slot number. To locate the slot number, see Identify the YubiKey slot number. | No |
--loglevel | Set the type of messages to log. Logs are stored to your system’s TEMP directory. Valid values are off, info, warning, and error. The default is error. | No |
--help, -h | Display help for the command. | No |
reverttomoduleprovisioned
Thereverttomoduleprovisioned command reverts a module from a product provisioned state to a module provisioned state. For details, see Module Life Cycle.
Syntax
reverttomoduleprovisioned --port <port>
Options
| Parameter | Description | Required |
|---|---|---|
--port, -p <port> | The serial port that your device SoC or ACK module connects to | Yes |
--loglevel | Set the type of messages to log. Logs are stored to your system’s TEMP directory. Valid values are off, info, warning, and error. The default is error. | No |
--help, -h | Display help for the command. | No |
updatemodule
Theupdatemodule command updates a module over the wire with a new firmware package from Amazon. Download firmware packages from the Resources page of the ACK developer console.
Syntax
updatemodule --port <port> --updatefile <file path> [--fallback]
Options
| Parameter | Description | Required |
|---|---|---|
-p,--port <port> | The serial port that your device SoC or ACK module connects to | Yes |
--updatefile <file path> | The path to the firmware update file. | Yes |
--fallback | For firmware versions earlier than v211091120. This is a deprecated process for updating the module; use only if directed by Amazon. | No |
--loglevel | Set the type of messages to log. Logs are stored to your system’s TEMP directory. Valid values are off, info, warning, and error. The default is error. | No |
--help, -h | Display help for the command. | No |
version
Theversion command displays the current version of the ACK Module Utility.
Syntax
version
Options
| Parameter | Description | Required |
|---|---|---|
--loglevel | Set the type of messages to log. Logs are stored to your system’s TEMP directory. Valid values are off, info, warning, and error. The default is error. | No |
--help, -h | Display help for the command. | No |
Version: 4.0.2.0

