FUOTA on L-Tek-FF1705

Hi All,

I am trying the FUOTA demo on L-Tek FF1705 (https://github.com/ARMmbed/mbed-os-example-lorawan-fuota).
I have followed the steps given.

While sending the update, the device is showing below error after switching the class C:

Received message from Network Server
Received 11 bytes on port 200
[DBG ][LWUC]: handleMulticastClassCSessionReq mcIx=0
[DBG ][LWUC]: timeToStart: 3
[DBG ][LWUC]: timeOut: 128
[DBG ][LWUC]: dlFreq: 869525000
[DBG ][LWUC]: dataRate: 5
Switch to Class C
[DBG ][LMAC]: Changing device class to → CLASS_C
[DBG ][LMAC]: RX2 slot open, Freq = 869525000
[ERR ][LMAC]: MIC failed
[ERR ][LMAC]: MIC failed

And after some time, the device switched back to class A and starts sending the uplink data.

Has anyone faced this issue?
Any lead on this would be of great help.

Thanks,
Rahul

Some more observations.
During FUOTA, the Chirpstack application creates a temporary fuota multicast group which contains new device address, NwSKey, and AppSKey.
Below image shows the details:

However, at device side, the received data are different.
The mcAddr is same, but NwSkey and AppSKey are different. ( I have highlighted the MacAddr)
Image below shows the received data at device:
fuota_multicast_device_received_data

I think, it is the reason why my device is showing the error [ERR ][LMAC]: MIC failed while downloading the firmware.

@brocaar Could you please have a look and suggest any solution for this?

Thanks,
Rahul

Here, the problem was with the L-Tek device code.
It was using APP_KEY for decrypting Multicast session details. However, GEN_APP_KEY has to be used for that.

I changed the code accordingly. And now the update is working fine.

1 Like