Files
esp-matter/tools/mfg_tool/chip_nvs_keys.py
T
Shubham Patil 0fd164ad0a mfg_tool: Generate onboarding payloads using chip-tool
qrcodetool behaves differently on macos and linux which breaks the
mfg_tool.py on linux. chip-tool has the facility to generate the
onboarding payloads.

Unique-id belongs to chip-factory namespace and it was present in
chip-config, fixed it.
2022-07-05 21:16:00 +05:30

70 lines
1.8 KiB
Python

#!/usr/bin/env python3
# Copyright 2022 Espressif Systems (Shanghai) PTE LTD
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
This file contains the CHIP specific key along with the data type and encoding format
"""
CHIP_KEY_MAP = {
'chip-factory': {
'discriminator': {
'type': 'data',
'encoding': 'u32',
},
'pin-code': {
'type': 'data',
'encoding': 'u32',
},
'iteration-count': {
'type': 'data',
'encoding': 'u32',
},
'salt': {
'type': 'data',
'encoding': 'string',
},
'verifier': {
'type': 'data',
'encoding': 'string',
},
'dac-cert': {
'type': 'file',
'encoding': 'binary',
},
'dac-key': {
'type': 'file',
'encoding': 'binary',
},
'dac-pub-key': {
'type': 'file',
'encoding': 'binary',
},
'pai-cert': {
'type': 'file',
'encoding': 'binary',
},
'cert-dclrn': {
'type': 'file',
'encoding': 'binary',
},
'unique-id': {
'type': 'data',
'encoding': 'hex2bin',
},
},
}