-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net: lib: nrf_cloud_coap: Various cleanups / fixes #17300
Conversation
You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds. Note: This comment is automatically posted by the Documentation Publishing GitHub Action. |
CI InformationTo view the history of this post, clich the 'edited' button above Inputs:Sources:sdk-nrf: PR head: 2c58526c6fbf311065aa818db9f7869f8f0d1ae9 more detailssdk-nrf:
Github labels
List of changed files detected by CI (7)
Outputs:ToolchainVersion: Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
e8f3492
to
67febe5
Compare
67febe5
to
9cbd24b
Compare
9cbd24b
to
826e381
Compare
826e381
to
0da62af
Compare
* download when doing a full modem FOTA, which does not currently work. | ||
*/ | ||
if (ctx_ptr->img_type == DFU_TARGET_IMAGE_TYPE_FULL_MODEM) { | ||
int err = fota_download_util_image_reset(DFU_TARGET_IMAGE_TYPE_FULL_MODEM); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea... seems like this should be done in fota_download
since it knows more about the specific failure mode and if it is possible to resume.
but if not, i believe it makes sense to do this only when evt->cause
is one of these values:
/** The update is invalid and was rejected. Retry will not help. */
FOTA_DOWNLOAD_ERROR_CAUSE_INVALID_UPDATE,
/** Actual firmware type does not match expected. Retry will not help. */
FOTA_DOWNLOAD_ERROR_CAUSE_TYPE_MISMATCH,
/** Generic error on device side. */
FOTA_DOWNLOAD_ERROR_CAUSE_INTERNAL,
FOTA_DOWNLOAD_ERROR_CAUSE_INTERNAL
seems to be a catch-all cause... it is possible there are cases when resuming might still work, but would take some investigation in fota_download
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, the error code I get when it fails is FOTA_DOWNLOAD_ERROR_CAUSE_DOWNLOAD_FAILED.
I don't think resumption works at all for full modem fota atm. Sure, resumption does happen. But the hash is wrong after the image is downloaded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created a ticket for this:
https://nordicsemi.atlassian.net/browse/NCSDK-29230
e86842a
to
92c9aa3
Compare
92c9aa3
to
d0b445e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK.
You need a change log though.
Will add! |
Convert error callback to include general status notifications from the FOTA library as well as error events. This gives the application the opportunity to block network related operations during FOTA updates. Add image type to reboot function to allow the application to reinitialize the modem after a firmware update. Its not nessecary to reboot the device after modem FOTA. Signed-off-by: Simen S. Røstad <[email protected]>
- Use nrf modem library CFUN callback to prevent modem info calls in offline and powered off states. This is needed instead of fetching the func mode due to the modem being shutdown when a lte handler notification is received. - Ease up on the logging when modem info API are called. Its expected that they fail in certain scenarios, and logging an error in those instances is not necessary. Signed-off-by: Simen S. Røstad <[email protected]>
Add option, CONFIG_NRF_CLOUD_COAP_DISCONNECT_ON_FAILED_REQUEST, that disconnects the CoAP client on a failed request. Disabled by default. Signed-off-by: Simen S. Røstad <[email protected]>
c3450f1
to
2c58526
Compare
Various fixes / cleanups needed for the Thingy91x Out of Box firmware.
Mostly small stuff found during testing of Full Modem FOTA.