-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SQA] Door lock test cases failed due to "Invalid CASE parameter" #17244
Comments
Some questions, @Survensa:
|
Oh, and:
"eventually" here means "after some code gets changed to require time-based certificate validation". Which has not happened, so those messages are not relevant to whatever is going on here. |
Note : Used recent commit 3af5410 ,here I am able to pair with onnetwork and not faced the issue but I am not able to pair using ble-wifi platform. |
No, I mean what hardware/OS? In terms of trying to reproduce, it's best if people are using a setup as close to the one you have as possible. |
Oh, and when you say "doorlock app", does that mean the thing in |
@bzbarsky-apple it is |
Alright, I have tried to reproduce on that SHA for a while as follows:
Maybe this is specific to the ble-wifi case, but that seems pretty doubtful. But just to check:
|
@bzbarsky-apple Door-lock-app work fine on I have attached both DUT and CNTRL log for the "CASE Parameter" error . |
I am finding this very hard to believe; once we finish commissioning the two cases should act identically. What other differences are there between the ble-wifi and onnetwork cases? I never did see an answer to the "what hardware/OS?" question.... Looking at the logs, the key part is this, on the server:
and then it logs that it failed out because there is no NOC for the fabric on the device:
(That's in FabricInfo::GetNOCCert.) So we had an IPK match the group storage for some fabic index, but the actual fabric for that index was not initialized properly... Just to check: are the client and server running on the same hardware or different pieces of hardware? |
@bzbarsky-apple Using two different raspberrypi, one as DUT and other as CNTRL. |
OK. @Survensa Can you step through in a debugger on the CASE responder and see what's actually going on? What does the fabric table look like? Is it possible the storage is somehow getting reset on the rPI running the CASE responder? |
I had run the same commands mentioned above and had the same findings as well with no failures when Steps Ran
Test Setup1st RasPi: 2nd RasPi: Lines of InterestLines of Interest:
Logs |
When pairing over Summary of Findings( 1st Attempt: Successful
2nd Attempt: Fail (Invalid CASE parameter)
3rd Attempt: Fail (Timeout)
Steps Ran
Test Setup1st RasPi: 2nd RasPi: Logsble_wifi_chip-tool_issue_17244.txt |
@liamgonyea Thank you! Those logs make it pretty clear what's going on here:
The "we think this is thread" issue is suspiciously like #17477 but in reverse. |
OK, so Which means that the door lock app is not actually running a useful network commissioning server at all. But it does claim to implement the cluster, and has a FeatureMap attribute with default value 2: see
So that's what we end up with here. |
…oning. When AutoCommissioner::GetNextCommissioningStageInternal moves out of the kSendNOC state, it can end up in one of three states: kWiFiNetworkSetup, kThreadNetworkSetup, and kCleanup. This third case happens if we don't have credentials for the network technology the commissionee supports. In that case, we set the error outparam and proceed to cleanup. Unfortunately, the caller completely ignores the outparam, except for logging. So we get situations like project-chip#17244 where the log looks like this: CHIP:CTL: Finished commissioning step 'SendNOC' with error '../../../examples/chip-tool/third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1390: Success' CHIP:CTL: Required network information not provided in commissioning parameters CHIP:CTL: Parameters supplied: wifi (yes) thread (no) CHIP:CTL: Device supports: wifi (no) thread(yes) CHIP:CTL: Going from commissioning step 'SendNOC' with lastErr = '../../../examples/chip-tool/third_party/connectedhomeip/src/controller/AutoCommissioner.cpp:180: CHIP Error 0x0000002F: Invalid argument' --> 'Cleanup' CHIP:CTL: Performing next commissioning step 'Cleanup' with completion status = '../../../examples/chip-tool/third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1390: Success' CHIP:CTL: Finished commissioning step 'Cleanup' with error '../../../examples/chip-tool/third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1497: Success' CHIP:TOO: Device commissioning completed with success and that last line shows the pairing delegate was notified that commissioning completed successfully, even though we bailed out partway through. The fix is to store the error in our completionStatus. With this change, the log ends up looking like this: CHIP: [CTL] Successfully finished commissioning step 'SendNOC' CHIP: [CTL] Required network information not provided in commissioning parameters CHIP: [CTL] Parameters supplied: wifi (no) thread (yes) CHIP: [CTL] Device supports: wifi (yes) thread(no) CHIP: [CTL] Going from commissioning step 'SendNOC' with lastErr = '../../../examples/chip-tool/third_party/connectedhomeip/src/controller/AutoCommissioner.cpp:203: CHIP Error 0x0000002F: Invalid argument' -> 'Cleanup' CHIP: [CTL] Performing next commissioning step 'Cleanup' with completion status = '../../../examples/chip-tool/third_party/connectedhomeip/src/controller/AutoCommissioner.cpp:203: CHIP Error 0x0000002F: Invalid argument' CHIP: [TOO] Device commissioning Failure: ../../../examples/chip-tool/third_party/connectedhomeip/src/controller/AutoCommissioner.cpp:203: CHIP Error 0x0000002F: Invalid argument and we see the PairingDelegate is notified with an error status, as expected. Another option would have been to add a new commissioning step for "no network credentials" and set the completion status to error from that. That would have the benefit of also setting the failedStage in the completion status, which we can't easily set right now because part of the problem is that we don't actually know what stage to proceed to and hence which stage to deem as having failed.
…oning. (#17662) When AutoCommissioner::GetNextCommissioningStageInternal moves out of the kSendNOC state, it can end up in one of three states: kWiFiNetworkSetup, kThreadNetworkSetup, and kCleanup. This third case happens if we don't have credentials for the network technology the commissionee supports. In that case, we set the error outparam and proceed to cleanup. Unfortunately, the caller completely ignores the outparam, except for logging. So we get situations like #17244 where the log looks like this: CHIP:CTL: Finished commissioning step 'SendNOC' with error '../../../examples/chip-tool/third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1390: Success' CHIP:CTL: Required network information not provided in commissioning parameters CHIP:CTL: Parameters supplied: wifi (yes) thread (no) CHIP:CTL: Device supports: wifi (no) thread(yes) CHIP:CTL: Going from commissioning step 'SendNOC' with lastErr = '../../../examples/chip-tool/third_party/connectedhomeip/src/controller/AutoCommissioner.cpp:180: CHIP Error 0x0000002F: Invalid argument' --> 'Cleanup' CHIP:CTL: Performing next commissioning step 'Cleanup' with completion status = '../../../examples/chip-tool/third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1390: Success' CHIP:CTL: Finished commissioning step 'Cleanup' with error '../../../examples/chip-tool/third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1497: Success' CHIP:TOO: Device commissioning completed with success and that last line shows the pairing delegate was notified that commissioning completed successfully, even though we bailed out partway through. The fix is to store the error in our completionStatus. With this change, the log ends up looking like this: CHIP: [CTL] Successfully finished commissioning step 'SendNOC' CHIP: [CTL] Required network information not provided in commissioning parameters CHIP: [CTL] Parameters supplied: wifi (no) thread (yes) CHIP: [CTL] Device supports: wifi (yes) thread(no) CHIP: [CTL] Going from commissioning step 'SendNOC' with lastErr = '../../../examples/chip-tool/third_party/connectedhomeip/src/controller/AutoCommissioner.cpp:203: CHIP Error 0x0000002F: Invalid argument' -> 'Cleanup' CHIP: [CTL] Performing next commissioning step 'Cleanup' with completion status = '../../../examples/chip-tool/third_party/connectedhomeip/src/controller/AutoCommissioner.cpp:203: CHIP Error 0x0000002F: Invalid argument' CHIP: [TOO] Device commissioning Failure: ../../../examples/chip-tool/third_party/connectedhomeip/src/controller/AutoCommissioner.cpp:203: CHIP Error 0x0000002F: Invalid argument and we see the PairingDelegate is notified with an error status, as expected. Another option would have been to add a new commissioning step for "no network credentials" and set the completion status to error from that. That would have the benefit of also setting the failedStage in the completion status, which we can't easily set right now because part of the problem is that we don't actually know what stage to proceed to and hence which stage to deem as having failed.
Door lock cases were failed due to "Invalid CASE parameter" in few seconds after it has been paired.
During any "read" actions after it has been paired, Chip-Tool log thrown an error "The device does not support GetClock_RealTimeMS() API. This will eventually result in CASE session setup failures."
Following the above error, it has failed with "Invalid CASE parameter" for the further commands from Chip-tool.
Entire log has been attached. It contains few read attribute commands & the failure of the commands at the end of the log.
Error log file :
DL timeout error log.txt
The text was updated successfully, but these errors were encountered: