Hello all, I am looking for some assistance on understanding an issue I am having with the OTA library on mongoose OS. Hopefully you can provide some insight!
My goal is:
I am using the OTA update library to flash new firmware on to my device (ESP 32) from AWS, but it only succeeds intermittently. I am using the ATECC608A and associated library for key generation.
My actions are:
Run the OTA update on a connected and operating device.
The result I see is:
on failure of the OTA update, “mos console” logs the following:
[Jul 21 08:00:12.523] mg_ssl_if_mbedtls.c:35 0x3ffee1c0 ciphersuite: TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256
[Jul 21 08:00:13.309] ATCA:2 ECDH get pubkey ok
[Jul 21 08:00:13.383] ATCA:2 ECDH ok
The OTA update does not progress from this point.
- My expectation & question is:
I would expect the OTA update to proceed, and sometimes it does. It appears to proceed when the pubkey is NOT recovered from the ATECC608A chip as shown below:
[Jul 21 08:06:24.004] mg_ssl_if_mbedtls.c:35 0x3ffecf8c ciphersuite: TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256
[Jul 21 08:06:24.786] ATCA:3 failed to gen ECDH pubkey: 0xf4
[Jul 21 08:06:24.786] SW ECDH curve 3
[Jul 21 08:06:26.508] mgos_ota_core.c:253 Starting, timeout 600, commit timeout 300, mem 52836
OTA update proceeds from here.
It appears that this is some issue with the ATCA chip/library, probably in the way that I am using it. Any suggestions?