Parallax Smart Card Reader Samples for Arduino

Note:  There is a now an Arduino Library available for the Parallax Smart Card Reader, please see the new post in this blog.

I ordered one of the Parallax Smart Card Readers as listed on the Parallax web site.   I also went ahead and ordered one of each of the three (3) types of Smart Cards that Parallax provides for use with the reader to play around with ... and I believe I have code for the Arduino that works with each of the three types.

Note:  I did lock my first IS23SC4442 (32321) card while learning ... had to order more (this time I ordered a couple) ... but I did seem to get it working without locking a second one.   And ... once you lock one, it can't be unlocked (at least not that I know of) ... but I do now have the ability to make sure the lock-check logic works and see that it is impossible to write to the card's memory when it is locked. 

The IS24C16A (32322) and IS24C02A (32323) don't have any type of protection built in where they could be locked ... so no problems there.

Also Note:  All of the samples are derived from the PBASIC 2.5 and Propeller samples that Parallax provided.  So, if it doesn't seem to work for you, that's where I got my info from.

I think that I could have used the Arduino Wire library for the 32322 and 32323 cards, but decided not to go that deep yet ... I may eventually give it a try ... although it might have been easier.   When looking at the BASIC examples and the Propeller examples and converting to C/C++, it seemed easiest to keep things as similar as possible.

If you have access to one of each of the three types of cards, I recommend starting with the 32323, then trying the 32322 (all 8 pages) and then finally trying out the 32321 with its protection capabilities.

If you don't like the pins I used, certainly change as needed ... I have tried the samples with both an Uno SMD R2 and a Mega 2560 R3 ... both seem to work with the pins specified.

So, if you want, give the Adruino samples (one for each card type) a try ... they can be found here.   They all compile fine with Arduino 1.0 ... I didn't even try with any older Arduino versions.

Good Luck!  I'll try to help if you have problems.

Updates

6/27/2013 - I just hooked up my Card Reader and opened all 3 samples in Arduino 1.0.5 ... something I've been meaning to do for a while now ... they all compiled and ran fine.   So, if you are having problems, keep in mind that these samples were made specifically for the Parallax Smart Card Reader (you can find the link above in the very first sentence of this Post).   Also keep in mind that EVERY sample uses the following connections between the Reader and the Arduino:

Parallax Card Reader                          Arduino
           I/O         -----------------------           A4
           CD         -----------------------            3
           CLK      -----------------------           A5
           RST       -----------------------            2
           VCC      -----------------------           5V
           GND      -----------------------         GND

02-14-2015 - Moved Samples to Github.

