Shop OBEX P1 Docs P2 Docs Learn Events
Need a hand figuring out these data strings — Parallax Forums

Need a hand figuring out these data strings

Don MDon M Posts: 1,652
edited 2014-09-22 21:06 in Propeller 1
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

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2014-09-22 17:16
    Don M wrote: »
    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.

    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.
  • Don MDon M Posts: 1,652
    edited 2014-09-22 17:47
    I was using windows hex calculator and thought I tried what you mentioned. It worked for some but not all I thought. I'll look at it again when I get home.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2014-09-22 18:09
    From RFID reader - ($0A)A0000DBB7E($0D)
    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
  • Don MDon M Posts: 1,652
    edited 2014-09-22 19:27
    That was my problem. I was figuring as nybbles. Thanks for your help.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-09-22 21:06
    Don M wrote:
    That was my problem. I was figuring as nybbles.

    Well, at least you spell "nybbles" correctly. Hardly anyone does anymore. :) (PBASIC's NIB data type has always bothered me.)

    -Phil
Sign In or Register to comment.