Provision ACK Modules for Production
Before you mount an Alexa Connect Kit (ACK)-based module to the printed circuit board, you program the ACK module. Programming steps include provisioning credentials onto the module, securing the module through module locking, and generating the required barcodes for device identification and Frustration-Free Setup (FFS).
Prerequisites
Before you provision the modules, set up your client and server machines. For more details, see Set Up Client - Server Machines for Production.
Steps to provision and lock modules
Complete the following steps to provision, lock, and generate barcodes during module production.
Step 1: Provision test modules
You can test provisioning on test modules to learn the time it takes to provision and how to generate control logs without locking the modules.
To provision the device on a client machine
-
Connect your client machine to the module by using
PuTTY. - Create an environment variable called
ACKSDKTOOLS_TEST_MODEwith a value of1. - To apply the new variable, restart your machine.
- In a PuTTY terminal window on the client machine, enter the following command.
- Set <port> to the serial port, such as
COM9on Windows.
Tip: The -g flag auto-generates a DSN and sets it in the module. Include a 1–3 letter prefix. Make sure that each client has a unique code. - Set <port> to the serial port, such as
provision -p /dev/<module_port> -x <path/to/ProvisioningInfo_<device_type>.conf> -g <DSN prefix> -s <server-ip-address/hostname> -sp 5000 -cd <path/to/CertificationDeclaration> --ca <certificate used by server> --token <path to token file> -l DEBUG --test
- If provisioning succeeds, the command displays the following response on the terminal.
Logging into provision.log with logging level DEBUG Writing certificate to the module Provisioning successful! - If provisioning fails, review the client and server logs to determine the error. You see the log filenames in the command response.
Step 2: Provision production modules
Provisioning a module for manufacturing generates a device serial number (DSN), gets a signed certificate from the server, and writes both to the module. On success, provisioning generates Matter audit logs.
To provision the device on a client machine
-
Connect your client machine to the module by using
PuTTY. -
In a Windows terminal window on the client machine, enter the following command.
- Set <port> to the serial port, such as
COM9on Windows.
Tip: The -g flag auto-generates a DSN and sets it in the module. Include a 1–3 letter prefix. Make sure that each client has a unique code. - Set <port> to the serial port, such as
provision -p /dev/<module_port> -x <path/to/ProvisioningInfo_<device_type>.conf> -g <DSN prefix> -s <server-ip-address/hostname> -sp 5000 -cd <path/to/CertificationDeclaration> --ca <certificate used by server> --token <path to token file> -l DEBUG
- If provisioning succeeds, the command displays the following response on the terminal.
Logging into provision.log with logging level DEBUG Writing certificate to the module Provisioning successful! - If provisioning fails, review the client and server logs to determine the error. You see the log filenames in the command response.
- On success, the command generates an audit log file in the
audit_logs_uploadfolder under the data folder on the server. Keep this file to upload to Amazon in a later step.
Step 3: Lock the module
In this step, you lock the module to prevent any unauthorized modifications or tampering.
To lock the module, in a Windows terminal window on the client machine, enter the following command at the command prompt. Make sure that you connect your client machine to the module.
modulelock -p /dev/<module_port> -s <server-ip-address/hostname> -sp 5000 --ca <certificate used by server> --token <path to token file>
Step 4: Generate barcodes
After you provision the module, you generate a unique set of barcodes: the FFS barcode and Matter QR code. The FFS barcode on the package identifies a specific device. Amazon scans the FFS package barcode during order fulfillment and pre-registers the device with the Amazon customer account. Pre-registration enables FFS to authenticate device ownership and enable simple setup.
This step generates the following files:
DVC_<DSN>.png– The Matter QR code or device barcode. You print or stick this code on the device to allow customers to scan and register the device. The barcode serves as a unique identifier for the device during manufacturing.DVC_<DSN>_qr_code_content.txt– The text content of the QR code.PKG_<DSN>.png– The FFS barcode. You print this barcode on the product package to enable Matter Simple Setup (MSS).
For more details, see Provisionee Barcode Specification / 1D Barcode requirements.PKG_<DSN>_barcode_content.txt– The text content of the package barcode.
To generate a barcode for a module
-
Connect your client machine to the module by using
PuTTY. -
On the client machine, in a Windows terminal window, enter the following command.
Tip: You can modify size and dots per inch (DPI) of the barcode with additional command options. For more details, enterbarcode --help.
barcode -p /dev/<device_port>
- If the command succeeds, the following response displays on the terminal.
Barcode files successfully created in C:\Users\... directory. - Store the QR code and barcode in your database with the device information.
Next steps
During the module programming phase, you upload audit logs and device control logs to Amazon. For more details, see Upload Production Logs.
Related topics
- Manufacture your ACK-based Matter Device
- Set Up Client - Server Machines for Production
- Provision ACK-based Matter Prototype Devices
Last updated: frontmatter-missing
