This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52832 nRF SDK for Mesh: light_switch_client getting NRF_ERROR_FORBIDDEN error

Hi,

Greetings!

I am using below setup

nRF52832

Mesh SDK 4.0.0

SDK 16.0.0

Application Example: light_switch_client_nrf52832_xxAA_s132_7.0.1

Issue:

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.

Regards,

Dinesh

  • Hi,

    Are you running a unmodified example from the SDK?

  • Hi Mttrinh,

    Greetings!

    Please note that I am using example from SDK with following changes

    a. Instead of tactile button, I am using I2C touch sensor

    b. Device is battery operated and I am keeping it in sleep mode if there is no operation. Please note that here I am not using LPN node feature and simply putting device into sleep mode.

    If there is button sense then device wakes up from sleep mode, sends data onto mesh and again goes back into sleep mode.

    Request you to please guide me on this further.

    Regards,

    Dinesh

  • Hi Mttrinh,

    Please help us on above issue.

    Regards,

    Dinesh

  • Hi, 

    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, 3.7.4.1 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.

  • Hi Mttrinh

    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

    Regards,

    Dinesh

Related