Hi everyone,
I'm currently working on implementing Firmware Over The Air (FUOTA) updates for a Heltec ESP32-S3 v3 device using AWS IoT Core for LoRaWAN FUOTA. I’m encountering some challenges and would appreciate any guidance or insights the community can offer.
Here's a detailed breakdown of the issues I'm encountering along with the information I have:
1.LoRaWAN Application Layer Clock Synchronization:
My initial focus has been on achieving LoRaWAN Application Layer Clock Synchronization using functions provided by Heltec's documentation. After successfully joining the network, I've observed the following results in my console:
joined
Unix time: 9.641
This uplink added time req.
confirmed uplink sending ...
Once device time updated, this function run
received unconfirmed downlink: rssi = -69, snr = 9, datarate = 5
Unix time: 1716901023.529
confirmed uplink sending ...
received unconfirmed downlink: rssi = -68, snr = 9, datarate = 5
Unix time: 1716901039.325
While this indicates partial success in clock synchronization, I'm uncertain about its completeness. Any insights or recommendations on improving this process would be highly appreciated.
2. Multicast Group Setup:
Moving forward, configuring multicast groups on my device has proven to be challenging. Although Heltec's documentation indicates the use of multicast group addresses, I couldn't find this crucial information within the downlink message or the console provided by AWS IoT Core.
The provided code by Heltec (https://github.com/HelTecAutomation/Heltec_ESP32/blob/master/examples/LoRaWAN/LoRaWanMulticast/LoRaWanMulticast.ino)
In the network analyser, I noted three downlink messages for the multicast group join, which I selected as an example:
{
....
"WirelessMetadata": {
"isPublicNetwork": false,
"fPort": 200,
"lorawanGateways": [
{
"gatewayEui": "XXXXX",
"rssi": -99,
"snr": 4.25,
"wirelessGatewayId": ""
}
],
"dataRate": 0,
"applicationInfo": {
"multicastGroupId": "933aa82a-a2d5-7777-8d8d-398334d7409f",
"applicationCommandType": "PackageVersionReq (Multicast)"
},
"devEui": "XXXXXXXXX5b",
"mType": "UNCONFIRMED_DATA_DOWN",
"frequency": 923300000,
"timestamp": "2024-06-04T11:28:54.646101554Z"
},
"MessageId": "feede57e-4ddd-49b4-b527-08274e1e2ee4"
}
How can I set up multicast groups for ESP32 devices ?
3. Firmware Fragmentation Setup:
In addition to multicast group configuration, I need to implement firmware fragmentation to ensure secure firmware transportation. Unfortunately, the library I'm using for LoRaWAN communication lacks support for ESP32 series devices, leaving me uncertain about proceeding with fragmentation. Has anyone encountered similar challenges or found alternative solutions for implementing FUOTA on ESP32 devices?
Thanks.
Thank you so much for your answer. I'm setting up a multicast group for LoRaWAN end-devices using AWS. The end-devices need McAddr, McNwkSKey, and McAppSKey to join the group, which should be sent via the
McGroupSetupReq
command. I've created a multicast group in AWS, but I'm unable to retrieve the multicast address (McAddr). Here are the details: Command: aws iotwireless get-multicast-group --id f8888832-d2d5-4a01-827d-88877488409f { "Arn": "XXXXXXXXXXXXXXXXXX", "Id": "f8888832-d2d5-4a01-827d-88877488409f", "Name": "esp32-groupe-for-multicast", "Status": "Pending", "LoRaWAN": { "RfRegion": "EU868", "DlClass": "ClassC", "NumberOfDevicesRequested": 42, "NumberOfDevicesInGroup": 3 }, "CreatedAt": "2024-05-27T09:29:24.810000+00:00" }As you said "should be sent via the
McGroupSetupReq
command". Your device should getMcAddr
andMcKey
from this command. And deriveMcNwkSKey
andMcAppSKey
. There's no special AWS stuff. It's standard LoRaWAN: https://resources.lora-alliance.org/technical-specifications/ts005-2-0-0-remote-multicast-setup. LoRaMAC-node reference implementation: https://github.com/Lora-net/LoRaMac-node/blob/master/src/apps/LoRaMac/common/LmHandler/packages/LmhpRemoteMcastSetup.c#L318-L335.There's no such status as "Active". Statuses: https://docs.aws.amazon.com/iot-wireless/latest/developerguide/lorawan-multicast-status.html. For the most part, the transitions depend on your device processing the commands from AWS IoT Core for LoRaWAN and responding correctly. As detailed here: https://youtu.be/LcCR-1eKX1w?t=184