Skip to content

Conversation

@tadeubas
Copy link
Collaborator

@tadeubas tadeubas commented Dec 9, 2025

  • Properly implement M3Y scanner (light, aim, sound, read/stop cmd, serial mode, high speed baudrate and factory reset)
  • Enhanced data reading logic with end-of-line validation to ensure complete QR code capture (affects GM65 and M3Y)
  • Fixscanner turning off while reading animated QRs (affects GM65 and M3Y)
  • Fix issue where GM65 fails to read single large QR codes (Increased UART read buffer from 2048 to 4096 bytes)
  • Fixes rare line break issue where recolor markup in the animated Specter pMofN QR progress caused hex color codes (e.g., 00F100) to appear and checkmarks to be rendered without color

close #314

BEFORE THIS PR, both scanners GIVE ERROR when read this UR:CRYPTO-PSBT QR code below (12w action is the key):

To scan, maybe it is better to download the below file, open it, and zoom out to approximately 60% of its size:
Screenshot from 2025-12-08 10-27-52

BEFORE THIS PR, both scanners STOP reading this animated Specter p1of9 QR (its content is the 12w action mnemonic)

multi2-2specter-2025-12-19_12.15.35.mp4

@netlify
Copy link

netlify bot commented Dec 9, 2025

Deploy Preview for specter-diy-docs ready!

Name Link
🔨 Latest commit 2922ec3
🔍 Latest deploy log https://app.netlify.com/projects/specter-diy-docs/deploys/6947d295d08c0d000878b6de
😎 Deploy Preview https://deploy-preview-335--specter-diy-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for the M3Y QR scanner and fixes an issue where the GM65 scanner fails to read large single QR codes. The implementation introduces model detection logic to support both scanner types with their distinct communication protocols.

  • Added M3Y scanner support with BCC checksum validation and M3Y-specific command protocol
  • Increased UART read buffer from 2048 to 4096 bytes to handle large QR codes
  • Implemented enhanced data reading logic with end-of-line validation to ensure complete QR code capture

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tadeubas
Copy link
Collaborator Author

Adding some testnet4 cases:

Wallet 12w action:

Plaintext

image

Compact SeedQR

image

Sparrow UR:CRYPTO-PSBT High density

3out_1change.mp4

Sparrow UR:CRYPTO-PSBT Low density

3out_1change_low.mp4

@tadeubas
Copy link
Collaborator Author

tadeubas commented Dec 12, 2025

Testnet3 case:

Sparrow Wallet multisig 1-9 descriptor from .pdf (12w action is one valid key)

image

Animated Specter p1of3 Wallet multisig 1-9 descriptor (12w action is one valid key)

multi1-9-2025-12-12_12.35.14.mp4

Specter format p1of11

multisig_action.mp4

@Schnuartz
Copy link
Contributor

Schnuartz commented Dec 12, 2025

Tested the QR Codes with the M3Y Scanner

✅3out_1change.mp4
✅3out_1change_low.mp4
🟥Sparrow Wallet multisig 1-9 descriptor -> Problems
IMG_20251212_213008
🟥Animated Specter p1of3 Wallet multisig 1-9 descriptor -> only scanned last QR
IMG_20251212_213649
✅Specter format p1of11 -> worked

Tested the QR Codes with the GM65 Scanner:
✅3out_1change.mp4
✅3out_1change_low.mp4
🟥Sparrow Wallet multisig 1-9 descriptor -> Problems
IMG_20251212_214708
🟥Animated Specter p1of3 Wallet multisig 1-9 descriptor -> turned off after 2 checkmarks, or at another try even after one checkmark (but 2 beeps)
IMG_20251212_214902
IMG_20251212_214942
🟥Specter format p1of11 -> turned off after 2 checkmarks
IMG_20251212_215206

--
Tested with:
https://github.com/cryptoadvance/specter-diy/actions/runs/20171961604
sha256:7780cffc018849c68c16d92f286372e715279497a030b736ae8d23e13499ac16

@Schnuartz
Copy link
Contributor

Now testing again with the normal v1.9.0 Firmware:

#Tested the QR Codes with the GM65 Scanner:
✅3out_1change.mp4
✅3out_1change_low.mp4
🟥Sparrow Wallet multisig 1-9 descriptor -> (not able to scan, it is alway scanning but it does not scan it.)
With this fork I tried again and it instantly scans but then gives away the error message
IMG_20251212_214708
🟥Animated Specter p1of3 Wallet multisig 1-9 descriptor -> turned off after 2 checkmarks, or at another try even after one checkmark (but 2 beeps) - tried multiple times, one time I heard 3 beebs and managed to get the following error message:
5332544684078863182
5332544684078863183
🟥Specter format p1of11 -> turned off after 2 checkmarks like in this fork. But I tried multiple times and once I got lucky. And it does not turned off after the 2nd scan. After it it does not turns off. And after some time I was able to scann all the QR codes and got this giant error message, I splitted over a couple of fotos:
Error-message-Specter-Format-p1of11_compressed.zip


#Tested the QR Codes with the M3YScanner:
✅3out_1change.mp4
✅3out_1change_low.mp4
🟥Sparrow Wallet multisig 1-9 descriptor -> Error Message
IMG_20251215_142455
🟥Animated Specter p1of3 Wallet multisig 1-9 descriptor -> Error Message
IMG_20251215_142522
✅Specter format p1of11

@tadeubas
Copy link
Collaborator Author

tadeubas commented Dec 17, 2025

We’ll leave this out of scope for this PR since it’s not related to the scanner. The issue is with the QR contents, which uses an unimplemented UR:CRYPTO-OUTPUT indefinite-length encoding:

  • Sparrow Wallet multisig 1-9 descriptor from .pdf (12w action is one valid key)

So we need to focus on cases where the M3Y scanner turns off while there is still data to read, or when the data is too difficult for it to scan.

@tadeubas
Copy link
Collaborator Author

tadeubas commented Dec 19, 2025

Plz test again this PR, only skips the Sparrow Wallet multisig 1-9 descriptor from .pdf (12w action is one valid key) as it is out of scope for this PR

Testnet case for the 12w action key:

Simple QR multisig 2-2 descriptor

image

Specter p1of3 multisig 2-2 descriptor

multi2-2specter-2025-12-18_22.38.03.mp4

@tadeubas
Copy link
Collaborator Author

tadeubas commented Dec 19, 2025

EDITED: Added this QR also to the PR description

BEFORE THIS PR, this animated QR p1of9 made GM65 and M3Y to STOP reading

multi2-2specter-2025-12-19_12.15.35.mp4

@tadeubas
Copy link
Collaborator Author

tadeubas commented Dec 19, 2025

I believe this PR is ready to be merged. Please test it with both GM65 and M3Y scanners, and compare the behavior with Specter-DIY v1.9.0 to better understand the issues that were addressed.

Testing with both the shield and the Waveshare Barcode Scanner board would also be appreciated.

@Schnuartz
Copy link
Contributor

Schnuartz commented Dec 20, 2025

Tested all the QR Codes in different configurations:
Scanner Testing-Shield

Scanner-testing-waveshare

new firmare is this here:
https://github.com/cryptoadvance/specter-diy/actions/runs/20387958365
sha256:e86014e1bddd65e65d812ca546de2f3224ace8fc31ed0c593a00e225f14f0a21

@tadeubas
Copy link
Collaborator Author

@tadeubas tadeubas merged commit 97ab4d4 into cryptoadvance:master Dec 22, 2025
8 checks passed
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.

M3Y Scanner works not properly

3 participants