factory-data Tool

[中文]

If you use private PAI, DAC certificates, and other configuration information, the following configuration is required

  1. Configure the project as a device that uses private configuration information

    In connectedhomeip/SRC/platform/Beken/CHIPDevicePlatformConfig CONFIG_ENABLE_BEKEN_DEVICE_INFO configured for 1 h. As follows:

    #define  CONFIG_ENABLE_BEKEN_DEVICE_INFO  1

    Note: If CONFIG_ENABLE_BEKEN_DEVICE_INFO is 0, the device uses the default configuration of the Matter protocol.

  2. Generate factory_data.bin

    Configure private device information in the toosls/matter_factory_data_generate folder of the project. Configure the gen.sh script to generate the desired bin file.

    python main.py generate --cd ./cd.bin --pai ./Chip-PAI-Cert.der --dac ./Chip-DAC-Cert_01.der --dac_key ./Chip-DAC-Key_01.der --vendor_name BEKEN --vendor_id 0x1342 --product_name lighting --product_id 0x03ed -o factory_data.bin

    Three Dacs and DAC_keys are provided in the toosls/matter_factory_data_generate folder. The Dacs and DAC_keys need to be used in pairs. If needed, PAI and PAI_KEY can be used to regenerate more Dacs and DAC_keys. Parameters such as vendor_name, product_name, serial-num, and hardware-ver can be set flexibly. After the parameters are configured, run./gen.sh to generate factory_data.bin.

    Note: The PAI, DAC, and CD certificates provided in this path are generated based on vendor_id being 0x1342 and product_id being 0x03ed. Do not change these two parameters. Unless PAI, DAC, and CD certificates are re-signed according to the private vendor_id and product_id.

  3. Write factory_data.bin

    Select the location of factory_data.bin in the bk_loder tool and set the start address of factory_data.bin in the Flash. As follows:

    ../../_images/factory_data_wirte_to_flash_en.png

    The start address of factory_data.bin that store in Flash needs to be identified in the Flash map in the source code.

factory_data.bin Contains information

The factory-data tool is used to package the factory configuration information such as certificates required by the Matter device into a bin file and burn it to the device.

matter_factory_data_tool can package the following configuration information into a bin file and burn it to the specified address location of the device flash to facilitate device configuration during production.

Device certificate configuration

cert-dclrn

CD issued by CSA Alliance

dac-cert

dac certificate

pai-cert

pai certificate

dac-pub-key

dac public key

dac-key

dac private key

Commissionable Data

discriminator

A 12-bit value used to discern between multiple commissionable Matter device advertisements.

iteration-count

PAKE iteration count

salt

PAKE salt value

verifier

PAKEPasscodeVerifier

pin-code

password

Device Instance Info Data

vendor-name

a human readable (displayable) name of the vendor for the Node.

vendor-id

Vendor Id(VID)

product-name

a human readable (displayable) name of the model for the Node

product-id

Product Id(PID)

serial-num

a human readable (displayable) serial number

mfg-date

the date that the Node was manufactured

hardware-ver

the version number of the hardware of the Node

hw-ver-str

the version number of the hardware of the Node

rd-id-uid

a non-trackable identifier which is unique per-device

product-label

a vendor specific human readable (displayable) product label

product-url

a link to a product specific web page