cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L0 OTA failure

STLearner
Associate III

Hi ST experts,

I am using the AT command code from ST on the B-L072Z-LRWAN1. I have loaded the bin into the B-L072Z-LRWAN1 via ST-LINK3 switch on the RS232 @ 9600 and get the terminal screen with the AT command working very well. 

I have a KERLINK gateway which works with the thingpark server 

https://community.thingpark.io 

The gateway with the EUI number shows it is connected on the server. 

I can send an ABP connect and message very easily using the AT commands

However, I cannot join and send message using the OTAA mode which will complete this project

The freq used is AS923 and I have tried all sub-bands and put the TX at MAX power. 

I am using STM32CUBE IDE

This is the code path from the ST projects file when downloaded the recommended STM32CubeExpansion. 

\STM32CubeExpansion_LRWAN_V2.1.0\Projects\B-L072Z-LRWAN1\Applications\LoRaWAN\LoRaWAN_AT_Slave\STM32CubeIDE\cmwx1zzabz_0xx 

Please advise if there any error on the steps . Thank you.

4 REPLIES 4
JTuckerBCA
Associate II

Hi,

You may need to set your Join RX1 Delay to 5s.

For your firmware this can be done with the command 

AT+JN1DL=5000<CR>

For an explanation of why please see this ThingsNetwork community post

https://www.thethingsnetwork.org/forum/t/i-cube-lrwan-problem/48864

@JTuckerBCA 

Hi, 

One more small issue to cross before production. 

I cannot get the Fcnt (Frame count) to be incremental of +1 but rather +256 when using 

the thingpark with ABP mode. OTAA you mentioned add 5000ms on the link and it worked like a charm. 

Can you help resolve this issue with ABP and thingpark regarding the Fcnt. 

My uplinkcounter start with 0 and the next message is 256 and the 3rd message is 512 and so one. Should be in 1, 2 and 3 order. 

Please advise. 

Hi @STLearner,

This is an interesting error you are encountering. The increment of the frame counter should be handled by the by the LoRaMAC of I-CUBE-LRWAN. Unless you have modified the MAC or are using other firmware on your device this should not be possible.

Does this error also persist when using OTAA?

Regardless, the rate of increment suggests that the incorrect byte is bring incremented. The FCnt at a device level is represented as a 16 bit unsigned integer. As the pattern you have shown suggests that the most significant byte (bits 8:15) of the integer is being incremented instead of the entire 16 bit value.

For more information of how the frame counter should be implement read section 4.3.1.5 of the LoRaWAN Specification v1.1

JTuckerBCA
Associate II

@STLearner please accept the initial reply as the solution if you feel it solved your problem