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

QRCode payload generator. #44

Closed
wants to merge 1 commit into from
Closed

QRCode payload generator. #44

wants to merge 1 commit into from

Conversation

bhaskar-apple
Copy link
Contributor

This patch includes code to generate a base45 encoded QR code given a setup payload.
Here is a brief description of some of the classes / functions -

  1. QRCodeSetupPayload - A class representing a payload that gets encoded in a QR code.
  2. QRCodeSetupPayloadGenerator - A class that generates a base45 encoded string given a QRCodeSetupPayload object
  3. SetupCodeUtils - Utility functions to encode a base45 string.

The encoding of the binary data to a base45 character set is done as follows -
Every 2 bytes (16 bits) of binary source data are encoded to 3 characters of the Base-45 alphabet.
If an odd number of bytes are to be encoded, the remaining single byte is encoded to 2 characters of the Base-45 alphabet.

This patch includes code to generate a base45 encoded QR code given a setup payload.
Here is a brief description of some of the classes / functions -
1. QRCodeSetupPayload - A class representing a payload that gets encoded in a QR code.
2. QRCodeSetupPayloadGenerator - A class that generates a base45 encoded string given a QRCodeSetupPayload object
3. SetupCodeUtils - Utility functions to encode a base45 string.

The encoding of the binary data to a base45 character set is done as follows -
Every 2 bytes (16 bits) of binary source data are encoded to 3 characters of the Base-45 alphabet.
If an odd number of bytes are to be encoded, the remaining single byte is encoded to 2 characters of the Base-45 alphabet.
@bhaskar-apple
Copy link
Contributor Author

Opened this pre-maturely / errorneously

@bhaskar-apple bhaskar-apple deleted the bhaskar-apple/qrcode branch April 13, 2020 22:21
fkjagodzinski pushed a commit to fkjagodzinski/connectedhomeip that referenced this pull request Feb 15, 2021
vscode: Use pan2048/chip-build-mbed-os image
restyled-io bot pushed a commit that referenced this pull request Jan 14, 2022
jmartinez-silabs referenced this pull request in SiliconLabs/matter Aug 18, 2022
…ootloader images

Merge in WMN_TOOLS/matter from v0.2.0_release_doc_update to silabs

Squashed commit of the following:

commit eeffbad47a6e0bd59251d50b28904a69d557ffc5
Author: Rehan Rasool <[email protected]>
Date:   Tue Aug 16 18:24:53 2022 -0400

    Fix typo

commit 02bab78a4d4f32a211a52fd5a886b9bdc285eb21
Author: Ezra Hale <[email protected]>
Date:   Tue Aug 16 16:06:49 2022 -0400

    updated links on artifacts page and info on using bootloader images
jmartinez-silabs referenced this pull request in SiliconLabs/matter Sep 8, 2022
…ootloader images

Merge in WMN_TOOLS/matter from v0.2.0_release_doc_update to silabs

Squashed commit of the following:

commit eeffbad47a6e0bd59251d50b28904a69d557ffc5
Author: Rehan Rasool <[email protected]>
Date:   Tue Aug 16 18:24:53 2022 -0400

    Fix typo

commit 02bab78a4d4f32a211a52fd5a886b9bdc285eb21
Author: Ezra Hale <[email protected]>
Date:   Tue Aug 16 16:06:49 2022 -0400

    updated links on artifacts page and info on using bootloader images
lpbeliveau-silabs pushed a commit to lpbeliveau-silabs/connectedhomeip that referenced this pull request Sep 12, 2022
…o on using bootloader images

Merge in WMN_TOOLS/matter from v0.2.0_release_doc_update to silabs

Squashed commit of the following:

commit eeffbad47a6e0bd59251d50b28904a69d557ffc5
Author: Rehan Rasool <[email protected]>
Date:   Tue Aug 16 18:24:53 2022 -0400

    Fix typo

commit 02bab78a4d4f32a211a52fd5a886b9bdc285eb21
Author: Ezra Hale <[email protected]>
Date:   Tue Aug 16 16:06:49 2022 -0400

    updated links on artifacts page and info on using bootloader images
mkardous-silabs referenced this pull request in SiliconLabs/watt-sandbox Oct 6, 2022
…ootloader images

Merge in WMN_TOOLS/matter from v0.2.0_release_doc_update to silabs

Squashed commit of the following:

commit eeffbad47a6e0bd59251d50b28904a69d557ffc5
Author: Rehan Rasool <[email protected]>
Date:   Tue Aug 16 18:24:53 2022 -0400

    Fix typo

commit 02bab78a4d4f32a211a52fd5a886b9bdc285eb21
Author: Ezra Hale <[email protected]>
Date:   Tue Aug 16 16:06:49 2022 -0400

    updated links on artifacts page and info on using bootloader images
nipatel-silabs pushed a commit to nipatel-silabs/connectedhomeip that referenced this pull request Oct 19, 2022
…o on using bootloader images

Merge in WMN_TOOLS/matter from v0.2.0_release_doc_update to silabs

Squashed commit of the following:

commit eeffbad47a6e0bd59251d50b28904a69d557ffc5
Author: Rehan Rasool <[email protected]>
Date:   Tue Aug 16 18:24:53 2022 -0400

    Fix typo

