Skip to main content
Associate
May 22, 2024
Solved

STSafe-A110 unwrap error

  • May 22, 2024
  • 1 reply
  • 1543 views

Hello,

I am using the STSAFE-A110 connected to the ESP32C3 board. I referred to the service interface from this GitHub repository (https://github.com/kmwebnet/stsafe_esp32_test). I have matched the Host MAC key and cipher key exactly as in the example. The current status is that pairing is complete, and the wrap operation returns a success response. However, I am encountering a 0x11 error during the unwrap operation.

 

darzento_0-1716360332192.pngdarzento_1-1716360354743.png

 

Unwrap_Failed : 17 <- print decimal data 

 

 

 

Best answer by darzento

Hi @Benjamin BARATTE ,

 

After posting the question, I checked the code and found that the CRC algorithm was incorrect. After making the corrections, I tested it and it worked.

Thank you.

Best Regards,

Darzento

 

1 reply

ST Employee
June 21, 2024

Hi @darzento ,

 

As the wrap envelop is working fine, one reason to get such error is that the envelop you hare sending to the unwrap command is corrupted.

Could you check the input parameter you pass to the StSafeA_Unwrap() API ?

Best Regards,

Benjamin

darzentoAuthorBest answer
Associate
June 26, 2024

Hi @Benjamin BARATTE ,

 

After posting the question, I checked the code and found that the CRC algorithm was incorrect. After making the corrections, I tested it and it worked.

Thank you.

Best Regards,

Darzento

 

ST Employee
June 26, 2024

Hi @darzento ,

 

Thanks for the feedback.

Normally, in case of CRC error in the CRC bytes, you should get a STSAFEA_COMMUNICATION_ERROR from the STSAFE-A.

Best Regards,

Benjamin