So far nobody seems to have posted anything on how to decode the data, and what relationship this has to the serial number printed on the key-fobs (I don't have any cards - do these have a number on them too?)
If you're short on time, skip to the Example below.
Background
The RDM6300 prints the key code in ASCII encoded Hexadecimal, meaning that if viewed on a PC terminal such as Hyperterminal you will see what looks like a Hex string. The reader keeps on squirting out this string for as long as the key is in range, with a repetition rate of 50ms. This can make it difficult to see the start and end of a code number.
If you are trying to extract the 48-bit RFID code on a microcontroller, more decoding is necessary as they do not operate within the 'human readable' world!
Decoding the data
The HobbyComponents USB logic analyser was a very handy tool for visualizing the timing from this device but that's another subject.
Inspecting the output data I noticed that out of all the keyfobs I have, the start and end are always the same code. These codes happen to be SOT and EOT. You don't see these on a terminal screen as they are non-printing control characters. These however are handy for decoding the data string within a microcontroller. More on that later.
Example
To cut a long story short here is an example. I have changed one or two bytes so the data below is not a key I own...
Code: Select all
Raw Data read (Hex): 02 31 30 30 30 32 36 46 34 34 34 32 36 03
Code 03 is "EOT" or End Of Text... Makes sense!
The 12 codes remaining in between these control characters convert to:
Code: Select all
100086F44426
Code: Select all
10 00 86 F4 44 26
The number printed on the fob or card is in decimal and is taken from the 2nd, 3rd, 4th & 5th bytes. So in this case the number on the key is "0008844356" This number in Hexadecimal is "00 86 F4 44" which can be seen in the Hex number above.
The last byte (26h) is the checksum (see posts after this one) made up from the XOR of all bytes in the message, excluding the SOT and EOT. eg.
Code: Select all
10h XOR 00h XOR 86h XOR F4h XOR 44h = 26h
Conclusion
Knowing how to convert the output should make it easier to write a properly structured decode routine on your Arduino, Raspberry pi, PIC or whatever you choose. The SOT and EOT control codes can (should) be used in your serial receive routine to tell your receive buffer when data has been completely received and to mark the beginning and end of a valid key code.
The checksum can be used for checking the integrity of the message by calculating in software and comparing with that in the message.
The raw received data can be converted easily to a number using atoi() or atol() or another similar function, making for easier storage and comparison of key codes instead of working with raw ASCII.
I hope this helps!
Now, has anyone had success writing to a writable RFID tag with this device? It has a RX pin as well as TX and there is a brief mention of it being able to write to tags. It might be sensible to assume that writing follows the same encoding as reading.