Skip to content
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

Print pin code and long discriminator on QR screen #7514

Merged
merged 2 commits into from
Jun 10, 2021

Conversation

cecille
Copy link
Contributor

@cecille cecille commented Jun 10, 2021

This is very helpful info, and it's already part of the QR code
string anyway.

Problem

Setup PIN code is hard to find. It's part of the QR code, but that's hard to parse as a human.

Change overview

M5 all cluster app only - Prints setup pin code and long discriminator when you go to the QR code screen.

Testing

Manual - went to QR code screen, saw prints.

This is very helpful info, and it's already part of the QR code
string anyway.
uint16_t discriminator;
if (ConfigurationMgr().GetSetupDiscriminator(discriminator) == CHIP_NO_ERROR)
{
ESP_LOGI(TAG, "Setup discriminator: %u (0x%x)", discriminator, discriminator);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @cecille This is helpful. Just a suggestion: Can you add the print statements in the function createSetupPayload where the discriminator and the setup pin code are already populated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure - I'll add them there too. I want them on the QR code screen as well so I don't have to go back in the logs when I'm looking for them.

Means other devices can see it too.
@github-actions
Copy link

Size increase report for "esp32-example-build" from e0c7b6d

File Section File VM
chip-all-clusters-app.elf .flash.text 132 132
chip-all-clusters-app.elf .flash.rodata 96 96
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
.debug_info,0,369
.debug_line,0,353
.flash.text,132,132
.debug_loc,0,123
.flash.rodata,96,96
.debug_ranges,0,16
.debug_str,0,3
[Unmapped],0,-96

Comparing ./master_artifact/chip-pigweed-app.elf and ./pull_artifact/chip-pigweed-app.elf:

sections,vmsize,filesize


@andy31415 andy31415 merged commit abe427b into project-chip:master Jun 10, 2021
@cecille cecille deleted the add_setup_pin_code branch July 23, 2021 19:34
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
* Print pin code and long discriminator on QR screen

This is very helpful info, and it's already part of the QR code
string anyway.

* Also add prints at QR code generation.

Means other devices can see it too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants