-
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
[Platform] Failed encoding invalid payload with setupCommissioningSession #31129
Comments
The payload cannot be represented as either a QR code (does not have a discovery capabilities bitmask set) or a numeric code (has a long discriminator), which is why it's considered invalid. I'll change the init bits to not create an invalid payload, but in the meantime setting its |
…oads. It's using a long discriminator, so has to have discovery capabilities available. Fixes project-chip#31129
@bzbarsky-apple We have two senarios:
We are unsure which function to use and how to pass in the pairing code/passcode. |
@law-ko For that first scenario, when a user enters a "pairing code" (I assume you mean a Matter numeric code), you can create a MTRSetupPayload directly from it, right? Something like:
That works for both QR codes and numeric codes. For the second scenario... I am confused about what the question is. If you use the API you linked to, then the MTRSetupPayload you should for setting up the commissioning session use will be returned from the API, no?
Just so we are on the same page: those are not the same thing, right? A pairing code is either a QR code or numeric code that encodes the passcode and some other information (e.g. the discriminator). |
In general, you should probably not be using |
@bzbarsky-apple |
@bzbarsky-apple Same function |
@bzbarsky-apple I see this issue is closed, are you able to provide some information that I asked above? |
@law-ko If you know the device is on the network already, setting the discoveryCapabilities to on-network only should work, I would think... |
@bzbarsky-apple Is there any chance to know if the device is on the network already based on any MTR commands or based on the payloadCode? |
If you have a QR code, then "maybe", since that can indicate how the device is discoverable. With a numeric code, no. I'm not sure what you mean by "MTR commands". Do you mean "Matter framework APIs that do not involve having a secure connection to the device"? If so, there are no such APIs that can tell you the device is on-network. |
* Darwin Tests: Make MTRSetupPayload initialization test reliable Also rename the tests to more conventional names. * Add regression test for #31129 * Add regression test for #23357 * Add test for NSSecureCoding support * Darwin: Tidy up MTRSetupPayload headers / includes * Darwin: return nil on error in MTRSetupPayload getAllOptionalVendorData
Reproduction steps
We are trying to commission a device without using QRcode, but Matter returns invalid payload, which we do not know what information is missing.
Setup:
The log shows:
Why does generating the manual pairing code failed?
Thank you.
Platform
darwin
Platform Version(s)
16.4
Type
Manually tested with SDK
(Optional) If manually tested please explain why this is only manually tested
Tested on iPhone with 16.4.1
Anything else?
No response
The text was updated successfully, but these errors were encountered: