Skip to content

LoRaWAN Multicast Issue

0

Hi, I wanted to test FUOTA with the LoRa Basic Modem stack. I am using nRF52840 and LR1121 board. I give it a try by following this video (https://www.youtube.com/watch?v=GKSzBCn-HsI) and this tutorial (https://catalog.us-east-1.prod.workshops.aws/workshops/b95a6659-bd4f-4567-8307-bddb43a608c4/en-US/480-fuota/200-deviceprofile) but I had issue with multicast. The device status never changes to "Multicast setup ready".

I tried to do a multicast session, most of the time the device status doesn't change. I managed to make a multicast session and shcedule a downlink message by deleting the device, the device profile and the multicast and adding new ones but i can't reproduce it.

I saw from logs that after PackageVersionReq (Multicast) the device show me this message : "lorawan_remote_multicast_setup_package launch REQUEST_TIME_SYNC_TASK" but there is no DeviceTimeReq send from the device. When i don't have the message "Multicast setup ready" and I try to delete the multicast group, logs show me that the group doesn't exist.

Let me know if you have any idea to solve the problem

Thanks

asked 2 years ago817 views

8 Answers
1

Hi. As shown in the video, AWS IoT Core for LoRaWAN (AICL) will send the following downlink requests:

  1. Multicast PackageVersionReq and your device should respond with PackageVersionAns.
  2. Clock sync ForceDeviceResyncReq and your device should respond with DeviceTimeReq (MAC command 0x0d, and AICL will respond with DeviceTimeAns, also MAC command 0x0d).
  3. Multicast McGroupSetupReq and your device should respond with McSetupGroupAns

Knowing that sequence, you can determine where yours is falling over. Are you saying that your device received ForceDeviceResyncReq? But then doesn't send DeviceTimeReq? How are you monitoring it? Does AICL ever send McGroupSetupReq?

AWS
EXPERT

answered 2 years ago

0

Hi, I still have FUOTA problems which seems similar to you. I noticed slight improvements when I didn't check Supports Class C in device profile. I managed to launch some FUOTA but it was too random

answered 2 years ago

  • Hi, Could you please share your device profile and service profile ? Thanks

  • You should only select SupportsClassC if your device will operate all the time in Class C. If it's class A, and just swapping to Class C for multicast, don't select it.

  • aws iotwireless get-device-profile --id 33f77a0b-d83c-43ac-9983-22e0526deed7
    {
        "Arn": "arn:aws:iotwireless:us-east-1:012345678901:DeviceProfile/33f77a0b-d83c-43ac-9983-22e0526deed7",
        "Name": "ST Nucleo-WL55JC1",
        "Id": "33f77a0b-d83c-43ac-9983-22e0526deed7",
        "LoRaWAN": {
            "SupportsClassB": false,
            "SupportsClassC": false,
            "MacVersion": "1.0.3",
            "RegParamsRevision": "RP002-1.0.1",
            "RxDelay1": 1,
            "RxDrOffset1": 0,
            "RxDataRate2": 8,
            "RxFreq2": 9233000,
    
  •         "FactoryPresetFreqsList": [
                9168000,
                9170000,
                9172000,
                9174000,
                9176000,
                9178000,
                9180000,
                9182000,
                9175000
            ],
            "MaxEirp": 13,
            "MaxDutyCycle": 0,
            "RfRegion": "AU915",
            "SupportsJoin": true,
            "Supports32BitFCnt": true
        }
    }
    
0

Hi, I get the solution, although it seems like update not successful, at least the workflow has finished.

last package (REDUNDANCY set 10% seems too little?):

Enter image description here

  1. I set fragment 64 it will become the previous comment, OTA task can't start,
  2. I failed before because the timestamp is a counter(Start from 0), it does not change UTC, so the task also can't work(so when I see the AWS doc, I think the package version has a problem),
  3. in flash_if.c ->FLASH_IF_INT_Write, it check "IS_ADDR_ALIGNED_64BITS", so fragment needs set 8-byte aligned, I set 48 bytes can work, or it will show flash write error.

in https://community.st.com/t5/stm32-mcus-wireless/lorawan-fuota-example-migrate-to-stm32wle5/td-p/596051, someone says he can work on 64/128 bytes fragments, but I can't. so if I want to use 64/128 bytes, what should I do?

AWS task configuration

Enter image description here

unicast can't be over 50 bytes, can multicast? my test multicast 64 bytes results are like the first point above.

answered 2 years ago

  • I'm not sure I understand you.

    I set fragment 64 it will become the previous comment, OTA task can't start,

    Do you mean specifically that unicast FUOTA can't start? I think that's what you mean. If so, I don't see it as a problem. For me, on multicast, it works with 48, 56 and 64-byte payloads (after I fixed the ST firmware).

  • Please also be aware that the source buffer needs to be 8-byte aligned. As discussed in that community post:

    Device gets into hard fault, there is "unaligned memory error", when 48-bytes of firmware is coppied to flash memory using LDRD command. It happens because source address is 0x200071EF which is not 8-byte aligned. I fixed that with very simple coppying to another buffer.

    If you don't fix that, your device will crash when it receives the first fragment. Maybe that is what you mean by "OTA task can't start".

  • last package (REDUNDANCY set 10% seems too little?):

    It depends on your conditions. For me, here in my office, I don't even lose 1% of messages.

0

From what I see from the networkAnalyzer I don't have this sequence. Most of the time I have 3 PackageVersionReq send, the first one is never received from the end-device. Those after are received and the device answers to them with PackageVersionAns. But after thatMcGroupSetupReq are send and if my device receive it and answer it with a McGroupSetupAns then the device status is changed to "Multicast setup ready". After that sometimes the device receive ForceDeviceResyncReq, so it sends DeviceTimeReq and then the device receive DeviceTimeAns but those request relying to LoRaWAN Application Layer Clock Synchronization Specification are never shown in the Network Analyzer. I do think my issues came from the difference of version of LoRa Alliance specifications of AICL and my device. I want to notify that these 2 pages (https://docs.aws.amazon.com/iot-wireless/latest/developerguide/lorawan-mc-fuota-overview.html & https://docs.aws.amazon.com/fr_fr/iot-wireless/latest/developerguide/lorawan-mc-fuota-overview.html) confused me. Which LoRa Alliance specifications versions AICL is respecting ? Does it depend on the server we are on?

answered 2 years ago

  • Hi. OK, so it looks like you're getting all the messages. The repeats of the PackageVersionReq are an issue that is being addressed, but in my experience it doesn't stop anything from working. And it doesn't matter if ForceDeviceResyncReq comes before or after McGroupSetupReq (so long as the clock synchronization happens before the session start time). Thanks for pointing out the conflict between the English and French developer guides. I will get that fixed. I think the English one is correct, but I'm confirming that. I will post another comment here.

  • The English edition is correct.

0

Hi everyone, I have same question, i have checked all languages, only Basha Indonesia as same as English, LoRaWAN Remote Multicast Setup Specification, TS005-2.0.0 LoRaWAN Fragmented Data Block Transportation Specification, TS004-1.0.0 LoRaWAN Application Layer Clock Synchronization Specification, TS003-1.0.0 https://docs.aws.amazon.com/id_id/iot-wireless/latest/developerguide/lorawan-mc-fuota-overview.html https://docs.aws.amazon.com/iot-wireless/latest/developerguide/lorawan-mc-fuota-overview.html

the other URL all write TS004-2.0.0、TS003-2.0.0, my device also can into "Multicast setup ready" status, and when I set OTA task, the device can change class A-> C(device log: "Switch to Class C done"), AWS IOT Core ->LPWAN devices ->Network analyzer can see the downlink data when the task starts, but end device only receive fragment data once.

specification have a variable in the lorawan_conf.h ==> #define LORAWAN_PACKAGES_VERSION 1 default is 1, if I set 2, timestamp will change to GPS time after the multicast group is established, and task start, device can't change Class A -> C.

answered 2 years ago

  • Hi. The English edition is correct. What device and device software are you using?

0

Hi, I use STM32WLE5 , firmware base on the 1.3.0

answered 2 years ago

0

answered 2 years ago

  • AWS IoT Core for LoRaWAN supports LoRaWAN 1.0.3 and 1.1. In my experience 1.0.4 devices work if you use class A or class C. 1.0.4 has breaking changes in the Class B beacon format, hence Class B doesn't work.

0

Hi Greg_B, so can ota work on LORAWAN v1.0.4 or 1.1?

but I have see your response in other topic, https://repost.aws/questions/QUdI6ka5UwTfSe-kNTeAHDEg/are-lorawan-1-0-4-devices-and-regional-parameters-rp002-1-0-2-supported#ANaUOI4QLXRpSYwfCn1A4PQw I use 1.0.4 and task set Class C, it should be work? I have tried multicast, set schedule can received, but OTA seems like only once.

multicast schedule Enter image description here

OTA task Enter image description here

Then I waited a few minutes I didn't see the new log after ota start.

answered 2 years ago

  • Hi, I am experiencing a similar problem. 1- Device Join Multicast 2- When the time comes to send the fragmentations, the device switches to class C and nothing happens on the console or on the network analyzer RX_C on freq 869525000 Hz at DR 0 Switch to Class C done 1719330324s320:MAC rxDone

    Has anyone found a solution?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.