-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
NFC: FeliCa Protocol Expose Read Block API and Allow Specifying Service #4074
base: dev
Are you sure you want to change the base?
Conversation
Just to add a bit more context, a lot of FeliCa cards have well documented service codes useful for user to select and to read the data in their cards. Allowing user or apps to request the service they need would be a nice thing to have. |
Are there any changes needed? I'm happy to work with any expectations you have about Felica's impelmentation. Or if this PR overlaps with what's already been worked on I can accommodate too. If testing is needed I have two cards at hand. And both iOS and Andoird have Felica emulation with Mobile Suica so that's another way to test. It all works on my end with this PR. I've also run unit tests and it passes that too. |
Hi, @zinongli thanks for your contribution, I saw your changes and it looks fine for me, I will ask QA to take a look on that. |
Thanks a lot! Sounds great! Sorry for being pushy back then. |
Hi @Astrrra ! Thanks for testing! I believe that branch was outdated as I progress through the development of Metroflip. There were definitely bugs in the poller callback that I fixed later. I tested myself and found my most recent branch of Metroflip works more consistently. Would you mind trying out this branch? |
Also, if you don't mind sharing, what card are you testing with? Because I could try to look up the correct service code for easier testing. One alternative way to test this PR without using Metroflip is changing this macro to the service code we want and read with native NFC app. For example, here I read a Suica whose service code should be 0x090F. I read with the OFW (or this PR), and I will get this from block reading: The SFs here are not 0x00 since the first block, suggesting the blocks weren't successfully read. However, if I set this macro to be The status flag being zero, suggesting the reading was successful. And the content displayed here are the specific blocks read. If you don't mind sharing the card you are testing with I can try and see if I can find a service code that work for you. |
すごい!Tested on the other branch, works with all the cards I've tried (suica, pasmo, icoca), thanks! btw, the UI looks super nice :D |
Awesome! And thanks! Haha |
What's new
lib/nfc/protocol/felica/
): always select the first system on the list, always request serviceFELICA_SERVICE_RO_ACCESS
, and always read these few blocks.felica_poller_i.c
to read all sorts of things. For example, for Suica, one could read travel history and tap logs by reading the blocks from their corresponding services, by inputing the corresponding service code tofelica_poller_prepare_tx_buffer()
. The only problem is, it's internal, so not available to external apps.Verification
Checklist (For Reviewer)