cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WL FUOTA Firmware swapping issue

AElgh
Associate III

Hello everyone,

 

The LoRaWAN_End_Node from LoRaWAN_FUOTA Project (STM32Cube_FW_WL_V1.3.1) is used with ChirpStack as a network server (supports the FUOTA Package V1).

 

AElgh_0-1749025843655.png

 

The Multicast session runs and receives the Downlink of all the Fragmented Packets from the server.

 

AElgh_2-1749026679942.png

 

The issue appears after receiving the last packet. Seems that the Firmware doesn't recognize that the downloaded firmware is complete, and it should begin building it.

 

In AN5554(P10):

The V1.0 package, and particularly Fragmented Data Transport specification [TS-004] (see document [3]), does
not provide a way to inform the server that all data blocks have been properly received in order to rebuild the
current download file. 

Trying to find a way to let the Firmware swaps to the new version rather than flip back(after the expiration of the Fragmention status request) to the old Firmware:

AElgh_1-1749026569602.png

 

Tracing the logs, there is no sign of FRAG_DECODER_IF_OnProgress and FRAG_DECODER_IF_OnDone being called. Hence, FwUpdateAgent_Run() never runs either.

 

Is there a way to fix this without the need to run an external fragmentation server(to implement the proprietary protocol)?

 

 

Thank you

 

2 REPLIES 2
STTwo-32
ST Employee

Hello @AElgh 

according to the AN5554, If needed, the user is responsible for implementing a 'proprietary' protocol to avoid such behavior. For instance, when all the required fragments have been received and the current download file rebuilt, a simple crc32 can be computed and sent back to the server. The server should decide to stop broadcasting the remaining fragments.
This approach requires cooperation between the device maker and the network operator to define the
'proprietary' part of the protocol.

So, you should dead with the network operator for the proprietary part of the protocol.

Best Regards.

STTwo-32

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

AElgh
Associate III

@STTwo-32 Thank you for your response but in my case, the current download file doesn't rebuilt, the firmware just hang on the last packet(CNT = 95 in the 2nd photo) then after fragment-status-request send from the Server(which doesn't get any response from my Node until it reaches timeout) the Firmware switches back to Class-A.

 

I can see inside LmhpFragmentation.c  the function LmhpFragmentationOnMcpsIndication, which has the case FRAGMENTATION_FRAG_STATUS_REQ  which should be called when the FUOTA server asks for the status, but it never runs!!.