Repository navigation
NFC scan: keep scanning after a rejected tag, parse NDEF properly, explain unsupported tags - #56
Merged
Merged
Conversation
Hoggormino
force-pushed
the
nfc-scan-vusion-fixes
branch
from
September 16, 2026 15:53
246038d to
ecfb0b5
Compare
This was referenced Sep 16, 2026
Hoggormino
force-pushed
the
nfc-scan-vusion-fixes
branch
from
September 16, 2026 18:41
ecfb0b5 to
b4097c7
Compare
The scan only sees NFC data. It cannot sense whether a label's display listens for infrared or radio, so the messages now say what was found instead of naming a vendor or a transport as fact. - "VUSION tag / SES-imagotag uses radio, not IR" becomes "Likely radio tag / Link: nfc.imagotag.com / TagTinker is IR-only". - Match an http:// or https:// link whose host is nfc.imagotag.com (case-insensitive), as prefix code 0x03/0x04 or inline after 0x00, instead of the substring "imagotag" anywhere in the URL. A "://" inside a path, query or fragment is not taken as the scheme. - "Not a Pricer tag" becomes "Unrecognized tag / No ID TagTinker can decode"; "Unsupported chip" becomes "Unreadable chip / Chip answered but no data was read". - Move the decision into tagtinker_nfc_classify() so it can be tested off-device. - De-duplicate on UID and result together. The firmware reports a read that stops partway as a success with fewer pages, so a UID-only check could keep a tag stuck on "Unrecognized tag" after a partial first read. - Announce an unreadable chip once until the field is empty. Those reads carry no UID, so UID de-duplication never applied and the message repeated on every poll. - Bring the prompt back from the scene tick instead of a popup callback. A popup with a callback consumes every short press, so Back only dismissed the message and a second Back was needed to leave. - Stop the scanner on the Back event rather than waiting for on_exit, so the poll loop is already winding down when the scene is popped and the join there is as short as possible. On device, leaving from a message takes exactly one Back. - Move custom event ids to 200+. NfcScanEventSuccess was 100, the same id as the target menu's "+ Type Barcode" item. - Stop the scan LED when "Target list full" ends scanning. - README: add "Which tags work", with vendor-documented radio examples and a table of what each scan message means. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Hoggormino
force-pushed
the
nfc-scan-vusion-fixes
branch
from
September 16, 2026 20:10
b4097c7 to
6aa6796
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the "+ Scan NFC" flow so it keeps scanning after a rejected tag, parses NDEF the way NTAG21x tags store it, and tells the user what the scan found. It does not add support for radio shelf labels. TagTinker only transmits infrared, and the scan only reads NFC data, so the messages describe the NFC data rather than stating a vendor or display technology as fact.
Touches
nfc/tagtinker_nfc.c,nfc/tagtinker_nfc.h,scenes/tagtinker_scene_nfc_scan.candREADME.md.What was wrong on main
decode_tag()printed two 30-bit values into a 20-byte buffer, so a 10-digit value was truncated instead of rejected.What this does
tagtinker_nfc_classify()so it can be tested off-device.http://orhttps://link whose host isnfc.imagotag.comon_exit, so the poll loop is already winding down when the scene is popped and the join there is as short as possible.Why "Likely": the public VUSION dump in #51 carries an
https://nfc.imagotag.com/<id>URL, and SES-imagotag's access-point datasheet documents a proprietary 2.4 GHz label radio. The NFC link alone does not prove the model or its radio.Verification
nfc/tagtinker_nfc.c: 38 synthetic checks covering host matching (case, port, query, fragment, inline scheme, look-alike hosts), URI prefix codes, TLV skipping, truncated and malformed records, over-long URIs and a synthetic decodable id, plus the public Add support for VUSION 2.2" (EDG2-0220-A) — 212×104 b/w #51 dump, which classifies as a likely radio tag.https://nfc.imagotag.com/00000000shows "Likely radio tag", the message clears by itself and the prompt returns.https://example.com/testshows "Unrecognized tag".Try it without a shelf label
Write
https://nfc.imagotag.com/00000000as an NDEF URL onto a blank NTAG213/215/216 you own, then scan it in Targeted Payloads, + Scan NFC. Expect "Likely radio tag".🤖 Generated with Claude Code