-
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
chip-tool pairing ble-wifi command fails #6978
Comments
This is failing in message counter verification on the esp32 side, as @pan-apple points out:
Presumably partially fallout from #5389. It sounds like the controller is losing track of its counter whole continuing to use the same PASE session, which is of course not an OK thing to do. |
@kghost - for the message counter implementation |
Let me check. |
Reproduced failure in pairing locally (after rebuilding docker image for vscode). I get a " <0x1b>[0;31mE (21838) chip[EM]: Accept FAILED, err = CHIP Error 4000047 (0x003D092F): Invalid argument<0x1b>[0m␍␊" which is very unhelpful:
|
I have reproduced the problem, let me fix it. |
To be clear, I think @pan-apple was looking into this, and in particular into making sure the controller side doesn't lose track of the counter state for its PASE session. |
We also need to add unit tests for PeerMesssageCounter.h (and more ... but if we look at message counter synchronization, we need unit tests as well) |
The problem is that the client (chip-tool) is creating a new connection, but the counter in the new connection has been reset to 1. so the server won't accept any message from the client. |
I am also seeing the exact same issue on the latest CHIP code in all-clusters-app for Rendezvous BLE, Wi-Fi as well as Bypass. |
Is there any fix (can be unmerged) that I can apply to get myself unblocked on this issue? |
There seem to be multiple issues. I have changes that fix the counter sync issue in a local brnach but even after that the network provisioning commands fail because BLE is timing out. |
With a workaround for #7012 (comment out the @arunbharadwaj is that good enough to unblock you, perhaps? |
Hi @bzbarsky-apple I tried with the latest commit + change of commenting Device side:
Python device controller side:
|
in the device side log is probably the next thing that's broken. @sagar-apple I seem to recall you were working on this; is there a WIP thing you can point people to? |
Sorry, I've been away these past few days. My WIP changes are here sagar-apple@1cb9812. These changes are basically just storing the last local and peer counter values when a CHIPDevice is destroyed. The next time the a connection is reestablished I go and update the counter values. I was running into more issues after that though and so I never cleaned up and pushed my changes out. I think at this point, I can probably put the counter fix up and revisit the remaining failures after. |
@sagar-apple Just have a short conversation with @erjiaqing , Can you try #7041 over your message counter persistent change, and try it again to check if it is fixed. |
@kghost, I cherry-picked @sagar-apple 's commit from his tree (1cb98120) and #7041 on top of it. Pairing seems to work. After pairing, tried onoff toggle. The board led seems to toggle but the esp32 logs point to some failures related to spake2+ handshake and message counter verify failure. I have attached the logs here. Please take a look. |
I tried #7041 with #7106 and I'm basically still seeing the same network provisioning failures. The exchange we use to send the add network command is being closed by a "race" between us closing the connection because we released the device at the end of pairing + sending out this new add network command immediately after. This is a snippet from the controller/commissioner.
|
@sagar-apple That sounds like #7012 yes? |
Yup yup that's it. |
@sagar-apple @bzbarsky-apple Even though we are seeing errors on the device console related to
|
@dhrishi There are two messages being sent; the first one ends up with a failure response, the second with a success response. It's hard to say what those mean without knowing what messages are sent (so either logging that on the controller side or seeing the corresponding device-side log). |
The second response is an issue with IM. In theory you can safely ignore it. I think @erjiaqing has a patch to solve that. |
We're in progress of reviewing older issues. Is this still an issue given how old the SDK this was tested against? Please re-open if so. Thanks! |
Problem
When I run
chip-tool pairing ble-wifi SSID PASSWORD 112233 20202021 3840
pairing fails to complete successfullySteps to reproduce:
chiptool.may18.txt
esp32.may18.txt
Proposed Solution
@vivien-apple @bzbarsky-apple @pan-apple @dhrishi @andy31415
The text was updated successfully, but these errors were encountered: