Hi Fatih, I wish you could send me or post the pinout of your project, in 2004, i got this card read from an ex girlfriend, she got it from her farher working on the phone company in my country and it seems to be just straight to the pine output, without any chip, something similar to your project, i just found out that has two 103 capacitors attached seeks like in parallel to VCC, will be great if you could help me, I saw that you followed Angus great project and library, but im kinda lost, because seems like need 3 100khom resistors, Thanks im a advance and best regards.!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
as this will "trigger" a wait for 256 bytes, which are normally not provided by a "SELECT FILE" command, they will be send by a "GET RESPONSE" ... So as in the example I would recommend a resp_size of "0".
Regards
Angus71
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can you go one step back and use the code-sniplet provided (Based on the original T0 example), this should select a "default" file, just to see if the "Select File" command works and there might just be a "problem" with the file name/command you use ... :-)
// We just use the T=0 byte transfer
command.cla = 0x00;
command.ins = 0xA4;
command.p1 = 0x04;
command.p2 = 0x00;
command.data_buf = data;
command.data_size = 2;
command.resp_size = 0x00;
data[0] = 0x3F;
data[1] = 0x00;
Serial.println("SELECT FILE Command ...");
uint16_t result = sc.sendAPDU(&command);
Serial.print("Received ... ");
Serial.println(result, HEX);
Regards
Angus71
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I'm not mistaken, the "answer" you have seen is actually a "requet" of the card to set the "IFS" to 254, so that a "lot" of data can be transmitted via one command ...
You can check if you get better results, when you change the IFS request in the example to the following ... So the card does not need to "request" an IFS change form it's side
~~~
Serial.print("Try to change IFS ... ");
// Offer the card to send a maximum of 0x20 bytes per block
// Node Adress 0 (Value 0xFE)
if (sc.changeIFS(0, 0xFE)) {
Serial.print("OKAY (Set to 0x");
Serial.print(sc.getCurrentIFS(), HEX);
Serial.println(")");
} else {
Serial.println("FAILED");
}
delay(100);
~~~
Regards
Angus71
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
response wrong.
for example. i am changeing worng apdu codes .. giving error message .. correct
but i am chanceing true apdu codes . giving diffrent data ...
:(
i will not sleep to night...i must be fix this..
thanks
Last edit: Fatih GÜNGÖR 2018-06-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i need read card data whit arduino ...
i am using aptu_t0_communication.ino. my lib SCl0.0.7rc4.
everythink is ok.. but only i can take ATR code..(but today not working.)
i am using pin 8 manual true and false)
i want to chose File 3f10-3f20-2f11 . i didnt .
i read data whit c# . for example my apdu codes for c# and working...
byte[] cmdApdu = { 0X00, 0Xa4, 0X08, 0X00, 0X06, 0x3D, 0x10, 0x3D, 0x20, 0x2f, 0x10,00 };
// select file
scard.Transmit(cmdApdu, cmdApdu.Length, respApdu, ref respLength);
byte[] cmdApdu3 = { 0X00, 0XB0, 0X00, 0X04, 0x0A};
// read file
scard.Transmit(cmdApdu3, cmdApdu3.Length, respApdu3, ref respLength3);
//My data
tc = Encoding.UTF8.GetString( respApdu3);
////
i want to make same read operation ..
...
i am using Uno. and i dont know my chart chip....
Last edit: Fatih GÜNGÖR 2018-06-17
Hi Fatih, I wish you could send me or post the pinout of your project, in 2004, i got this card read from an ex girlfriend, she got it from her farher working on the phone company in my country and it seems to be just straight to the pine output, without any chip, something similar to your project, i just found out that has two 103 capacitors attached seeks like in parallel to VCC, will be great if you could help me, I saw that you followed Angus great project and library, but im kinda lost, because seems like need 3 100khom resistors, Thanks im a advance and best regards.!
Hi Fatih,
I've delete the images just for "not" showing them to all ... ;-) ... I've had a look on them, so we can discuss them later on ...
Can you share the connection to the Arduino (Card "pad" to Arduino pin) and the used frequency selected in the header file of the Arduino?
Regards
Last edit: angus71 2018-06-17
finnaly i added my fotos :D
115200 my arduino boud.
define SC_C2_RST 7
define SC_C1_VCC 11
define SC_C7_IO 10
define SC_C2_CLK 9
connections
pin 8 manuel true and false
my ATR
Received ATR ...
00|3B 9F 97 81 31 FE 45 80 65 54 43 D2 21 08 31 C0 ';...1.E.eTC.!.1.'
10|73 F6 21 80 81 05 5B 's.!...[.........'
SELECT FILE Command ...
Received ... 0
this is true because i read whit c# appliatins..
Last edit: Fatih GÜNGÖR 2018-06-17
my header file
and my last serial status.
my arduino select file codes
Last edit: Fatih GÜNGÖR 2018-06-17
Hi Fatih,
Are you sure you need
as this will "trigger" a wait for 256 bytes, which are normally not provided by a "SELECT FILE" command, they will be send by a "GET RESPONSE" ... So as in the example I would recommend a resp_size of "0".
Regards
Angus71
my ATR analys
Last edit: Fatih GÜNGÖR 2018-06-17
Hi Fatih,
Can you go one step back and use the code-sniplet provided (Based on the original T0 example), this should select a "default" file, just to see if the "Select File" command works and there might just be a "problem" with the file name/command you use ... :-)
Regards
Angus71
Hi Fatih,
Based on your C# code I expect the command you use should be
As it looked like you put the command size as the first entry into the data
Regards
Angus71
i tryed 2 sample.. but result is same..
:(
Waiting for Smartcard
Smartcard found
Received ATR ...
00|3B 9F 97 81 31 FE 45 80 65 54 43 D2 21 08 31 C0 ';...1.E.eTC.!.1.'
10|73 F6 21 80 81 05 5B 's.!...[.........'
SELECT FILE Command ...
Received ... 0
what is wrong. :(
maybe this is t=1 protokol must be.
but i used same apdu codes but protokol t=1 whit c#..
what change code for t1 protokol
and pin 8 always true... ok
Last edit: Fatih GÜNGÖR 2018-06-17
Hi Fatih,
This should quite simple, just try the t1 example?
examples/apdu_t1_communication/apdu_t1_communication.ino and fill in your command from c# into the "data", just as you give it there ...
Regards
Angus71
where is t1 example ????
opss
i found trunk exapless.
i will try ......
thanksssssssssssssssssssssss angus
thank you very much
......
and thanks for patience....
Last edit: Fatih GÜNGÖR 2018-06-17
YES...
step step contiouning angus...
i tryed t1 ..and my result...
Waiting for Smartcard
Smartcard found
Received ATR ...
00|3B 9F 97 81 31 FE 45 80 65 54 43 D2 21 08 31 C0 ';...1.E.eTC.!.1.'
10|73 F6 21 80 81 05 5B 's.!...[.........'
Checking for T1 - Protocol ... Supported
Try to change IFS ... OKAY (Set to 0x20)
Selecting AID D2 76 00 01 24 01 (OpenPGP) ...
00|00 C1 01 FE 3E '....>...........'
Last edit: Fatih GÜNGÖR 2018-06-17
my card
3D0-3D20-2F10 my data adres.. and my data 34 33 33 33 33 38 37 35 35 35 - 90 00
where are you
god's of the arduniooooooooo
Hi Fatih,
you are able to read the data ? That's sounds good..
Regards
Angus71
hi dear angus
yes i read somethink but. i dont know what i read ..
firstly..
i must be select file
later i read this file..
here is only one procedure working here..
for example.
first i need select
3D-10-3D-20-2F-10 file
later i read
00 0B 00 04 0A
read command for abdu..
i tyred a lot of variation but nope.. what is wrong..
i changed bound ..
i changed file adres
i changed wrong codes . always same return same result.
:(
litte bit more help angus. i know you are busy.
thanks for help..
Last edit: Fatih GÜNGÖR 2018-06-17
Hi Fatih,
When I'm not mistaken, the "answer" you have seen is actually a "requet" of the card to set the "IFS" to 254, so that a "lot" of data can be transmitted via one command ...
You can check if you get better results, when you change the IFS request in the example to the following ... So the card does not need to "request" an IFS change form it's side
~~~
Serial.print("Try to change IFS ... ");
~~~
Regards
Angus71
hi angus ..
same result.. :( i am trying diffrent thinks.
response wrong.
for example. i am changeing worng apdu codes .. giving error message .. correct
but i am chanceing true apdu codes . giving diffrent data ...
:(
i will not sleep to night...i must be fix this..
thanks
Last edit: Fatih GÜNGÖR 2018-06-17
Hİ ANGUS
tryed alot of think apdu codes...
delay(1000);
delay(1000);
////////////////// but result is sameeeeeeeee
i changed frequance
i changes codes
i changed parameters..
what is wrong.. what is worng..
same car working on c# .. damm.. same abdu command..
:(
i will be crazy
what is this respond dammmm
00| 00 C1 01 FE 3E EF
this respond must be 90 00 but i am takeing this message...
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr