EDIT: Thanks Rob you posted while i was writing this
EDIT2: oh just remembered i cant test if the crc works right with the reader as im still waiting for my serial -TTL converters...
oh but its fun when your a blond!!!
Hey Guys ,
Just an update.. its working!!!!!!!!
tried it with this card number : 07 00 EE 00 29 15 6E BD
used a buffer (just hard coded to see if it works):
buffer=0x6E; // is this the LSB crc16 ?????
and got a crc of BD6E which is the last two bytes of the card number backwards (as i believe it should be) swaped is 6E and BD.
Which is GREAT
..(dont you just hate buts!)
maybe im understanding the documentation incorrectly (English is not my native tongue)
the documentation says when sending ill need something like:
Len , Adr , Cmd , Data , LSB-CRC16 , MSB-CRC16.
response is :
Len , Adr , reCmd , Status , Data , LSB-CRC16 , MSB-CRC16
so how can i calculate the LSB-CRC16 ? as i used that in to do the crc calculation?
or am i wrong and i just do the crc calc on Len, Adr , Cmd and Data ?
i think that should give me 2 bytes and use them as the last 2 bytes to be sent?
Im guessing im wrong so will start sending data to the reader to see if it works
Again any insight is happily received.