Comments

  1. Awesome, I was just looking for something like this. I'll be ordering parts for this now and having a go soon, thanks!

    ReplyDelete
  2. Is there a reason that your sketch requires the card be inserted *after* power up? It didn't look like the parallax code required it. Did you have issues with it this way, or just something that you needed for your purposes?

    ReplyDelete
    Replies
    1. No, just a making sure the card detect logic worked both for insertion and removal ... certainly not required.

      Delete
    2. I've removed that restriction and made other changes to suit my purposes. Thank you for documenting your code like you did, it makes working with it very easy. I've just got to do something about handling card removal mid-read, then I'm about done.

      Delete
    3. Cool ... the provided code was meant to be a starting point that supports demonstrating the features of the reader and card(s) working for Arduino... as time permits my goal is to eventually create an Arduino library that combines support for all of the different cards Parallax provides for the use with the Reader ... but my job decided to get real busy following what I had done ... hopefully I will eventually get back to it in the near future.

      Delete
  3. A library with multiple card-type support would be great, but I was able to adapt your code to fully suit my purpose. Thanks again for the well documented code and I look forward to that library sometime!

    ReplyDelete
  4. Thank you for your analysis and sharing, from your article I learned more.

    phoenix smartcard readers
    Jcop cards

    ReplyDelete
  5. Hi!

    I am new to Arduino, so I was wondering about the wiring of the reader to the Arduino. Do you have a diagram or instructions?

    Thank you!

    ReplyDelete
  6. Hi!

    I'm working on a project in which I am using the parallax smart card reader, and the Arduino UNO microcontroller, I read the information you have, my point is that my chip is a "SLE66CX680PE", it is possible to read this chip through the reader's parallax?

    ReplyDelete
    Replies
    1. I've only ever tried with the Parallax provided Smart Cards ... it might be possible, it might not. I think I'd be asking for some tech support directly from Parallax to find out.

      Delete
  7. Hi Jeff, Great info!

    I was able to connect a a simple smartCard Socket (such as AMPHENOL - C70210M00823440 ) to an arduino like this: schematics.

    I'm using New SLE4442 cards. The card read and errCounter = FF and 3 PSW = FF. Then, all DATA (256 positions -bytes- appear to have FF). I thought that the first 26 positions would read something different from FF as they're supposed to hold the Manufacturer Information.

    QUESTIONS:
    1- Is my assumption on Manufacturer Info, right?
    1.1- if so, how do I correct the error of reading all 'FF'?
    1.2- If not, why? and May I use all 256 positions (bytes) for storing info?

    2- I want to use the information from the CARD to engage with my arduino project (i.e.: limiting the use of the connected hardware according to time stamp), I guess I need to extract the info by using some 'processing' script. I'm trying to figure out how to separate each group of tags. Any thoughts?

    3- I will also need the arduino to write new information on the card (i.e.: Logging the time stamp). I'm not sure how to achieve this with your libary. Is it even possible or do I need to code it from scratch?

    Now, I'm not very fluent in programming language, so I'm not sure where to start. May you help me?

    ReplyDelete
    Replies
    1. Hi Gustavo,

      The code I have provided is very specific in that it's for use with the Parallax Smart Card Reader (which there are links to it in the blog). I don't believe the code will work with anything else but that specific reader and the 3 cards that I have written code for (which are specifically supported by the reader). If you have another card that I haven't written code for that works with the Parallax reader, there might be some options, otherwise it's probably not of much use to you.

      Delete
    2. Hi Jeff,
      I don't understand how the Parallax Reader is much different than connecting the card via a socket directly to the arduino. However, thanks for your time getting back to me...

      BTW my cards are the same to yours... 256 bytes of serial EEPROM with security and 3-Bit error counter...

      Delete
  8. hello sir,
    I'm now in a project to copy the phone book and message from one sim to another with arduino. how to access the phone book and message location in the sim card??help me

    ReplyDelete
    Replies
    1. It will depend on the format of the storage of the phonebook & message as-well-as the card type used. Keep in mind that the provided examples are specific to Parallax readers and the 3 cards mentioned ... if that is the case, then to start with, you should be able to modify the sample code to read everything that's on a card (i.e. don't write anything to the old card); just dump everything to make sure you can see the info. Once you've done that ... it should be just a matter of storing the info (memory most likely) and then inserting a new card and writing (either everything or only parsing as-needed data) to the new card.

      Delete
  9. First of all, thank you for writing these example sketches. They were the only working ones I've found. I've spent some time looking through the code but could not understand how or where to write to the card. I'm trying to play with information on that card by moving things around and would like to be able to restore it to it's original state. Is there something i'm missing or is this another beast?

    ReplyDelete
    Replies
    1. Understand that the reads and writes are one byte at a time.

      In the IS23SC4442 code the Update_Main function does the write.

      In the other two (IS24C02A and IS24C15A) the writeLocation function performs the write.

      The samples just fill every memory location of the card with a value, reads the values to show that they were written, then clears the values (and again shows that they were cleared) ...

      Delete
  10. Sir i make connection as follows
    cd pin to arduino pin4
    vcc pin to arduino pin11
    reset pin to arduino pin 7
    clk pin to arduino pin 9
    io pin to arduino pin 10
    then up to initilize code work complete but after that nothing going work and if i remove card then all 8 pages are read...i use parralex card...

    ReplyDelete
    Replies
    1. Odd ... almost seems like a card detect problem. Also understand that this code is specific to the Parallax Card Reader (Hardware) ... not just the Parallax Card.

      The code was written to use the following pins (as documented in the code) ...

      vcc 5V
      gnd GND

      cd 3
      reset 2
      clk A5
      io A4

      If you use something else make sure they are the right connection types [digital/analog] ... and change the code to reflect your connections. I have only tested with UNO SMD and Mega 2560 R3

      You may also want to tweak the delayamt value (defaults to 50ms) ... it may help to increase it (small increments since performance will be affected ... or a larger increment initially to see if it helps, then shrink 'til the lowest working value is found).

      Delete
  11. This comment has been removed by the author.

    ReplyDelete
  12. after reset i get all 4 byte is of 255 int value...why i can not get
    any ATR response from Smart Card...

    ReplyDelete
    Replies
    1. I really don't know ... possibly a bit mask issue? Hard to say without more info.

      Delete
  13. I make connection as you say...and use parallax card...now i use only some of your code i use upto reset() function...i want to read that four byte from card after reset...please tell me what you get ??

    ReplyDelete
  14. i want just only atr response how to get it??

    ReplyDelete
    Replies
    1. I don't believe you can get to the ATR with this reader. And if you can, it would be different code that what I am providing. I can tell you that the first 4 bytes of a locked card will return A2 FF FF FF ... and every byte following that all the way to the end of the memory will read as FF ... at least that's my experience.

      Delete
    2. Yes you are absolutely right.I use another code and i get perfect atr which i want...thanx for helping me.

      Delete
  15. Hi Jeff, I have a question. Here is the project I would like to make. I have the Smart Card Reader/Writer #32320 and smart card #32323 and arduino uno board or I can upgrade to mega is necessary. Here is the situation, a local skeet gun club would like to have a COUNT UP system mounted on 12 of their clay target stations so they can keep track the number of clay targets each shooter is using throughout the day. Here is how I envision this working and wondering if its possible using the hardware I mentioned above. A shooter comes into the shop and is issued a smart card, now this individual would go to lets say, station 1, insert card and leave it inserted. When the release button is pressed on the clay target machine, the arduino would read the pulse, then tell the parallax writer to write 1 to the card indicating one target was thrown. Then when second button is pressed, it write 2 to the card indication 2 targets were used by this shooter and now if a third button is pressed both machines will launch 2 targets at once, so it would write 2 to the card showing so far 4 targets were launched. The shooter can move around to any station throughout the day, so I would need to keep a running total, so now at the end of the day, the shooter brings their card back into the office, the office personnel now slides the card into a reader and for example reads "Number of targets used - 232", then they pay off of that. Once the transactions is done, they can erase the card and reuse it. Is this possible using the hardware and the sample arduino codes you have written? Yes, there are systems already out there that do - do this, but the run anywhere between $8000 - $10,000 and these small ma and pa shops just afford those type of systems and this would be a very very basic setup - only COUNTING UP that is it. Is this possible? Thanks Lisa

    ReplyDelete
    Replies
    1. Hi Lisa,

      Technically from a Card Read/Write perspective I don't see a problem with what you are suggesting. The only question I would have would be how that pulse would get to the Arduino, which would then update the count on the card. And if you have that already worked out, you should be good to go and I think you have a very viable idea. The code I provided would be a reasonable place to start in that you will find how to read, write and clear values (which a clear is really nothing more than writing an empty value ... I would typically say write a 0, but you may decide a different value fits your needs). Certainly the cost ... of the Arduino, power supply, card reader, whatever sensor you use to detect the pulse and some wiring ... plus possibly something to put the project in to protect tampering ... would be far less expensive then the systems you say are already available ... also, I don't think you would need a mega ... in fact, you might want to eventually scale it down to one of the Tiny Arduinos or such ... might be even cheaper that way ... but an UNO (or two, since you would need one for the card management portion of the project too I guess) with card readers, wiring, etc to get started should be plenty to get started I would think. Nice Idea, good luck!

      Delete
    2. Hi Jeff,
      Thanks for responding to my inquiry. I really appreciated it. Answer to your question in regards to how the pulse would get to the Arduino. I would have 3 buttons plugged into pins. Button A would trigger machine 1 and when the button is pressed, I am hoping to count that as 1, then write to card, then when button Button B is pressed for machine 2, the pulse would add that count to the last count recorded and now the write would now read 2, and finally when Button B (for both machines) is pressed, the pulse would add 2 to the arduino and write to the card and now it should read 4 total targets were triggered. That is my goal - visually I see happening, question is making it work physically. I hope the sample you have here will help me towards my goal. And from your response, from my first post, it certainly will work. Thanks again, and I do hope IF I should have any questions, if you wouldn't mind answering them, if so for some reason I get stuck. Right now I am going to work with the sample code - making sure I can get it work just using what you have coded here. Then once I know its good - then I can go ahead and make the necessary mods. Thanks again Jeff! Have a great day! Lisa

      Delete
  16. Thanks Jeff, your work helped me a lot.

    This is a software 2 wire bus.
    The response to the ATR is: A2 13 10 91
    A = 2 wire bus protocol (Siemens SLE 4432 datasheet p27)

    These 4 bytes are also the first 4 bytes of the 256-byte memory.
    The clock runs at 20kHz.

    First, if you don't have the parallax smart card reader, you need to add pull-up resistors to the lines CLK, IO and RST. The parallax reader has included them.

    Secondly, to get the ATR ( the 4 bytes after a reset) you need to do some timing modifications to the arduino sketch.

    Here is a diff of my version:
    diff --git a/IS23SC4442.ino b/IS23SC4442.ino

    void setup()
    {
    @@ -61,6 +61,15 @@ void setup()
    Serial.println("Please insert a Card...");
    else
    Serial.println("Card was already inserted at startup...Please remove and re
    +
    +
    + Output(CLK); // initialement CLK bas
    + Set_Low(CLK);
    +
    + Input(IO);
    +
    + Output(RST);
    + Set_Low(RST);
    }

    void Reset()
    {
    + uint8_t tmp[4];
    Serial.println("Reset.");
    Output(CLK);
    + digitalWrite(CLK, LOW);
    + digitalWrite(RST, LOW);
    Input(IO);
    - Output(RST);
    - Set_Low(RST);
    - Set_Low(CLK);
    +
    +
    Set_High(RST);
    delayMicroseconds(delayamt); // A little extra wait time for this
    Set_High(CLK);
    @@ -115,7 +133,14 @@ void Reset()
    long address = 0;
    for (int index = 0; index < 4; index++)
    {
    - Receive_Byte();
    + tmp[index] = Receive_Byte();
    + }
    + clockPulse(); // 33rd clock pulse
    +
    + // display ATR header
    + for(int index = 0; index < 4; index++){
    + Serial.print(tmp[index], HEX);
    + Serial.println("");
    }
    }


    @@ -325,7 +409,7 @@ uint8_t _ReceiveFromCard()

    Output(CLK);
    Input(IO);
    - Set_High(CLK);
    + //Set_High(CLK);

    for (int i = 0; i < 8; i++)
    {
    @@ -380,4 +464,9 @@ void Output(int Pin)
    {
    pinMode(Pin, OUTPUT);
    }
    -
    +
    +void clockPulse(){
    + Set_Low(CLK);
    + Set_High(CLK);
    +}
    +

    I didn't experience the update commands because I don't have the password.

    Guillaume

    ReplyDelete
    Replies
    1. Thanks for the updates and for sharing the changes you've made. I'm sure others will find it useful.

      Delete
  17. Hi jeff, my code writes 00 to all pages. What could be causing this?

    Writing Memory...Page 1
    Done.
    .
    .
    .
    .
    Read Main...Page 1
    [ D A T A ]
    * | 0 1 2 3 4 5 6 7 8 9 A B C D E F characters
    --+-----------------------------------------------------------------
    0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    1 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    2 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    3 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    4 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    5 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    6 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    7 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    8 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    9 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    A | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    B | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    C | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    D | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    E | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    F | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    --------------------------------------------------------------------
    Done.
    Read Main...Page 2
    [ D A T A ]
    * | 0 1 2 3 4 5 6 7 8 9 A B C D E F characters
    --+-----------------------------------------------------------------
    0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    1 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    2 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    3 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    4 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    5 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    6 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    7 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    8 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    9 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    A | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    B | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    C | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    D | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    E | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    F | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    --------------------------------------------------------------------
    Done.

    ReplyDelete
    Replies
    1. Looks like it's actually not WRITING values ...

      1. Check your connections. 2. Make sure you are using the right card ... looks like in this case you need the IS24C16A (32322) card. 3. Tweak the int delayamt = 50; (on line 38) to higher values (i.e. increment by 5 or 10 until it starts working, then decrease by 1 to find the lowest value that works). If that doesn't work, my next questions would be things like 1) is the card detected properly (or did you just remove the code that does the check)? 2. What is the device you are trying to get this working on (UNO, MEGA, Official, Clone)? 3. What are using for compiler (Arduino IDE ... what version, etc).?

      Delete
    2. And one more thing ... the sample will first write to all memory locations (in the case of the IS24C16A, page 1 will be all 1s, page 2 will be all 2s, etc ... up to page 8, Then it will display written values for each written location ... it will then clear all values and again display all memory locations (at that point it will be all zeros) ... are you sure that you aren't just looking at the end result (after the memory is cleared)? It's been awhile since I've looked at this code, but I just tried it with the latest Arduino IDE and it still works fine. So make sure you look at the serial monitor through the entire process).

      Delete
  18. Thank you for the reply Jeff. Am still facing the same issue, even after incrementing delayamt up to 5000.

    1. I am using IDE Version 1.6.2. I had tried lower versions but they also did not work.

    2. I am using the reader by simply tronics. http://shopsimplytronics.com/smart-card-reader/?page_context=search&faceted_search=0

    3. I am using SLE4428 Card . http://www.smartcardworld.com/SLE4428.htm


    4. I am using the example for Card 32322 (IS24C16A)

    ReplyDelete
    Replies
    1. The three sketches are specific to the Parallax Smart Reader and the 3 cars that Parallax sells for it. Although it looks like the SimplyTronics Reader looks to be similar and may work. I can say that the SLE4428 card isn't similar to any of the cards that are supported by the sample sketches. In fact the closest one I see would be the IS23C4442 sketch, since the 32321 card does have the 3-byte protection (as does the SLE4428 card)... but even so, the memory layout/use as defined by the card description is still different. I won't say you can't use my sketches as a starting point and eventually get something working, but I would guess that some significant work will be required.

      Delete
  19. Hi Jeff,
    I'm pretty new to the whole smart card thing and i've been trying to gather information for my own project. Your the only source from which I was able to actually have some sort of code I could understand but i can't seem to make it run... Like how do you call the write or read function when you run the program
    PS. I have the 32320 reader and the 32322card
    Thank you

    ReplyDelete
    Replies
    1. Well, the reader and card are a good start, but for the code that I provided you also need (at a minimum) an Arduino (with power from somewhere) and some patch wires. Once you have those, you should be able to wire it up (as described above in the Blog post) and just build and run the code. Once the sample code works, I would think it would be pretty straight forward. I would recommend that you grab the newer library (the first sentence in the above post has a link to a newer post) that discusses the newer library and allows you to download the latest samples (which are really just the older samples changed out to use the new libraries) ... there is a 32322 card (IS24C16A) sample within those, just like there is a sample provided above ... the nice thing about the library is that it hides the underlying details and lets you focus on building your project. You can Read/Write single characters from/to a specific location on a page of the card or you can read/write a string to/from a page starting at a specific location on a page of the card. I would recommend loooking at the IS24C16A.h file, for the 32322 card so you can determine what the parameters are for each function (the public section is the only thing you need to worry about. Page is the page number (0-7), location is the position on a page (0-255), in the string functions len is the length of the string you are reading, writing or clearing. Hope that helps.

      Delete
    2. Thank you but that is not what I meant, I have my arduino wired up and everything the code seems to work perfectly find but I can't seem to be able to call the read/write/clear memory functions when I go in the serial port. Also i have tried to use the library for the IS24C16A provided on github but i get the error :"avr-g++: error: missing filename after '-o' ".
      Thank you

      Delete
    3. Ok, let's start with a the library error ... if you download the zip from github, extract the SmartCardReader directory and copy the entire directory into your libraries directory you should have everything needed (I just downloaded and it worked)... there were some new warnings that I hadn't seen before (evidently since I upgraded to latest Arduino IDE), which could be safely ignored, but I went ahead and fixed and uploaded them to github).

      Now let's move on ... you aren't aren't able to call the read/write/clear memory functions when you go to the serial port. You say the code seems to work perfectly ... the sample is working? It's not clear ... you can or you can't see the results in the serial monitor when ran?

      I'm just not 100% sure what you mean when you say you 'can't seem to be able to call the read/write/clear memory functions' when you go to the serial port. The program is dumping stuff to the serial port, if you can't see anything in the serial port monitor then it could be because the baud rate is incorrect ... The program uses 9600 baud, but even if you change it, the serial monitor has to match ... I also recommend setting the line ending option to Both NL & CR and also check the AutoScroll option.

      Delete
    4. Oh and 1 more thing ... when looking at the reader (assuming the black plastic cover is on top) ... the chip on the card has to be on the bottom when pushed into the reader. If on top, the Card Detect will work, but it won't go much further than that because it can't read or write to the chip.

      Delete
    5. I resolved all my issues the problem was the fact that I wasn't placing the card in the right way its all up an running.
      Seriously thank you one of the best guide i've found

      Delete
    6. Cool ... glad it's (now) working for you.

      Delete
  20. Thanks for the valuable information and insights you have so provided here... AdLock Media

    ReplyDelete
  21. how to change the psc (authentication) from FF FF FF to my numbers? I have a 4442 card and the psc I want to be 49 28 32h

    ReplyDelete
    Replies
    1. No the source code have a problem and recgnize only the FFFFFF

      Delete
    2. This comment has been removed by a blog administrator.

      Delete
    3. This comment has been removed by a blog administrator.

      Delete
    4. Yep, and that's the way the sample code from Parallax is as well. However, I gave you some code to attempt to resolve that problem (with an option to also resolve the authenticate issue). Like I said, I don't have time to revisit this code right now, but when I do, I'll make some changes to allow for unique PSC bytes ... until them, feel free to change the code for your needs (in reality, you could probably change the Authenticate() method in the library code (IS23SC4442.cpp), change the 3 Password bytes to whatever you need, they are all just 0xFF right now since that's what the default blank card values are and there is no way to change them in the library. But like I said, I'd just move those 3 byte (uint8_t) definitions to the class definition, initialize to 0xFF in the construction then create a function to change the 3 bytes as needed before calling the authenticate method (the function I provided also attempted to update the card, but if you remove the Send_Command calls and the Read(), it would just change the bytes for use during authentication ... which should also resolve your problem).

      Delete

Post a Comment

Popular posts from this blog

Fun with the SolidDigi Color Image LCD Shield

Parallax Smart Card Reader - Revisited