-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
658131e
commit 2318522
Showing
1 changed file
with
47 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,60 @@ | ||
# Setup | ||
The script uses the json based data model in order to convert cluster identifiers into PICS Codes. The file can be downloaded here: https://groups.csa-iot.org/wg/matter-csg/document/27290 | ||
|
||
This tool uses the python environment used by the python_testing efforts, which | ||
can be built using the below command. | ||
|
||
``` | ||
scripts/build_python.sh -m platform -i out/python_env | ||
``` | ||
|
||
Once the python environment is build it can be activated using this command: | ||
|
||
``` | ||
source out/python_env/bin/activate | ||
``` | ||
|
||
The script uses the json based data model in order to convert cluster identifiers into PICS Codes. | ||
The file can be downloaded here: | ||
[https://groups.csa-iot.org/wg/matter-csg/document/27290](https://groups.csa-iot.org/wg/matter-csg/document/27290) | ||
|
||
NOTE: The tool has been verified using the "Specification_version 0.7-spring2024.json" version. | ||
|
||
The script uses the PICS XML templates for generate the PICS output, the PICS templates can be downloaded here: | ||
https://groups.csa-iot.org/wg/matter-csg/document/26122 | ||
The script uses the PICS XML templates for generate the PICS output. | ||
These files can be downloaded here: | ||
[https://groups.csa-iot.org/wg/matter-csg/document/26122](https://groups.csa-iot.org/wg/matter-csg/document/26122) | ||
|
||
NOTE: The tool has been verified using V24 PICS (used for Matter 1.2 certification) | ||
|
||
# How to run | ||
In order to use the script the Python CHIP controller must be build, use the instructions at https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/python_chip_controller_building.md#building | ||
|
||
cd into "connectedhomeip" folder | ||
The tool does, as mentioned above, have external dependencies, these are provided to the tool using these arguments: | ||
|
||
- --cluster-data is the absolute path to the JSON file contaning the cluster data | ||
- --pics-template is the absolute path to the folder contaning the PICS templates | ||
- --pics-output is the absolute path to the output folder to be used | ||
|
||
If the device has not been commissioned this can be done by passing in the commissioning information: | ||
|
||
``` | ||
python3 'src/python_testing/PICSGenerator.py' --cluster-data <pathToClusterJson> --pics-template <pathToPicsTemplateFolder> --pics-output <outputPath> --commissioning-method ble-thread --discriminator <DESCRIMINATOR> --passcode <PASSCODE> --thread-dataset-hex <DATASET_AS_HEX> | ||
``` | ||
|
||
In case the device uses a development PAA, the following parameter should be | ||
added. | ||
|
||
``` | ||
--paa-trust-store-path credentials/development/paa-root-certs | ||
``` | ||
|
||
Activate the Python virtual environment using "source out/python_env/bin/activate" | ||
In case the device uses a production PAA, the following parameter should be | ||
added. | ||
|
||
If the "DUT" has not been commissioned this can be done by passing in the configuration in the following way: | ||
"python3 'src/python_testing/PICSGenerator.py' --cluster-data '/Users/renejosefsen/Developer/GitData/connectedhomeip/src/python_testing/DeviceMapping/clusterData/Specification_version master da1249d.json' --pics-template '/Users/renejosefsen/Developer/GitData/connectedhomeip/src/python_testing/DeviceMapping/PICS/XML_version master Version V15' --pics-output '/Users/renejosefsen/Developer/GitData/connectedhomeip/src/python_testing/DeviceMapping/output' --commissioning-method ble-thread --discriminator <DESCRIMINATOR> --passcode <PASSCODE> --thread-dataset-hex <DATASET_AS_HEX> --paa-trust-store-path credentials/development/paa-root-certs" | ||
``` | ||
--paa-trust-store-path credentials/production/paa-root-certs | ||
``` | ||
|
||
If a "DUT" has alreasy ben commissioned, run the script using the following command: | ||
"python3 'src/python_testing/PICSGenerator.py' --cluster-data '/Users/renejosefsen/Developer/GitData/connectedhomeip/src/python_testing/DeviceMapping/clusterData/Specification_version master da1249d.json' --pics-template '/Users/renejosefsen/Developer/GitData/connectedhomeip/src/python_testing/DeviceMapping/PICS/XML_version master Version V15' --pics-output '/Users/renejosefsen/Developer/GitData/connectedhomeip/src/python_testing/DeviceMapping/output'" | ||
If a device has alreasy been commissioned, the tool can be executed like this: | ||
|
||
- --cluster-data is the absolute path to the Specification_version master da1249d.json file | ||
- --pics-template is the absolute path to the folder contaning the PICS templates (currently tested with V15) | ||
- --pics-output is the absolute path to the output folder to be used | ||
``` | ||
python3 'src/python_testing/PICSGenerator.py' --cluster-data <pathToClusterJson> --pics-template <pathToPicsTemplateFolder> --pics-output <outputPath> | ||
``` |