Is the QR Code fixed? Is there a mechanism for change?

HI,

From the beginning until now, when I need to test,

I have directly printed out the QR Code in the web page and pasted it on the IPAD cover,

so that it is more convenient to add the device to the home app, and you can scan it directly when you open the camera.

But one day, I suddenly changed the QR Code. I don't know why the change was made, but I could not scan into the home app at the beginning,

and the connection was not displayed in the home app. Later, I printed a message through log and opened the URL of the QR Code in the web page,

only to find that it was different from the one I had before.

Therefore, I would like to know what is the basis for the change of the QR Code? Or based on what?

PIC1:

PIC2:

Best regards,

chuck

Parents
  • Hi Chuck,

    The QR code is defined by the factory data, where the main fields are version, vendor ID, product ID, custom flow, commissioning mode, discriminator, and passcode. It can also consist of optional vendor data. Changing the value of one any of these will change the QR code.

    You can inspect the fields of the setup QR code with chip-tool using the command ./chip-tool payload parse-setup-payload <payload>.
    I ran this command for the two QR codes in your pictures:

    As you can see, the discriminator is different for the two setup QR codes, 3841 and 3840.

    Best regards,
    Marte

Reply
  • Hi Chuck,

    The QR code is defined by the factory data, where the main fields are version, vendor ID, product ID, custom flow, commissioning mode, discriminator, and passcode. It can also consist of optional vendor data. Changing the value of one any of these will change the QR code.

    You can inspect the fields of the setup QR code with chip-tool using the command ./chip-tool payload parse-setup-payload <payload>.
    I ran this command for the two QR codes in your pictures:

    As you can see, the discriminator is different for the two setup QR codes, 3841 and 3840.

    Best regards,
    Marte

Children
Related