commit 02bab78a4d4f32a211a52fd5a886b9bdc285eb21
Author: Ezra Hale <[email protected]>
Date:   Tue Aug 16 16:06:49 2022 -0400

    updated links on artifacts page and info on using bootloader images
mkardous-silabs referenced this pull request in mkardous-silabs/connectedhomeip Oct 24, 2022
…ootloader images

Merge in WMN_TOOLS/matter from v0.2.0_release_doc_update to silabs

Squashed commit of the following:

commit eeffbad47a6e0bd59251d50b28904a69d557ffc5
Author: Rehan Rasool <[email protected]>
Date:   Tue Aug 16 18:24:53 2022 -0400

    Fix typo

commit 02bab78a4d4f32a211a52fd5a886b9bdc285eb21
Author: Ezra Hale <[email protected]>
Date:   Tue Aug 16 16:06:49 2022 -0400

    updated links on artifacts page and info on using bootloader images
jculbert pushed a commit to jculbert/connectedhomeip that referenced this pull request Jan 10, 2023
…o on using bootloader images

Merge in WMN_TOOLS/matter from v0.2.0_release_doc_update to silabs

Squashed commit of the following:

commit eeffbad47a6e0bd59251d50b28904a69d557ffc5
Author: Rehan Rasool <[email protected]>
Date:   Tue Aug 16 18:24:53 2022 -0400

    Fix typo

commit 02bab78a4d4f32a211a52fd5a886b9bdc285eb21
Author: Ezra Hale <[email protected]>
Date:   Tue Aug 16 16:06:49 2022 -0400

    updated links on artifacts page and info on using bootloader images
Thirsrin pushed a commit to Thirsrin/connectedhomeip that referenced this pull request Jul 12, 2023
…o on using bootloader images

Merge in WMN_TOOLS/matter from v0.2.0_release_doc_update to silabs

Squashed commit of the following:

commit eeffbad47a6e0bd59251d50b28904a69d557ffc5
Author: Rehan Rasool <[email protected]>
Date:   Tue Aug 16 18:24:53 2022 -0400

    Fix typo

commit 02bab78a4d4f32a211a52fd5a886b9bdc285eb21
Author: Ezra Hale <[email protected]>
Date:   Tue Aug 16 16:06:49 2022 -0400

    updated links on artifacts page and info on using bootloader images
shgutte pushed a commit to shgutte/connectedhomeip that referenced this pull request Oct 5, 2023
…o on using bootloader images

Merge in WMN_TOOLS/matter from v0.2.0_release_doc_update to silabs

Squashed commit of the following:

commit eeffbad47a6e0bd59251d50b28904a69d557ffc5
Author: Rehan Rasool <[email protected]>
Date:   Tue Aug 16 18:24:53 2022 -0400

    Fix typo

commit 02bab78a4d4f32a211a52fd5a886b9bdc285eb21
Author: Ezra Hale <[email protected]>
Date:   Tue Aug 16 16:06:49 2022 -0400

    updated links on artifacts page and info on using bootloader images
shgutte pushed a commit to shgutte/connectedhomeip that referenced this pull request Jan 11, 2024
…o on using bootloader images

Merge in WMN_TOOLS/matter from v0.2.0_release_doc_update to silabs

Squashed commit of the following:

commit eeffbad47a6e0bd59251d50b28904a69d557ffc5
Author: Rehan Rasool <[email protected]>
Date:   Tue Aug 16 18:24:53 2022 -0400

    Fix typo

commit 02bab78a4d4f32a211a52fd5a886b9bdc285eb21
Author: Ezra Hale <[email protected]>
Date:   Tue Aug 16 16:06:49 2022 -0400

    updated links on artifacts page and info on using bootloader images
suveshpratapa pushed a commit to suveshpratapa/connectedhomeip that referenced this pull request May 22, 2024
…o on using bootloader images

Merge in WMN_TOOLS/matter from v0.2.0_release_doc_update to silabs

Squashed commit of the following:

commit eeffbad47a6e0bd59251d50b28904a69d557ffc5
Author: Rehan Rasool <[email protected]>
Date:   Tue Aug 16 18:24:53 2022 -0400

    Fix typo

commit 02bab78a4d4f32a211a52fd5a886b9bdc285eb21
Author: Ezra Hale <[email protected]>
Date:   Tue Aug 16 16:06:49 2022 -0400

    updated links on artifacts page and info on using bootloader images
mykrupp pushed a commit to mykrupp/connectedhomeip that referenced this pull request Jul 18, 2024
…o on using bootloader images

Merge in WMN_TOOLS/matter from v0.2.0_release_doc_update to silabs

Squashed commit of the following:

commit eeffbad47a6e0bd59251d50b28904a69d557ffc5
Author: Rehan Rasool <[email protected]>
Date:   Tue Aug 16 18:24:53 2022 -0400

    Fix typo

commit 02bab78a4d4f32a211a52fd5a886b9bdc285eb21
Author: Ezra Hale <[email protected]>
Date:   Tue Aug 16 16:06:49 2022 -0400

    updated links on artifacts page and info on using bootloader images
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants