I have a question about the OTA update on the nNRF52840 DK.
I enabled CONFIG_OTA_UPDATE_DEMO_ENABLED to run OTA example.
and execute iOS SDK for Amazon FreeRTOS Bluetooth Devices on iPhone.
but when nRF52840DK received final expected block of file,
I got error log:
[OTA Task] [prvStopRequestTimer] Stopping file request timer.
[OTA Task] [prvPAL_CloseFile] Erasing the flash memory was successful
[OTA Task] [prvPAL_CheckFileSignature] Signature check failed
[OTA Task] [prvIngestDataBlock] Error (1:0x000000) closing OTA file.
[OTA Task] [prvOTAUpdateTask] Aborting due to IngestResult_t error -2
[OTA Task] [prvUpdateJobStatus] Msg: {“status”:“FAILED”,“statusDetails”:{“reason”:“0x01000000: 0xfffffffe”}}
According to OTA Agent error codes, error 0x01000000 indicates that the signature check failed.
but not sure what I was missing.
Thank you for providing details and logs for the issue and can also share which release you are using?
The update to aws_clientcredential_keys.h is not required with code signing certificates. The file that should be update to add the code signing certificate is aws_ota_codesigner_certificate.h which you have updated and I assume these are test certificates.
From the logs it is clear that the signature verification step failed after receiving the complete image. Can you please verify that the code signing profile is created correctly with the generated certificates? Another thing that we can check is if the certificate is correctly formatted when pasting it in aws_ota_codesigner_certificate.h. If you are not already using the PEMfileToCString.html tool provided in tools\certificate_configuration\ please use that to format and paste the certificate in aws_ota_codesigner_certificate.h
Also please make sure before flashing the first image erase the complete flash.
Please let me know after verifying these steps if this is still an issue.
Now my nRF52840DK look like OTA update success.
I got a log(OTA demo version 4.4.4) after nRF52840DK reboot.
The version is my OTA bin file on S3 bucket and the bin file still run vStartOTAUpdateDemoTask()
nRF52840 DK can’t BLE broadcast and pair with Mobile APP when nRF52840DK runs OTA firmware(4.4.4).
I try to press reset key on DK board, DK board no response(without any log but LED2 flash)
The error means the IOS SDK was able to reconnect to BLE but unable to access the BLE GATT service after the new image was activated. I ran sample OTA for nRF52840DK , with latest commit for FreeRTOS master branch and latest commit for IOS SDK, but couldn’t reproduce the same issue.
Attached (ota_nordic.txt), the logs from my run.
Could you confirm if you have made change to any BLE GATT services in the new image after the OTA update ? IOS keeps a cache of the GATT services it discovered previously, and fails to access correctly if the GATT services changed on the device.
You can recreate the bond and restart the device to clear the cache on IOS BLE stack.
Edited by: ravishankar-AWS on Oct 7, 2019 11:58 AM
Hi TimLai,
Did you get this app from Apple Store? I couldn’t find this app, so I tried to compile from source. Tried with Xcode 11.3.1 and 11.6 (latest) and both failed with
Undefined symbols for architecture x86_64:
“OBJC_CLASS$_AWSServiceConfiguration”, referenced from:
objc-class-ref in AmazonFreeRTOSDevice.o
“OBJC_CLASS$_AWSEndpoint”, referenced from:
objc-class-ref in AmazonFreeRTOSDevice.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)