Skip to content

INCR_CNT command added for Ultralight and READ_CNT fixed for NTAGs#3001

Merged
gornekich merged 25 commits intoflipperdevices:gornek/nfc_refactoringfrom
RebornedBrain:berezhnoy/ntag_ultralight_cmd
Aug 22, 2023
Merged

INCR_CNT command added for Ultralight and READ_CNT fixed for NTAGs#3001
gornekich merged 25 commits intoflipperdevices:gornek/nfc_refactoringfrom
RebornedBrain:berezhnoy/ntag_ultralight_cmd

Conversation

@RebornedBrain
Copy link
Copy Markdown
Contributor

What's new

  • [ Describe changes here ]

Verification

  • [ Describe how to verify changes ]

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

According to datasheet NTAG21x don't support this command, but some of them do. Only 02 flag works (3E02), so now tearing command checks if SingleCounter feature is supported by the card, then it can be treated as NTAGxx and only flag=2 can be read
This function checks whether current Ultralight instance supports feature, mentioned as a second paramete.
Conflicts:
	lib/nfc/protocols/mf_ultralight/mf_ultralight_listener.c
	lib/nfc/protocols/mf_ultralight/mf_ultralight_poller.c
Changed function call from f_hal_nfc_listener_sleep to nfc_listener_sleep for Field Off event
Added new event FHalNfcEventTxEnd where trasmitter state is now changed
Reset after rx command processing is now done only when we don't send anything
Conflicts:
	lib/nfc/protocols/mf_ultralight/mf_ultralight_listener.c
Cleaned up all commands. Read and write commands send their NAKs according to status
Conflicts:
	lib/nfc/protocols/mf_ultralight/mf_ultralight_listener.c
Conflicts:
	lib/nfc/protocols/mf_ultralight/mf_ultralight_listener.c
@gornekich gornekich merged commit d87bd74 into flipperdevices:gornek/nfc_refactoring Aug 22, 2023
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