Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide unlock with reader for MFU-C #3553

Merged
merged 2 commits into from
Apr 4, 2024

Conversation

bettse
Copy link
Contributor

@bettse bettse commented Mar 30, 2024

What's new

Verification

  • Read MFU-C: confirm "Unlock with Reader" is hidden
  • Read MFU EV1, NTAG21x, etc: confirm "Unlock with Reader" is shown

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

@bettse bettse marked this pull request as ready for review March 30, 2024 22:34
@skotopes skotopes added NFC NFC-related Bug labels Apr 1, 2024
@skotopes
Copy link
Member

skotopes commented Apr 1, 2024

@gornekich are you ok with this kinds of type check? As i understand we can make it through data->type == MfUltralightTypeMfulC?

@bettse
Copy link
Contributor Author

bettse commented Apr 2, 2024

I did see MfUltralightTypeMfulC, mf_ultralight_get_type_by_version, and instance->data->type, but seems I'd need an MfUltralightPoller, and I'm still not very good at the NFC api and opaque types and casting stuff and whatnot, so I wasn't sure how to get from the nfc_device I saw to there.

@gornekich
Copy link
Member

Hello @bettse . The best way to check ultralight type here is to cast nfc_device data to MfUltralight pointer and check it's type. Please look at patch attached.
check_mfu_type.txt

@bettse bettse force-pushed the mfu_c_unlock_fix branch from 38412ee to be98a76 Compare April 4, 2024 01:00
@bettse
Copy link
Contributor Author

bettse commented Apr 4, 2024

Thanks! That works (tested with amiibo and hotel card) and is much more semantic

@skotopes skotopes merged commit 5793d52 into flipperdevices:dev Apr 4, 2024
11 checks passed
@bettse bettse deleted the mfu_c_unlock_fix branch April 4, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug NFC NFC-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants