rs-matter icon indicating copy to clipboard operation
rs-matter copied to clipboard

argument type of `print_pairing_code_and_qr()`

Open thekuwayama opened this issue 1 year ago • 5 comments

Hello there,

I have a suggestion regarding the print_pairing_code_and_qr() function. Currently, it accepts comm_data: &CommissioningData as an argument. However, according to section 5.1 of the Matter-1.0-Core-Specification, both MPC and QR Code require a passcode.

The CommissioningData has either VerifierOption::Password or VerifierOption::Verifier. In my understanding, passing VerifierOption::Verifier instead of VerifierOption::Password as an argument to print_pairing_code_and_qr() will result in a runtime error.

To avoid this issue, I recommend passing VerifierOption::Password as the argument to print_pairing_code_and_qr() instead.

thekuwayama avatar Jun 28 '23 16:06 thekuwayama