From f70144b0082d9d70c75456d9f313b6b1bb415de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Ba=C5=82ys?= Date: Wed, 29 Jun 2022 16:05:15 +0200 Subject: [PATCH] [nrfconnect] Added missing factory data version field to the Python script (#20109) Factory Data version field has been added to Python script. --- .../nrfconnect/generate_nrfconnect_chip_factory_data.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py b/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py index d8425c1e6e805f..62e9fa303e051b 100644 --- a/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py +++ b/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py @@ -27,6 +27,10 @@ from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.serialization import load_der_private_key +# A user can not change the factory data version and must be coherent with +# the factory data version set in the nRF Connect platform Kconfig file (CHIP_FACTORY_DATA_VERSION). +FACTORY_DATA_VERSION = 1 + HEX_PREFIX = "hex:" PUB_KEY_PREFIX = b'\x04' INVALID_PASSCODES = [00000000, 11111111, 22222222, 33333333, 44444444, @@ -162,6 +166,7 @@ def generate_json(self): sys.exit(-1) with json_file: # serialize data + self._add_entry("version", FACTORY_DATA_VERSION) self._add_entry("sn", self._args.sn) self._add_entry("vendor_id", self._args.vendor_id) self._add_entry("product_id", self._args.product_id)