RAK4200/4270 framecounter not changing

Issue:Gateway not seeing an incrementing framecnt

Setup:RAK4200/4270 with RAK2287

Server:Custom

Details:We are having an issue where the framcnt sent from the RAK4200/4270 nodes is not changing. Is the framecnt something that is handled by the RAK module FW? Is there a way for us to handle the framcnt in our firmware, above the level of the module itself?

Thank you,
Tom

Hello @tomwgt
The framecounter is handled inside LoRaMAC of the firmware. It is reset every time you start a join request.

Do you power down the module between sending packets or do you just put the module into sleep?
In case you power down the module between sending packets and need do a join request everytime you want to send a packet, the framecounter will always start from 1 and not count up.

Hi @beegee
We saw this repeating fcnts from a device’s repeating JOIN request. Is it normal?:
Sep 03 23:28:03 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: D6A80810 (fcnt=26293)
Sep 03 23:28:22 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: D6A80810 (fcnt=26293)
Sep 03 23:28:29 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: D6A80810 (fcnt=26293)
Sep 03 23:28:37 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: D6A80810 (fcnt=26293)
Sep 03 23:28:44 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: D6A80810 (fcnt=26293)
Sep 03 23:28:53 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: D6A80810 (fcnt=26293)
Sep 03 23:29:00 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: D6A80810 (fcnt=26293)
Sep 03 23:29:08 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: D6A80810 (fcnt=26293)
Sep 03 23:29:15 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: D6A80810 (fcnt=26293)
Sep 03 23:29:33 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: D6A80810 (fcnt=26293)
Sep 03 23:29:41 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: D6A80810 (fcnt=26293)
Sep 03 23:29:48 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: D6A80810 (fcnt=26293)
Sep 03 23:29:56 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: D6A80810 (fcnt=26293)

Thank you, @beegee
Just so you know, @rcai and I are working together on this issue.

Here is another snippet from our logs for logger with devEUI ending in EB22,

Sep 03 23:26:19 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: 00547678 (fcnt=0)
Sep 03 23:26:27 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: 00547678 (fcnt=1)
Sep 03 23:26:33 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: 00547678 (fcnt=2)
Sep 03 23:26:40 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: 00547678 (fcnt=3)
Sep 03 23:26:46 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: 00547678 (fcnt=4)
Sep 03 23:26:51 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: 00547678 (fcnt=5)
Sep 03 23:26:57 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: 00547678 (fcnt=6)
Sep 03 23:27:03 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: 00547678 (fcnt=7)
Sep 03 23:27:10 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: 00547678 (fcnt=8)
Sep 03 23:27:16 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: 00547678 (fcnt=9)
Sep 03 23:27:22 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: 00547678 (fcnt=10)
Sep 03 23:27:28 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: 00547678 (fcnt=11)
Sep 03 23:27:40 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: D6A80810 (fcnt=26293)
Sep 03 23:27:48 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: D6A80810 (fcnt=26293)
Sep 03 23:27:55 ccimx6ulsbc lora-net[27055]: INFO: Received pkt from mote: D6A80810 (fcnt=26293)

The frome count seems to be fine for mote: 00547678, but then mote: D6A80810 has a repeating fcnt.
Do you know what the mote: XXXXXXXX is refering to in this log, as all of these entries are under the logger with the same devEUI?

I do not know the format of our log files, so some of my answers are “Guessing”.

mote: 00547678 => the 00547678 should be the device address, which is assigned to the node during join request/join accept procedure.
If all logs are from the same device EUI then the node decided after 27:28 to start a new join request. Why it does start a new join request depends on your application. Maybe a reset, or manual AT command to join again. The AT command firmware of the RAK4200/4270 does not start such a join request on its own.

The following packets point to the fact that the join request is failing. The reason for why it fails is not shown in the log, if they are join request You have to get more detailed logs from your LoRaWan server.