Skip to content

TigerTag: read tag index and tag count - #34

Open
TigerTag-Project wants to merge 1 commit into
suchmememanyskill:mainfrom
TigerTag-Project:tigertag-tag-index-count
Open

TigerTag-Project wants to merge 1 commit into
suchmememanyskill:mainfrom
TigerTag-Project:tigertag-tag-index-count

Conversation

@TigerTag-Project

@TigerTag-Project TigerTag-Project commented Oct 13, 2026 •

Copy link
Copy Markdown

TigerTag spec v2.2 adds a tag index / tag count byte (section 2.11), so a reader knows which tag it just read and how many tags the item carries. For example, a spool with one tag on each side is "tag 1 of 2" and "tag 2 of 2". This PR lets OpenRFID read it.

Format

Offset +39 (page 0x0D, byte 3). The high nibble is the tag index, the low nibble is the tag count:

  • 0x00: unknown. Every tag written before v2.2 has this value, so existing tags keep working.
  • 0x11: single tag
  • 0x12 / 0x22: twin tag, tag 1 of 2 / tag 2 of 2

The byte is not covered by the TigerTag+ signature.

Changes

  • GenericFilament: new tag_index and tag_count fields. They default to 0 (unknown), so other processors are unaffected. Both are included in to_dict(), so they reach the webhook. pretty_text() shows "Tag: 1 of 2" when the count is known.
  • TigerTag parser: reads the byte. An index higher than the count is treated as unknown.
  • Tests:
    • The official TigerTag+ dumps (eSun, R3D, Rosa3D, Sunlu) come from spools that carry twin tags, but were written before v2.2. They are updated to "tag 1 of 2" (0x12). Only byte +39 changes, and every signature still verifies against the TigerTag+ public key, since this byte is not signed.
    • A new eSun PLA Basic Refill Cold White TigerTag+ Twin 2 of 2 copy covers the second index (0x22). It gives the same unique_id as tag 1, as expected: twin tags share the same timestamp (section 2.9), so OpenRFID sees them as the same spool.
    • The Elegoo dump, a plain TigerTag written before v2.2, checks that such tags read as unknown (0/0).

97 passed, 1 skipped.

Note: #32 also adds fields at the end of GenericFilament and to_dict(). Whichever is merged second will need a trivial conflict resolution there; happy to rebase.

@TigerTag-Project
TigerTag-Project force-pushed the tigertag-tag-index-count branch from 83fc777 to 1d2e837 Compare October 13, 2026 22:12
Read the tag index / tag count byte (offset +39, TigerTag spec v2.2):
the high nibble is the index of the tag that was read, the low nibble
is the number of tags on the item (0x12 = tag 1 of 2). 0 means unknown,
which is what every tag written before v2.2 contains.

- Add tag_index and tag_count to GenericFilament (default 0 = unknown),
  exposed in to_dict() and shown in pretty_text() when the count is known
- Update the official TigerTag+ dumps (eSun, R3D, Rosa3D, Sunlu) to tag
  1 of 2, as these spools carry twin tags. Only byte +39 changes, which
  is not covered by the signature
- Add an eSun "Twin 2 of 2" copy to cover the second index
- The Elegoo dump, written before v2.2, checks the unknown case
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.

1 participant