Skip to content

feat: add PAC/Stanley tag type support#842

Closed
matteoscrugli wants to merge 1 commit intoGameTec-live:mainfrom
matteoscrugli:feature/pac-support
Closed

feat: add PAC/Stanley tag type support#842
matteoscrugli wants to merge 1 commit intoGameTec-live:mainfrom
matteoscrugli:feature/pac-support

Conversation

@matteoscrugli
Copy link
Copy Markdown
Contributor

Summary

Adds GUI support for the PAC/Stanley LF tag type. The firmware has full PAC support (scan, emulate, T55xx write) but the GUI has never exposed it.

Motivation

PAC/Stanley is a mainstream LF credential already implemented in the Chameleon Ultra firmware: TAG_TYPE_PAC = 150 plus four DATA_CMD_PAC_* commands. Without GUI wiring, users must drop to the Python CLI to provision PAC slots.

Changes

helpers/definitions.dart

  • Add TagType.pac(150)
  • Add ChameleonCommand.scanPacTag(3014), writePacToT5577(3015), setPacEmulatorID(5006), getPacEmulatorID(5007)
  • New PacCard extends LFCard (modeled on VikingCard)

bridge/chameleon.dart

  • readPac, setPacEmulatorID, writePacToT55XX, getPacEmulatorID

helpers/general.dart

  • Display name "PAC/Stanley" (matches firmware CLI), add to LF tag type list, getLFCardFromUID factory, uidSizeForLfTag = 8 bytes

helpers/write.dart, helpers/t55xx/write/base.dart

  • Route PAC through the existing T55xx write helper with read-back verification

gui/page/slot_manager.dart, gui/menu/dialogs/slot/edit.dart, gui/menu/dialogs/slot/export.dart, gui/page/read_card.dart

  • Branches to save a PAC CardSave into a slot, load/save the emulator ID in the slot edit dialog, export the slot back to a CardSave, and include PAC in the LF reader scan chain

gui/page/home.dart

  • Bump the firmware capability gate from setVikingEmulatorID to setPacEmulatorID

Testing

  • flutter analyze lib/ clean (no new issues)
  • flutter build macos --debug succeeds
  • No regressions on existing LF tag types (EM410x / HIDProx / Viking)

Pattern

The implementation follows the Viking integration 1:1 (simplest existing LF tag with raw-hex UID). Same file touches, same else-if chain placement.

GameTec-live
GameTec-live previously approved these changes Apr 24, 2026
Copy link
Copy Markdown
Owner

@GameTec-live GameTec-live left a comment

Choose a reason for hiding this comment

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

Nothing jumps out to me. Dont have a PAC card tho, so someone please test.

@matteoscrugli
Copy link
Copy Markdown
Contributor Author

Consolidated into #844 as you suggested, that PR bundles PAC and IDTECK into a single change set, so there are no merge conflicts between parallel branches anymore. Closing this in favour of the unified PR. Thanks for the heads-up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants