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

[idea] Implement a true card emulation system #4

Open
jlitewski opened this issue May 9, 2024 · 1 comment
Open

[idea] Implement a true card emulation system #4

jlitewski opened this issue May 9, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jlitewski
Copy link
Owner

As described in #3, the BigBuf card emulation looks to be a glorified buffer for card data. Kinda seems like a waste to me. Since I'm pulling all those "emulation" functions out of BigBuf into their own files, might as well implement a true card emulation system into the firmware.

@jlitewski jlitewski added the enhancement New feature or request label May 9, 2024
@jlitewski jlitewski self-assigned this May 9, 2024
@jlitewski
Copy link
Owner Author

Current idea is this:

cardemu is a 'standardized' set of functions that the firmware can use to manage and manipulate tag/card data. It'll always allocate 4kb of memory minimum from palloc, even though it may not use all of it.

To set it up, you'll pass some sort of construction function pointer into init_emulator(*function_ptr). That function pointer will set the function pointers to the other standardized functions that cardemu has. For instance, ISO-14443 cards have three different UID lengths, and it shouldn't be cardemu's job to manage all of that logic to get the UID, it should be the job of whatever we initialized cardemu with; All cardemu should be worried about is returning a struct or byte array of the UID when get_emu_uid() is called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant