Skip to content

Improve tag detection for Cyanogenmod HCE #42

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

Closed
wants to merge 1 commit into from

Conversation

jekkos
Copy link

@jekkos jekkos commented Aug 9, 2015

  • It seemed that cyanogenmod random uids weren't properly detected by the mifare-desfire-version utility. I have added a check for random uid properly by checking for 08 prefix (as per the NXP spec) in the tag detection code
  • Adapt Cyanogenmod SAK value (now the same as in the libnfc-nxp code), see
    https://github.com/CyanogenMod/android_external_libnfc-nxp/blob/cm-12.1/inc/phNfcConfig.h:277
  • There's still a bug remaining in the code for parsing a random uid. I might want to create an issue for this

The following request/response to a Desfire Android app I'm building yields the following result

tamashell

> 4a 01 00
Tx: 4a  01  00  
Rx: 01  01  03  44  20  07  08  b0  57  a8  60  c0  99  05  78  33  88  00  

is parsed into

===> Version information for tag 0843fd0ff8eba0:
UID:                      0x04913a29932680
Batch number:             0x0000000000
Production date:          week 39, 2008

Improve tag detection for Cyanogenmod HCE
@jekkos
Copy link
Author

jekkos commented Aug 9, 2015

I have also disabled the ATS check for desfire to have my phone detected as a desfire tag. Think this change might be related to issue #17 here

@jekkos
Copy link
Author

jekkos commented Aug 13, 2015

Maybe disabling the ATS check might not be the best solution here (as suggested already in the other referenced issue). However I do need some mechanics to detect my phone as a Desfire card (SAK + ATQA are set properly, but can't change ATS). If I leave this part out would you consider to accept the random uid + sak value change as pr?

@jekkos jekkos closed this Aug 13, 2015
@jekkos jekkos reopened this Aug 13, 2015
@smortex
Copy link
Contributor

smortex commented Aug 13, 2015

It is probably less hackish to drop the detection code as proposed in #17. I'm on other projects ATM but would be happy to review a pull request for this 😉

@smortex
Copy link
Contributor

smortex commented Apr 3, 2017

This branch is not mergeable, so closing this PR.

If the changes are still relevant to you, feel free to open new Pull Requests with updated code. If you do so, please only address a single problem per PR.

Thanks!

@smortex smortex closed this Apr 3, 2017
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