RFID algorithm to get card ID

試著忘記壹切 提交于 2020-01-02 04:59:05

问题


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>.


回答1:


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).



来源:https://stackoverflow.com/questions/29798566/rfid-algorithm-to-get-card-id

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!