[Telink] Allow to erase entire NVS on factory reset by default; Fix IDM-7.1 test. (Cherry-pick #23434 & #23676) #23677
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Commissioning Failed After Opening Multiple Commissioning Windows
Cherrypick partly #23434
Cherrypick #23676
Change overview
Allow to erase entire NVS on factory reset by default for Telink platform
Testing
Tested manually with chip-tool.
Steps:
Use chip-tool to perform commissioning with operational dataset in Terminal 1 and ensure our Matter device joins the network.
./chip-tool pairing ble-thread 1 hex:${DATASET} ${PIN_CODE}
In Terminal 1, use the following command to open a new ECM commissioning window:
./chip-tool pairing open-commissioning-window 1 1 400 2000 2001
This command will also generate and print out a manual pairing code (16384853021). The code will be used in the next step.
Open a new terminal 2. Perform commissioning and then open a new ECM Commissioning Window 2:
./chip-tool pairing code 2 16384853021 --commissioner-name beta
./chip-tool pairing open-commissioning-window 2 1 400 2000 2001 --commissioner-name beta
It will generate a new manual pairing code (16260155555).
Open a new terminal 3. Perform commissioning and then open a new ECM Commissioning Window 3:
./chip-tool pairing code 3 16260155555 --commissioner-name gamma
./chip-tool pairing open-commissioning-window 3 1 400 2000 2001 --commissioner-name gamma
A new manual pairing code (15433908150).
Open a new terminal 4. Perform commissioning and then open a new ECM Commissioning Window 4:
./chip-tool pairing code 4 15433908150 --commissioner-name 4
./chip-tool pairing open-commissioning-window 4 1 400 2000 2001 --commissioner-name 4
A new manual pairing code (16322914702).
Open a new terminal 5. Perform commissioning and then open a new ECM Commissioning Window 5:
./chip-tool pairing code 5 16322914702 --commissioner-name 5
./chip-tool pairing open-commissioning-window 5 1 400 2000 2001 --commissioner-name 5
After opening 5 ECM commissioning windows, just press the key 1 to perform factory reset.
Open a new terminal 6. Use chip-tool to perform commissioning with operational dataset in the new terminal.
./chip-tool pairing ble-thread 2 hex:${DATASET} ${PIN_CODE} 2001