Skip to content
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

No DevUpgradeImageAns when the FW upgrade image is not valid #69

Open
aajn opened this issue Jun 24, 2024 · 1 comment
Open

No DevUpgradeImageAns when the FW upgrade image is not valid #69

aajn opened this issue Jun 24, 2024 · 1 comment

Comments

@aajn
Copy link

aajn commented Jun 24, 2024

Hi,

in v4.5.0, when FMP DevUpgradeImageReq is handled the DevUpgradeImageAns is only sent if the FW status is valid (UpImageStatus = 3). I think this is not in line with TS006-1.0.0 and the answer should be sent regardless of UpImageStatus. While the FW version should only be sent when UpImageStatus = 3.

This can be fixed by moving ctx->fmp_task_ctx_mask |= ANS_CMD_TASK_MASK; outside of the if

if( ( ans_index + FMP_DEV_UPGRADE_IMAGE_ANS_SIZE ) <= max_payload_size )
{
ctx->fmp_tx_payload_ans[ans_index++] = FMP_DEV_UPGRADE_IMAGE_ANS;
ctx->fmp_tx_payload_ans[ans_index++] = tmp_fw_status;
if( tmp_fw_status == VALID_FIRMWARE_UPGRADE_IMAGE )
{
uint32_t next_fw_verion = smtc_modem_hal_get_next_fw_version_for_fuota( );
ctx->fmp_tx_payload_ans[ans_index++] = next_fw_verion & 0xFF;
ctx->fmp_tx_payload_ans[ans_index++] = ( next_fw_verion >> 8 ) & 0xFF;
ctx->fmp_tx_payload_ans[ans_index++] = ( next_fw_verion >> 16 ) & 0xFF;
ctx->fmp_tx_payload_ans[ans_index++] = ( next_fw_verion >> 24 ) & 0xFF;
ctx->fmp_task_ctx_mask |= ANS_CMD_TASK_MASK;
}
}
break;

@opeyrard
Copy link

Hi,
Thank you very much for your feedback.
Your remark is valid.
We will fix it in the next coming release.
Many thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants