0

so i am trying to get the data from a mifare card and i can't get the same reading i get on windows.
On windows my card data is a 10 digit code like: 4852658522
Even though i can dump the data on the card i can't translate it to get the same 10 digit code.
Anyone has done this before?
Using python to read and dump the data.

  • What data do you get in RPi? – Michael Aug 29 '17 at 12:38
  • I can dump all the sectors on the Mifare card – Tiago Martins Aug 29 '17 at 12:49
  • no, you wrote that in windows you get 10 digit code, what code do you get in RPi? How are you reading the data in windows? – Michael Aug 29 '17 at 12:54
  • 2
    @TiagoMartins The data on the card can be converted to a number in a million million million ways. The PC code is using one conversion. You need to know how it makes that conversion. There is no point in guessing. – joan Aug 29 '17 at 13:33
  • 1
    It can be UID of the card. The UID is 4 bytes, as I know. So, with the RPi read the sector 0 of the card and post it here. – Michael Aug 29 '17 at 14:44
0

Sector 0 [48, 63, 172, 124, 223, 136, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0] Windows reading: 2091663152

2091663152 represented in hexadecimal is 7C AC 3F 30. If those bytes are shown in decimal they are 124 172 63 48.

It is too much of a coincidence to believe those happen by chance to be the first four numbers in sector 0. I guess they are the UID as Michael suggested.

So read the first four numbers from sector 0, call them n1, n2, n3, n4.

The UID is then (n4<<24 | n3<<16 | n2<<8 | n1).

  • Well, i've reached a similar conclusion in the meanwhile. I've been able do do the conversion and can now get the same readings on windows and the pi. ty – Tiago Martins Aug 30 '17 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.