Generating a QR code

User avatar
fasani
Posts: 197
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Generating a QR code

Postby fasani » Tue Aug 24, 2021 9:35 am

I would like in the future that RainMaker provides a callback to render a QR Code for any Firmware.

Wanted to ask if someone already did it, I remember reading something about this here and I've searched for QR code in this forum but I cannot find it. What I want to do is this:
  • Catch app_wifi: Provisioning started event and render the QR code with my epaper component. Will be cool to make a custom function based on qrcode.c printQr called printToDisplay() in my main.c so it receives the text and renders it to the display.
  • If the process get's stuck somewhere catch another events to notify the user.
What I would like to do essentially is to display the information to give the user a smooth onboarding. Right now I'm sending my displays with the QR in printed page and that's odd when it's a display.

Can you give me any hints on what will be the best way to integrate this?
It's enough with the existing qrcode library or it's the best to use an additional library that is prepared for display output?

UPDATE: Found this related question that gives some tips on how to do it. But actually is awkward to do it that way, I would like to have a callback function, where I can implement this in. The ideal way would be to have an Event that get's fired when app_wifi_print_qr get's called.
Otherwise I need to add Display libraries also in app_wifi.cpp that is really not the best way, since I'm duplicating code and initializing the display where I don't have to, just to print the QR.
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

User avatar
fasani
Posts: 197
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Re: Generating a QR code

Postby fasani » Sat Sep 18, 2021 6:38 am

Any news or move in this direction ESP Rainmaker team?
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

Who is online

Users browsing this forum: No registered users and 78 guests