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

Non-functional Cards #6

Open
schorschii opened this issue Nov 13, 2022 · 13 comments
Open

Non-functional Cards #6

schorschii opened this issue Nov 13, 2022 · 13 comments
Labels
help wanted Extra attention is needed

Comments

@schorschii
Copy link
Owner

schorschii commented Nov 13, 2022

The following cards were reported as non-functional. Please leave a comment here if you know more cards which are not working.

If you have a card from the list which you can send me for a few weeks, please let me know. I'm interested in supporting these cards.

  • Uni Gießen
  • TU Dresden Campuscard (now supported)
@schorschii schorschii added the help wanted Extra attention is needed label Nov 13, 2022
@kiliankoe
Copy link

kiliankoe commented Apr 3, 2023

TU Dresden Campuscard (currently known as technically not possible to read them)

Oh that's very unfortunate :/ Can you elaborate?

@schorschii
Copy link
Owner Author

I do not own a Campuscard myself but had the chance for a quick test with one from the team implementing it as library card in the SLUB. This sample was not working with my app and since it uses a different technology, I'm not even sure if the balance is still stored on this card. Nevertheless, even if it is stored, only authorized applications with its key can read/write specific parts of the card, as the team told me. This means that the mensa can administer their content with their key without being able to view the SLUB part on the card, which is actually a good concept.

@kiliankoe
Copy link

That does sound like a very sensible concept, good to know, thanks! But it's a pity that the data is likely not accessible anymore. I'll keep looking for more information or see if the StuWe is willing to shed some light on this.

@willimei
Copy link

I have talked to the university about this issue and they said that the Mensa application on the CampusCard is the same as before.
Furthermore it still seems to be possible to read the card with the "Mensa Guthaben" Android App.

So maybe I can provide you some information to fix this issue?

@kiliankoe
Copy link

That sounds super interesting! If you have more information to share, that would be fantastic.

@willimei
Copy link

This morning I also got the information that the new card is a SmartMX card with a Mifare DESfire EV2 emulation. Because of that the CampusCard needs a higher electromagnetic field strength to boot the emulation.

I have downloaded several NFC Reader Apps on my phone. One of them showed me that the Emeal card is a DESFire EV1 and the CampusCard is a DESFire EV2. Maybe this helps to find the problem in the App implementation.

Can you give me some more advice what I can do to debug this issue?
If needed it will also be possible to meet somewhere if you want to have a look on it by yourself.

@schorschii
Copy link
Owner Author

Thanks for your information. Indeed, the Android app can read the card! I just tested it and it worked. This was new for me, it didn't worked when I tested it previously, obviously too hasty.

Next, I checked the debug output of my code reading a Campuscard, and it prints:


Turns out the card is recognized as NFCTag.iso7816 and not as NFCTag.miFare. It looks like that Android does some kind of conversion automatically, since the Android App did not received an update since years.

Unfortunately, NFCTag.iso7816.sendCommand() takes other parameter than NFCTag.miFare.sendCommand(), so further changes are necessary. Since I still not own a Campuscard myself, I still depend on the test card of my colleague and the story continues tomorrow...

@schorschii
Copy link
Owner Author

I successfully implemented support for the TU Dresden Campuscard. Thanks to @Xivy99 and @PaulS94 for the sample card!

@schorschii schorschii pinned this issue Apr 30, 2023
@schorschii
Copy link
Owner Author

@kiliankoe , @willimei any feedback?

@willimei
Copy link

willimei commented May 2, 2023

I downloaded the update yesterday and it works perfectly.
Thank you!

@kiliankoe
Copy link

Only just now had a chance to look at the code, huge thanks for the update! Just out of curiosity, how did you come across D2760000850100 for the info.plist value?

@schorschii
Copy link
Owner Author

This is the Mifare DESFire Tag application identifier. The campuscard is a NXP SmartMX3 with Mifare DESFire emulation, so we have to select the DESFire functionality with this AID. On iOS, it is necessary to explicitly specify the AIDs to use in the info.plist, on Android, the selection of DESFire seems to work somehow automatically.

@kiliankoe
Copy link

Ah, that's good to know, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants