Lora-net / SWL2001

LoRa Basics Modem LoRaWAN stack
BSD 3-Clause Clear License
88 stars 52 forks source link

The stack hangs upon receiving a command on port 203 (Firmware Management Protocol) #13

Closed Ramin-Mardani closed 7 months ago

Ramin-Mardani commented 11 months ago

https://github.com/Lora-net/SWL2001/blob/45e19e5bf783bf874b8c9825b76c4c5befa8bcba/smtc_modem_core/lorawan_packages/fuota_packages/lorawan_fmp_package.c#L489

The device will hang whenever I send a command on port 203 that is specified in Firmware Management Protocol Specification TS006-1.0.0. from the backend. For example, DevVersionReq

I will get the following information from the console:

lorawan_fmp_package_service_downlink_handler receive data on port 203
LoRaWAN App got an event
INFO: Event received: TXDONE
INFO: Transmission done
 lorawan_fmp_package launch REQUEST_REBOOT_TASK_MASK n lorawan_fmp_package launch REQUEST_REBOOT_TASK_MASK n lorawan_fmp_package launch REQUEST_REBOOT_TASK_MASK

The stack doesn't respond to the backend and the phrase REQUEST_REBOOT_TASK_MASK n will be endlessly repeated.

MpmTwtg commented 9 months ago

Having the same issue,

Changing ctx->fmp_task_ctx_mask |= REQUEST_REBOOT_TASK_MASK;

to ctx->fmp_task_ctx_mask |= ANS_CMD_TASK_MASK;

Seems to be the fix, The same problems occurs in fuota_packages_v2

lbm-team commented 9 months ago

Thank you for your feedback, this issue will be fixed in the next release

lbm-team commented 7 months ago

Hi @Ramin-Mardani, @MpmTwtg

This issue is now fixed in new v4.3.0 release and mentioned in CHANGELOG.

Once more thanks for your report