Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RFID algorithm to get card ID

I receive bytes from an RFID reader when presenting a card, but I'm unable to figure out how to derive the card ID from these bytes.

For example, I have a card that has these numbers printed on it: 0007625328 116,23152. I would expect that this is the ID of that card, right?

For this card, I get the following bytes from the reader (in hexadecimal representation): <42><09><01><74><00><74><5A><70>.

like image 676
IR_IR Avatar asked Apr 22 '15 13:04

IR_IR


1 Answers

The decimal number 0007625328 translates to 0x00745A70 in hexadecimal representation.

The number 116,23152 is actually a different representation of that same value (0007625328):

  • 116 in decimal is 0x74 in hexadecimal.
  • 23152 in decimal is 0x5A70 in hexadecimal.
  • Combined, this also gives 0x00745A70.

So the value that you receive (42 09 01 74 00 74 5A 70) seems to be the concatenation of some form of prefix value (0x42090174) and the printed card serial number (0x00745A70).

like image 194
Michael Roland Avatar answered Nov 09 '22 10:11

Michael Roland