I am using below setup
Mesh SDK 4.0.0
Application Example: light_switch_client_nrf52832_xxAA_s132_7.0.1
Using above setup, I have downloaded above mentioned application into Development Kit and kept it running for 2 days.
After working it well for 2 days, I am observing NRF_ERROR_FORBIDDEN error
I tried power reset but then also it is occurring and after debugging I came to know that it is occurring at line no 643 in net_state.c file
It is observed that m_net_state.seqnum (0x1000000) is greater than maximum available sequence number (0xFFFFFF).
Also please note that after erasing device and re-downloading application, it starts works and after 2 days again this issue occurrs.
Can anyone please help me on this issue?
How to resolve this issue?
Thanks in advance.
Are you running a unmodified example from the SDK?
In the issue above you are seeing the sequence number exhaustion within 2 days. That means you are sending messages at a rate of 0xFFFFFF/(2*24*3600) = 97 messages per second. This is far greater than the recommended limit of 100 messages per 10-second window (i.e. an average of 10 message per second). See section, 220.127.116.11 of the Mesh Specification - "A node should originate less than 100 Lower Transport PDUs in a moving 10-second window."
This high rate of originating messages causes another requirement in the Mesh spec to be violated - "If the node is added to a network when the network is in Normal operation, then it shall operate in Normal operation for at least 96 hours." Because of this, an internal IV update procedure in the mesh stack is not triggered. The sequence number can be reset only after the end of the IV update procedure. Since the procedure cannot be started, sequence numbers keep increasing and they overflow, creating an error condition in `net_state_seqnum_alloc()` which then returns `NRF_ERROR_FORBIDDEN`. So, it seems the stack is behaving the way it should be. It is the user application which is doing things that it is not supposed to.
In any case, the user application must take care that it should not consume all sequence numbers within 192 hours of operation (i.e. no more than 24 messages per second), otherwise this problem will occur.
Thanks for your reply.
I will have a look into my app as per your suggestions.
However please let me know below points
1. Does provisions mode messages are considered for seqnum?
2. On other side I am keeping device in sleep mode, so it does wake up only on touch sensor interrupt.
So I think it should not be sensing more messages than specified one. However I need to confirm it by adding additional locks
Thank you once again
1. No, provisioning messages do not use seqnums.2. Not sure what you mean by this. Do you mean "sending" or "receiving"(instead of word "sensing")? Can you you clarify?
Regarding point no. 2:
Sorry it's my mistake
I mean to say sending instead of sensing.
I am trying to resolve this issue and yet have not got a success. Once I cracks this issue will update on the same.
Thank you once again.