Skip to content

Add Saflok Emulation Support#461

Closed
aaronjamt wants to merge 6 commits intoNext-Flip:devfrom
aaronjamt:saflok
Closed

Add Saflok Emulation Support#461
aaronjamt wants to merge 6 commits intoNext-Flip:devfrom
aaronjamt:saflok

Conversation

@aaronjamt
Copy link
Copy Markdown
Member

@aaronjamt aaronjamt commented Aug 28, 2025

Superseded by #474


What's new

  • Adds the ability to create and emulate Saflok hotel keycards using Mifare Classic 1k

For the reviewer

  • I've uploaded the firmware with this patch to a device and verified its functionality
  • I've confirmed the bug to be fixed / feature to be stable

@aaronjamt
Copy link
Copy Markdown
Member Author

Marking as draft, awaiting merge of Xero firmware updates.

@aaronjamt aaronjamt marked this pull request as ready for review September 6, 2025 05:42
Comment thread applications/main/nfc/helpers/saflok.c Outdated
Comment on lines +241 to +245
// This is the default log header for cards with no log data
// 00 00 00 00 00 00 00 00 00 00 00 C1 00 00 00 00
if(block == 4) {
mfc_data->block[block].data[11] = 0xC1;
}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This works on my MT lock, but I'd like more testing to verify it works on others as well.

Comment thread applications/main/nfc/helpers/saflok.c
aaronjamt and others added 3 commits September 6, 2025 06:24
This prevents code reuse of the Saflok functions that are common across both the parser and generator.
Based on suggestions by @xtruan
Written by @xtruan. Thanks for the contribution!

Co-authored-by: xtruan <xtruan@users.noreply.github.com>
@aaronjamt
Copy link
Copy Markdown
Member Author

aaronjamt commented Sep 10, 2025

I should also note that this PR should be merged first: flipperdevices/flipperzero-firmware#4261
Edit to add: v1 of that PR was already merged, but there's a new commit from a couple days ago that adds another function to the API.
If you don't want to merge the extra commit yet, I can revert it and make a new PR later for it.

@aaronjamt
Copy link
Copy Markdown
Member Author

Superseded by #474

@aaronjamt aaronjamt closed this Sep 16, 2025
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.

2 participants