Skip to content

QR Code scanner #9913

Closed
Closed

Description

@luke-jr

Core is currently missing any way to scan QR Codes. We should add this.

Activity

  1. TheBlueMatt commented on Mar 4, 2017

    @TheBlueMatt
    Contributor
  2. luke-jr commented on Mar 4, 2017

    @luke-jr
    ContributorAuthor

    FWIW, I started (and I think did most of the hard parts?) this in my qrcode branch, but I don't intend to finish it now since I don't really have a way to test it... so if someone else wants to complete it, feel free (but mention here so we don't duplicate work)

    Do other desktop wallets have that?

    At least Electrum does.

    How many people really want to scan a QR code on their desktop?

    There's also no reason to assume Core is running only on a desktop...

  3. jonasschnelli commented on Mar 4, 2017

    @jonasschnelli
    Contributor

    The Digital Bitbox Desktop App (based on this project, same build system, QT/C++11) has a QRCode scanner in case someone wants to extend this:
    https://github.com/digitalbitbox/dbb-app/blob/e7ce27112a4d44ba0b821e84f1178f6590caa6ec/src/qt/qrcodescanner.cpp

    From what I can tell is that to get the dependencies right (deterministic gitian builds!) this can be very hard.

    Maybe it's simpler to have a third party scanning app that execute a bitcoin: link (which then opens in Bitcoin-Qt).

  4. laanwj commented on Mar 4, 2017

    @laanwj
    Member

    Qt has built-in support for cameras now? I was about to go on a rant that this would involve a lot of platform specific code, but wow, that kind of changes everything.

  5. jonasschnelli commented on Mar 4, 2017

    @jonasschnelli
    Contributor

    QtMultimedia has built in camera support.
    The complicated part is to get the all-static deterministic binary on linux.
    And why not provide a third party application that is not part of the "important" binary? It could scan and pass it over the bitcoin: URL scheme into Bitcoin-Qt.

  6. laanwj commented on Mar 4, 2017

    @laanwj
    Member

    The complicated part is to get the all-static deterministic binary on linux.

    Ouch, indeed. Would need at least dynamic loading of the underlying C libraries used for accessing the cameras, so that there is only an optional dependency.

    And why not provide a third party application that is not part of the "important" binary? It could scan and pass it over the bitcoin: URL scheme into Bitcoin-Qt.

    I tend to agree that this use case is 100% implementable with an external utility, without any modifications to our current code. This is what bitcoin: URL support was designed for. I guess the only thing missing from a user point of view is a way to launch the utility from Bitcoin Core's GUI.

  7. luke-jr commented on Mar 4, 2017

    @luke-jr
    ContributorAuthor

    Qt does indeed have camera support, but I was using ZBar, which does both the camera and QR Code stuff.

    Deterministic binary can be "no QR scanning supported" for the initial implementation if that's difficult for some reason. AFAIK cameras just use a normal file descriptor, so I don't see why it'd be a huge problem...

    A third-party application won't integrate nicely... users want a QR Scan button on the Send tab :)

  8. SoraKohaku commented on Mar 4, 2017

    @SoraKohaku

    nice for next development i hope :)

    as i see phone only can do that. not for desktop. but if it's added will be nice when shopping online. If that great put all shop online with QR :)

  9. luke-jr commented on Mar 4, 2017

    @luke-jr
    ContributorAuthor

    Hm, QR scan the display? Not what I had in mind, but interesting idea nonetheless...

  10. SoraKohaku commented on Mar 4, 2017

    @SoraKohaku

    i still learn for vc programming but i know vb.net. if possible. i wanna make Bitcoin Core great(used vc of course). my idea can converted here?~permission needed

  11. luke-jr commented on Mar 4, 2017

    @luke-jr
    ContributorAuthor

    @FndNur1Labs Bitcoin Core is C++, not Visual . While we don't care what IDE you use, you'll have a much easier time with something GCC/LLVM-based and/or on Linux. But this is off-topic here, so if you have further questions/comments along those lines, please bring it up in the #bitcoin-core-dev IRC channel instead.

  12. laanwj commented on Mar 4, 2017

    @laanwj
    Member

    A third-party application won't integrate nicely... users want a QR Scan button on the Send tab :)

    There's no reason why a QR scan button in the send tab couldn't invoke an external utility. This is what many of the phone apps do too. They just launch whatever QR scanner the user has installed.

  13. SoraKohaku commented on Mar 6, 2017

    @SoraKohaku

    @luke-jr ok sir and @laanwj so no support for desktop. thank you for information

  14. benma commented on Mar 9, 2017

    @benma

    @TheBlueMatt

    Do other desktop wallets have that? How many people really want to scan a QR code on their desktop?

    It is handy when you want to send some funds to your mobile wallet. I use the atrocious qtqr tool to scan the mobile wallet's QR code.

  15. 23 remaining items

  16. icota commented on Nov 4, 2019

    @icota
    Contributor

    Thanks for the conditional build @ftylitak. If the project is otherwise stable could you do an official release? This would be a starting point to adding it as an optional Bitcoin Core dependency and potentially getting rid of qrencode.

  17. ftylitak commented on Nov 4, 2019

    @ftylitak

    @icota indeed I long wanted to make an official release. There is a specific bug which holds me back that might be affecting you as well.

    Since you mentioned the qrencode library I understand that you are interested in the Qr encoding part as well, correct? Currently in QZXing when encoding QR codes, the output image is correct for input strings that do not exceed the 106 characters with Low error correction mode.

    Is this bug a blocking point for you?

    This input will be useful for me to make proper prioritization.

  18. promag commented on Nov 4, 2019

    @promag
    Contributor

    @ftylitak is the fix hard (is there an issue)? If not I think we can wait.

  19. Sjors commented on Nov 4, 2019

    @Sjors
    Member

    We use BIP21 URIs to communicate an address + amount + arbitrary label. The UI enforces a limit of 255 characters (MAX_URI_LENGTH). The BIP does not impose a maximum, but it refers to RFC3986 which recommends 255 (although it's not clear if that recommendation includes parameters).

    Here's a maximum lenght example on macOS (testnet):
    Schermafbeelding 2019-11-04 om 17 28 49

  20. ftylitak commented on Nov 4, 2019

    @ftylitak

    Ok, it is confirmed that if the example of @Sjors is decoded and re-encoded, the encoded image is wrong.

    So, I will put an effort to fix the issue in the coming days and get back to you.

  21. Sjors commented on Nov 4, 2019

    @Sjors
    Member

    Thanks. In the future we might want to use QR code to transfer partially signed transactions (PSBT) to hardware wallets with a camera. Those might be even bigger, though we can worry about that later.

  22. andronoob commented on Nov 11, 2019

    @andronoob

    @Sjors

    In the future we might want to use QR code to transfer partially signed transactions (PSBT) to hardware wallets with a camera.

    Data capacity of one single QR code is too small (3KB). To avoid hitting such limit, Electrum has already done something that made me feel uncomfortable.

  23. andronoob commented on Nov 11, 2019

    @andronoob

    To be frank, I think PSBT lacks something like chunked encoding/sequence number/checksum/fountain code.

  24. ftylitak commented on Nov 14, 2019

    @ftylitak

    Greetings,

    the Qr code encoding in QZXing is now fixed. You can freely give it a try and see if it works for you case.

    In the coming days I will do the official release though the code is already available on the master branch.

  25. Rspigler commented on Jan 7, 2021

    @Rspigler
    Contributor

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA512

    I am setting a bounty for this issue (QR code scanner) for $300 to be paid in Bitcoin.

    The bounty will be split between devs (author and substantial reviews) as I see most fair.

    Thank you!

    Robert Spigler

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCgAdFiEEf4WKHNGE9pWzsby0UsewL8eQ8/AFAl/2w2cACgkQUsewL8eQ
    8/BDZBAAqpfQW3iVqJUY9+5uYSSoFT6Yh0mSWVGScpCqwGWkQNTJlU+XH8vgTJIr
    rFsoeLcAieMrA0KREf0WrB+3sfQAOJmBuxfzMJiI+3J2Yr7R//PEuYp0lMyKx6F5
    cpqxHJkDyKz0nEdCEcb1nCSuy/f+xflmD5+4fKxGdIVY55NDj5R6Qp2TMUXIs+Np
    ojPwRBx3WXlr1eW7ugFKn6vWOan8hsAnJEmQpJTlH8huyOVlumoya1e+alzCfpL5
    lspOXzr3jdGyAbXjwMO8U99Xanz/3VWq5U6CZKJ5vU3OMDsVGeGE7e5BeAlW9RVz
    yTCPfxov4h4w5EzgwrhA5X4HjhbHF0G+oJ7/gzmUbeBUlbFZH7B2M9TSEgpxY6cc
    yfjr4YcmUofCO6rOWozYmKHv2Xp9CAZ5wBJwADoonKiraPn9DpeavUoPQhF3eWBF
    yu1uxZClrWD5Fzl8HLdLKVsYEHuOQQGOCcJa5w6jhSqWmgW28qynfDe2ATNMdpd4
    4LbEaTJ2AwUHTutxRn78D4jXqsdfN02Z2TzaSkoFM2NTqEQBp5F+LqhvM+W5wDMT
    L/ydIC6vdANG0HuLCMPHDb8nAEgrWGC7mgq5SlYrm+vrbEt9zpTe4TBj5QWpgj24
    BhfPVYmKqnZ2yIxq8qqLf1iGAiTLX8vEir+HLC1rfDk4i9zWLBw=
    =8Yb3
    -----END PGP SIGNATURE-----

  26. deleted a comment from sheffine on Jan 21, 2022
  27. Bosch-0 commented on Apr 1, 2022

    @Bosch-0

    I am setting a bounty for this issue (QR code scanner) for $300 to be paid in Bitcoin.

    @Rspigler https://bitcoinbounties.org/

  28. fanquake commented on Sep 16, 2022

    @fanquake
    Member
  29. locked and limited conversation to collaborators on Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions