T=1 over I2C + APDU commands in SE050

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

T=1 over I2C + APDU commands in SE050

Jump to solution
5,909 Views
nidhintomy
Contributor IV

Which api is used for starting the i2c communication in SE050?

status_t I2C_MasterStart(I2C_Type *base, uint8_t address, i2c_direction_t direction); is used for starting i2c in MCU. But which api is used in secure element se050 instead of this api as t=1 over i2c(T1oI2C).

Are we need to set T1oI2C structure or just set apdu structure as it is format specified in SE050 APDU Specification- AN12413.

I tried to learn from K64F SE HostLib GetInfo example. But can't understand what is the flow of code.

Please help me.

Thanks.

Tags (1)
0 Kudos
Reply
1 Solution
5,864 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @nidhintomy ,

 

The T1oI2C function is also handled by the MW, and you may find all details in the folder of "simw-top\hostlib\hostLib\libCommon\smCom".

 

Hope that helps,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

7 Replies
5,896 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @nidhintomy ,

 

Are you referring to the latest MW? Actually for each APDU command, there is a dedicated API for it. For example, Se05x_API_ReadObject(). and if you prefer to do raw APDU transfer, you may refer to smCom_TransceiveRaw(), as invoked in JCOP4_GetDataIdentify() from the get info demo.

 

Hope that makes sense,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

5,886 Views
nidhintomy
Contributor IV

Hi @Kan_Li 

Thanks for helping.

I have some questions.

There are a lot of API. How i decide which i need?

If a specific api for each apdu, then why we set an apdu in GetInfo Example.Se05x_GetInfo.c line no.210. Why we set apdu in there?

Thanks.

 

0 Kudos
Reply
5,879 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @nidhintomy ,

 

Sorry for the confusion! Actually each APDU command issued to the IoT applet has a dedicated API, but the commands issued to the card manager are not like that, you have to set it up in raw data as shown in GetInfo Example.Se05x_GetInfo.c line no.210.

 

Hope that makes sense,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

5,847 Views
nidhintomy
Contributor IV

Hi @Kan_Li 

Do the value and meaning of  APDU fields P1 and P2 depends on INS field?

Thanks

0 Kudos
Reply
5,818 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @nidhintomy ,

 

No, they are independent ,  please kindly refer to "4.3.4 P1 parameter" in https://www.nxp.com/docs/en/application-note/AN12413.pdf for more details.

 

Hope that helps,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

5,873 Views
nidhintomy
Contributor IV

@Kan_Li 

But i can't find any trace to T1o2C. Is the functions handle that part alone? Or we need to set it in some other files?

Thanks

 

0 Kudos
Reply
5,865 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @nidhintomy ,

 

The T1oI2C function is also handled by the MW, and you may find all details in the folder of "simw-top\hostlib\hostLib\libCommon\smCom".

 

Hope that helps,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------