-
Notifications
You must be signed in to change notification settings - Fork 139
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
Support adding hotspot using (dynamic) QR-code #498
Comments
The Helium app could have a link for step 1 to be:
Where Once the vendor specific onboarding (e.g. step 2) is done, the vendor specific code should send back the transaction to the Helium app in a standard way (step 3). The QR code idea is very good. It could contain:
where
Then the URL would be:
The transaction could be converted to base64url for URL safety:
This would allow the Helium app to onboard a QR code, but also accept cross-apps links (e.g. from vendor app to helium app, or from website to helium app). This URL format could also potentially accept other actions in the future (should Helium want that), for example:
Steps 4-6 are handled by the Helium app, including sanity check, signature verification or other input validation, as well as user confirmation of the desired transaction. Should that be required / requested by Helium, some other metadata could be added to the edit 2021-05-05: initial post had base58 instead of base64url |
I think this works pretty well. The one recommendation I'd have would be to consider base64url instead of base58 but I don't have a strong feeling. I wonder how these URLs fit into the existing QR code scanning infrastructure we have in the app. |
I'm perfectly fine with having the link in step 1, just make it non mandatory (so just scanning the QR-code or using the app-link directly also works). Agree with @abhay let's use base64url-encoding (that is more commonly used and it's trivial convert to and from base64) |
Now that I think of it a bit more @BenoitDuffez I have some questions/considerations regarding Step 1:
|
Of course, I used base58 but meant base64url. Thank you for the correction. For step 1 if you have different flows depending on the hardware model, in my opinion it makes sense to have vendor choice, and then model (model A uses standard BLE flow, model B uses link, model C uses QR scan). As far as Kerlink is concerned we'd have only one way to onboard our gateways, so the model selection step is useless. That would be
etc |
The divergent onboarding flow will start after selecting a manufacturer, but I can see a world where you're presented with Bluetooth pairing instructions, and a secondary option to onboard via QR code, which gives makers flexibility to support both bluetooth-enabled and not-enabled gateways. I'm a fan of this new direction. We already have expanded how the app processes QR codes with this feature: #423 and can easily adapt and expand that to onboarding. |
QR code scanning requires the user to use a computer and fiddle around to find the IP address or the host name of the gateway on the LAN, which is very bad in terms of UX for step 1. Redirecting to an URL instead allows to onboard only with phone, and if said URL is captured by another app, it allows to use mDNS and a very nice UX. Please consider using a custom scheme URL to finish the onboarding as it allows the user to avoir the use of a computer and the IP lookup. |
@cokes518 hi Coco, what's the latest on this topic? Can you support QR code scanning? Can you support app linking with a custom scheme? How can I help? |
@BenoitDuffez The app doesn't support QR onboarding yet, but this is the general direction that the app will support: https://docs.helium.com/mine-hnt/hotspot-makers/hotspot-qr-onboarding/ If you can help generate a QR code, the team can start work off of that. App linking is not an issue, we're happy to review PRs and support wherever needed. |
Not sure I understand what help you need with "generate a QR code"? Do you mean something like that? $ echo CrQBCiEBUan9QkkHYl0SdEn8YB+bwV3BrFjQi+aZagK1JE7z3HASIQCeOSBaMKkT23wHI+IHE3pxUu1pKx368C7ICDC0fBoCPSJHMEUCIQDzkSfX3Gv568QZidGL1V1w0m/2QSTRYrBE1qC++oG3wQIgAT7UnqLoLIJjJ5aoC3iAmcoUDnG7B09O9nQioTp/ZRQqIQHjoSohWDrb6kLVXHXlLznNNX43ZjjPoJrP7XiwXGmyjUAB \
| base64 -d \
| qrencode -8 -o qr.png |
I'm confused, only the wallet owner may sign the transaction, and the Maker does not have access to it. I'm assuming that the QR code contains the transaction signed only by the miner, and the app then needs to sign it with the user wallet and then submits it for final signature/blockchain submission. Can you confirm that the Maker will not gather the owner signature? |
That seems like the best way. I.e. the actual signing from the owners wallet and submission to blockchain is done only after scanning the QR code from the miner. And from the screenshots on that page it appears like that was the suggestion. Maybe just wrong in the text? |
Hi @matthewcarlreetz are you close to completion? I'd like to add our Hotspot in the list so I'd rather wait until it's merged to do so. Let me know. Thanks |
Hi @BenoitDuffez . The PR is ready, just one last minute thing to add... We are planning to put QR onboarding behind a feature flag so that Helium and makers can test before going live to everyone. I'm getting started on that work right now. |
OK good. I started to work on adding our hotspots to the app, not sure how it would be convenient for you to do that? I could fork your feature branch and commit to this. Any other way would be fine for me too. |
I think the best way would be to fork this branch so you can create your maker files. I should be merging this branch within the next day. Once it goes in you could rebase or cherry-pick and make a PR into main. |
Awesome thanks. |
one more thing @matthewcarlreetz, I saw that the app supports links with the |
I found about the transaction decode failure: thrown by protobuf, caused by a wrong transaction data being parsed on my end (base64 instead of base64url). |
Can we add a way to replicate the add_gateway behaviour over BLE with a "dynamic” QR-code to the app? So:
The text was updated successfully, but these errors were encountered: