Need a hand figuring out these data strings
Don M
Posts: 1,652
I'm messing around with reading some RFID cards. The RFID reader connects to an interface box (9600 baud) and then the interface box re-configures the data a bit and sends it on (also 9600 baud). Here's the setup:
RFID reader --> interface box --> micro
Here's some sample data from some cards:
1.
From RFID reader - ($0A)A0000DBB7E($0D)
From interface box - ($02)A0000DBB7EE6($0D, $0A, $03)
2.
From RFID reader - ($0A)A0000AFB90($0D)
From interface box - ($02)A0000AFB9035($0D, $0A, $03)
3.
From RFID reader - ($0A)0F03041CCE($0D)
From interface box - ($02)0F03041CCE00($0D, $0A, $03)
I'm trying to build an emulator with the propeller and the Parallax RFID reader to send the same type data string with the same cards as what comes from the interface box. What I don't understand are the extra 2 bytes after the actual card number. They are E6 in #1 , 35 in #2 and 00 in #3 above. Is it a checksum of some sort? I tried adding up the bytes of the card in various ways and didn't find a pattern.
Here's what I do know- From the RFID reader the start byte from the cards is always a ($0A) and the end byte is always a ($0D). From the interface box I know the first byte is always a ($02) which indicates a start and always ends with \r ($0D), \n ($0A) and ($03) which indicates end of transmission.
The data from the RFID reader is exactly the same as what I get from the Parallax RFID reader with these cards.
Do you see a pattern? Anyone care to help figure this out?
Thanks.
Don
RFID reader --> interface box --> micro
Here's some sample data from some cards:
1.
From RFID reader - ($0A)A0000DBB7E($0D)
From interface box - ($02)A0000DBB7EE6($0D, $0A, $03)
2.
From RFID reader - ($0A)A0000AFB90($0D)
From interface box - ($02)A0000AFB9035($0D, $0A, $03)
3.
From RFID reader - ($0A)0F03041CCE($0D)
From interface box - ($02)0F03041CCE00($0D, $0A, $03)
I'm trying to build an emulator with the propeller and the Parallax RFID reader to send the same type data string with the same cards as what comes from the interface box. What I don't understand are the extra 2 bytes after the actual card number. They are E6 in #1 , 35 in #2 and 00 in #3 above. Is it a checksum of some sort? I tried adding up the bytes of the card in various ways and didn't find a pattern.
Here's what I do know- From the RFID reader the start byte from the cards is always a ($0A) and the end byte is always a ($0D). From the interface box I know the first byte is always a ($02) which indicates a start and always ends with \r ($0D), \n ($0A) and ($03) which indicates end of transmission.
The data from the RFID reader is exactly the same as what I get from the Parallax RFID reader with these cards.
Do you see a pattern? Anyone care to help figure this out?
Thanks.
Don
Comments
They are checksums.
They are the last two digits of the sum of all the preceding bytes.
0F+03+04+1C+CE = 100
Use the Hex function of the WIndows Calculator.
From interface box - ($02)A0000DBB7EE6($0D, $0A, $03)
A0+00+0D+BB+7E = 1E6
2.
From interface box - ($02)A0000AFB9035($0D, $0A, $03)
A0+00+0A+FB+90 = 235
Got any more examples?
PE -
They have to be entered as bytes,
A0+00+0A+FB+90 works
not as nybbles
A+0+0+0+0+A+F+B+9+0 will not work
Well, at least you spell "nybbles" correctly. Hardly anyone does anymore. (PBASIC's NIB data type has always bothered me.)
-Phil