Commit 85fbf38
committed
Read real Toy Pad tag content; document known issues
The Toy Pad's READ command args were documented as
[mode, tagIndex, page] in the reference projects we copied from;
the actual order is [mode, page, tagIndex]. With the wrong order,
the portal silently returns pages 0-3 regardless of the requested
page — so the driver had literally never been reading real NTAG213
content past page 3, just pages 0-3 repeated 11x and labeled a
"character." Correcting the order yields genuine 180-byte NTAG213
dumps with unique CRCs per tag.
While here, make the scanner actually useful for non-Lego tags:
- Classify tags using the marker byte from the portal's 0x56 event:
NTAG (Lego), MIFARE Classic Disney, foreign MIFARE, 4-byte MIFARE.
Non-Lego tags short-circuit with device-agnostic messages instead
of being labeled as Lego characters.
- Validate the returned page-0 UID against the anti-collision UID,
because the portal doesn't reliably honor tagIndex when multiple
tags are on the pad — it returns data for whichever tag its NFC
controller happens to be locked onto. Mismatches now show
"another tag on the portal is blocking this read" instead of
silently presenting another tag's bytes.
- Clear the failed-UID cache when a non-NTAG tag is removed, so a
Disney tag being lifted off unblocks NTAG tags that had been
failing via NFC coexistence.
- Display the UID in the error state.
- Tighten the portal-command msg-id range to 0x20..0x7F so late
auto-read responses (which the portal sends with IDs starting at
0x86) can't masquerade as our outstanding READ.
Plus a top-of-file TODO block in the driver cataloguing the known
limitations that weren't fixed in this pass: no multi-tag
addressing, Disney coexistence poisoning NTAG reads, unverified
PWD_AUTH arg order, leaked HID listener on reconnect, no auto-
retry after coexistence clears, Amiibo content not read.1 parent 3a0392a commit 85fbf38
4 files changed
Lines changed: 222 additions & 46 deletions
File tree
- src
- components/wizard
- hooks
- lib/drivers/toypad
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
92 | 97 | | |
93 | 98 | | |
94 | 99 | | |
| |||
145 | 150 | | |
146 | 151 | | |
147 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
148 | 157 | | |
149 | 158 | | |
150 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
| |||
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
78 | | - | |
| 82 | + | |
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
86 | 100 | | |
87 | 101 | | |
88 | 102 | | |
89 | 103 | | |
90 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
91 | 118 | | |
92 | 119 | | |
93 | 120 | | |
| |||
105 | 132 | | |
106 | 133 | | |
107 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
108 | 159 | | |
109 | 160 | | |
110 | 161 | | |
| |||
154 | 205 | | |
155 | 206 | | |
156 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
40 | 74 | | |
41 | 75 | | |
42 | 76 | | |
43 | 77 | | |
44 | 78 | | |
| 79 | + | |
45 | 80 | | |
46 | 81 | | |
47 | 82 | | |
| |||
0 commit comments