Menu

Arduino whit APDU CODES

2018-06-17
2022-01-30
<< < 1 2 (Page 2 of 2)
  • angus71

    angus71 - 2018-06-18

    Hi Fatih,

    As said before, the respond is the "card" requesting an IFS change ... The Aruino has to answer it correctly so that further communication is possible .. To anser it try the following code, after receiving the above response ...

        data[b++] = 0x00;
        data[b++] = 0xA4;
        data[b++] = 0x08;
        data[b++] = 0x00;
        data[b++] = 0x06;
        data[b++] = 0x3d;
        data[b++] = 0x10;
        data[b++] = 0x3d;
        data[b++] = 0x20;
        data[b++] = 0x2f;
        data[b++] = 0x10;
        data[b++] = 0x00;
        Serial.print("Select File  :  (OpenPGP) ... ");
        sc.send_IBlock(0x00, data, b);
    
        bytes_received = sc.receiveBytes(data2, 255);
        // bytes_received should be 5 and normally I would check 
        // if data2[1] == SBLOCK_IFS_REQ, but for testing this should be 
        // okay 
    
        // Create IFS response
        data[0]= 0xFE;
        sc.send_SBlock(0, SBLOCK_IFS_RESP, data, 1);
    
       // Now wait for the "actual" answer to your request
       bytes_received = sc.receiveBytes(data2, 255);
    

    Regards

    Angus71

     

    Last edit: angus71 2018-06-18
  • Fatih GÜNGÖR

    Fatih GÜNGÖR - 2018-06-18

    hi angus

    thank you very very very much...
    it worked.

    you are king of the arduinooooooooooooooooooooooooo

    Regardsssssssssssssssssssssssssss

    Fatih

     
    • Ege Atay

      Ege Atay - 2022-01-25

      Hello, I have a few questions about your program and your attempts.

      Are you available?

       
  • Paul Chen

    Paul Chen - 2019-06-28

    Angus and Fatih,

    Your work and discussion thread are very helpful with amazing details. I faced a similar issue when using t0, always Received 0. Then changed to t1 and it works well in APDU.

    Many thanks

     
<< < 1 2 (Page 2 of 2)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.