cancel
Showing results for 
Search instead for 
Did you mean: 

Read GnuPG card with STM32

MauFanGilaMedical
Associate II

Hello.

I have  to develop a project with Riverdi STM embedded display (that uses STM32H757).

 

In this project I have to read the USER NAME and the SERIAL NUMBER of GnuPG smart card.

 

I started from AN4800 that is for GSM File system Smart Card but I don't understand how it works.

 

I search on internet and GnuPG card is used by this library git.gnupg.org Git - gnupg.git/summary .

 

Can someone support me?

 

Someone has tried to use GnuPG card?

 

Thankyou in advice.

 

 

 

 

 

3 REPLIES 3
SofLit
ST Employee

Hello,

Need to know which type of protocol your SmartCard follows, T=0 or T=1.

The structure of T=0:

SofLit_0-1739784206058.png

For T=1 protocol is more complex and it manages large data transfer.

So you need from you to understand how your Smart Card is operating. There is no other solution. Read again carefully the application note AN4800 and also AN4100.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
PS:
1 - This is NOT an online support (https://ols.st.com) but a collaborative space.
2 - Please be polite in your reply. Otherwise, it will be reported as inappropriate and you will be permanently blacklisted from my help.
MauFanGilaMedical
Associate II

 

I have already read AN4800 (hope enough carefully),

 

but  AN4100 is older than the other, isn't it ?

 

Ok, my card is T1 type because I run the example "\ SmartCardAN4800 \ AN4800_FW_V1.0.0" and it ends into HardFault_Handler because of zero division due to "sc_freq" value.

MauFanGilaMedical_0-1739787154010.png

 

But I have some dubt: the example that you give is for GSM File system card type.

 

My card is GnuPG type and I have to read the CardHolder Name

 

MauFanGilaMedical_1-1739787424686.png

that has 0x005B as tag and is under the 0x0065-tag directory.

 

So, what APDU sequence I have to send?

 

I'm newer in Smart Card and GnuPG.

 

Thankyou.

 

 


@MauFanGilaMedical wrote:

Ok, my card is T1 type because I run the example "\ SmartCardAN4800 \ AN4800_FW_V1.0.0" and it ends into HardFault_Handler because of zero division due to "sc_freq" value.


As I can see from the code sc_freq is an input to the function, so need to fill it with the smart card frequency in Hz.

 


@MauFanGilaMedical wrote:

So, what APDU sequence I have to send?


Need to contact the SmartCard manufacturer for that. Sorry I cannot help you on this.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
PS:
1 - This is NOT an online support (https://ols.st.com) but a collaborative space.
2 - Please be polite in your reply. Otherwise, it will be reported as inappropriate and you will be permanently blacklisted from my help.