Hi @Kan_Li
What do you mean with " reset this device to factory state" ?
If I buy a new SE050F it has some default configuration such as SCP keys defined in document "AN12436
SE050 configurations" and some provisioned objects under IDs reserved for Applet etc.
During lifetime of this device I will change SCP keys or add some private ec keys to SE050F or other objects. "Reset to factory state" I mean that this is a procedure that will restore this SE050F to the same state just after I bought it. So I will expect that all my uploaded objects will be removed and SCP keys that I changed will be also removed (and default SCP keys will be set according to the AN12436 document).
But I have a problem with this because I don't see a possibility to do it.
Of course I found DeleteAll function in "simw-top/hostlib/hostLib/se05x_03_xx_xx/se05x_APDU_impl.h"
smStatus_t Se05x_API_DeleteAll(pSe05xSession_t session_ctx)
But this function requires session_ctx. To have this session_ctx I have to open session. To open session I have to provide SCP keys and this is a problem because I don't have my SCP keys. I can't open session in plain text because this SE050F requires SCP mode.
So when SE050F requires SCP session (plain text mode is rejected) and I changed SCP keys and I lost these keys then this SE050F is unusable because I'm unable to connect to it and this is no "reset to factory" procedure to back it to the working state (I expected that this procedure will remove all my existing objects because of security reasons). Am I correct? Looks like "DeleteAll" still needs opened session (so proper SCP keys are required) to be executed but maybe I misunderstood something.
I'm unable to run any Windows binary. This SE050F is mounted on the camera with Linux and connected with I2C bus only. I don't even have python on this system (I can't use "ssscli") so I can use only Linux binaries which can send commands via I2C bus.
The example "se05x_Delete_and_test_provision" can also be built with flag "SE05X_Auth=value other than None"
I tried but it doesn't work because I still need to provide SCP keys that I don't have.
What we wanted to do is just generate SCP keys on this camera internally and there is a possibility to lost them. If SE050 can't be used without these lost SCP keys then we will have to set the same (and of course well known by us) SCP keys on hundreds of cameras.
Thanks for help
Regards