cancel
Showing results for 
Search instead for 
Did you mean: 

LoRaWAN Fragmented Data Block Transport package. How to make it work ?

Ogui
Associate II

Hi everyone!

I am trying to make the LoRaWAN Fragmented Data Blok Transport package work. As a first step, my goal is to send a file such as a txt document (or whatever) to my end-device.

I work with a STM32WL and an End_Node project. I have already added packages to my End_Node project in order to enable Clock Synchronization feature and Multicast feature. I can clock synchronize my device and I can send multicast frames. It works well.

Now, I want to add the Fragmented Data Blok Transport package. However, the files provided in the STM32WL package from ST are mixed up with FUOTA files. Moreover, the proposed files are pre-designed to do FUOTA. However, I only want to enable fragmentation.

The questions are:

-        Does anyone know which files I have to add to my project?

-        I suspect that there will be some changes to make in files. What are the main modifications I must do if I want to achieve my goal?

Really appreciate your attention,

Regards,

3 REPLIES 3
Louis AUDOLY
ST Employee

Hello @Ogui​ ,

Thank you for your interest.

If you want to realize only a file transfert you can take a End Node FUOTA project and let every thing as is.

The only line you will need to remove is the function which will normally check for the signature of the new firmware just received before swapping from the old to the new one.

This is done in the file LoRaWAN_FUOTA\LoRaWAN_End_Node\LoRaWAN\Target\frag_decoder_if.c

in the function FRAG_DECODER_IF_OnDone(), and it is this instruction : FwUpdateAgent_Run();.

At the same place you can now add your function to read your file for example !

If you want to implement the package from scratch, you will need to add all the packages (in Middlewares\Third_Party\LoRaWAN\LmHandler\Packages) except LmhpFirmwareManagement, and do the modifications needed in the LmhpPackageRegistration.c file.

I will advise you to start from the FUOTA example and to remove the parts you don't need !

Let me know if it helps you.

Best regards

Ogui
Associate II

Hello @Louis AUDOLY​ 

Thank you for you answer.

I have implemented the package from scratch. I have:

-         Added all the needed “package�? files (FragDecoder.c, LmhpFragmentation.c, frag_decoder_if.h, frag_decoder_if.c, etc.)

-         Done some minor modifications (commented unneeded parts, etc.)

-         Put the fragmentation mode in “interop�? mode by setting INTEROP_TEST_MODE macro to 1 (in frag_decoder_if.h). Indeed, if I let it setup to 0, some errors appear, and I don’t know how to deal with these ones (errors appear especially on macros such as FRAG_DECODER_DWL_REGION_START / SIZE / etc. in frag_decoder_if.h. It then causes cascade errors in other files.)

Anyway, with the interop mode set to 1, I have managed to enable the fragmentation package. The device now answers to fragmentation commands on port 201.

Now, I work on the server side in order to create and run a successful fragmentation session. I will keep this post up to date if I make any interesting progress.

Thanks again,

Regards

Ogui
Associate II

Hi everyone,

I have managed a successful Data Fragmentation session.

My team has worked on this feature and we’ve documented it. But not just that. We also worked on Clock Synchronization, Multicast and FUOTA.

If anyone wants to learn more about these features, feel free to check:

-       Our free e-book about advanced features [https://www.univ-smb.fr/lorawan/en/free-book/]

-       Our demonstration videos [https://www.youtube.com/playlist?list=PLZQkMBvJm9EIDVI_VpMRksb1GjXc08aiB]

For all intents and purposes, I am posting the link of our website where you’ll

find more information about LoRaWAN: [https://www.univ-smb.fr/lorawan/en/]

Hope this will help,

Regards,