Lora-net / SWL2001

LoRa Basics Modem LoRaWAN stack
BSD 3-Clause Clear License
87 stars 50 forks source link

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

Open aajn opened 1 week ago

aajn commented 1 week ago

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

https://github.com/Lora-net/SWL2001/blob/d05dad5b4df9c0e5899008e43bfce48f5498abb5/lbm_lib/smtc_modem_core/lorawan_packages/firmware_management_protocol/lorawan_fmp_package.c#L717-L733

opeyrard commented 1 week ago

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