Skip to content

Format mismatch of ManufacturingDate element in Factory partition (CON-1893) #1622

@avzasorin-sd

Description

@avzasorin-sd

Describe the bug

esp-matter has implementation of DeviceInstanceInfoProvider which uses Factory Partition to fill some attributes of BasicInformation cluster.
The problematic atttibute is ManufacturingDate, which must be formatted, accodring to Matter specification, as a string of 8...16 characters, starting with YYYYMMDD block which represents the manufacturing date.

Corresponding "mfg-date" information element is embedded into factory partition by using esp-matter-mfg-tool. Usage guides of esp-matter-mfg-tool state that the format for --mfg-date argument is "YYYY-MM-DD", see https://github.com/espressif/esp-matter/blob/main/docs/en/production.rst

But in fact esp-matter-mfg-tool expects "YYYYMMDD" or "YYYYMMDDxxxxxxxx" format, and issues an error message if "YYYY-MM-DD" format is used:

[ERROR] - First 8 bytes should be in ISO 8601 format YYYYMMDD (e.g., 20250416), last 8 can be anything specific to the manufacturer

Default implementation of GenericDeviceInstanceInfoProvider::GetManufacturingDate() from CHIP SDK requires this "mfg-date" configuration element to be formatted as "YYYY-MM-DD" string. Current implementation of esp-matter SDK calls this default implementation for ManufacturingDate attribute. It fails, because data is not formatted as expected.

Summary of current problems:

  1. Manual for esp-matter-mfg-tool tool and usage examples contradicts with actual format of data allowed for --mfg-date argument;
  2. Value of ManufacturingDate attribute cannot be configured by using Factory Partition: esp-matter-mfg-tool stores it in a format which is not recognised by current implementation of DeviceInstanceInfoProvider;
  3. There is no possible way to insert additional information into ManufacturingDate attribute (8 vendor defined characters as per Matter specification): though it can be stored in factory partition using esp-matter-mfg-tool, it is not recognised by GenericDeviceInstanceInfoProvider parser.

Environment

ESP-Matter Commit Id: b8f6582
ESP-IDF Commit Id: 4c2820d377d1375e787bcef612f0c32c1427d183
SoC (eg: ESP32 or ESP32-C3): ESP32-C3

Any additional details

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions