This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF 52840 BLE Mesh 5.0 Network Sequence Counter Reaches to Max and App Crashes

Hello,

I am working on BLE Mesh using SDK nrf5_SDK_for_Mesh_v5.0.0. I am using light_switch example for BLE Mesh client and server. I am using custom hardware for Mesh client and nRF DK 2.0.1 for Mesh server.

I am sending data from client to sever periodically, every 10 sec. The Mesh client(custom device) has a hardware reset, which resets the device after every 10 mins. I observed that after 4-5 days client stops working with error: 

app_error_weak.c,  115, Mesh error 15 at 0x0002785B

Upon investigation and searching on forum I found that, each BLE packet has a sequence number and this sequence number is written in flash periodically. When this sequence number reaches to max value the app crashes.  https://devzone.nordicsemi.com/f/nordic-q-a/63168/nrf-mesh-publish-error-15-forbidden

To fix this issue I will require to decrease value of NETWORK_SEQNUM_FLASH_BLOCK_SIZE to some lesser value which is currently set to 8192. But this change will not solve the crash, it will only delay it. This change will also increase the memory write cycles.

I want to reduce values of following macros from net_state.c as mentioned in following link, so that the appropriate APIs(to reset sequence number) will get called once within 10 minutes. 

https://devzone.nordicsemi.com/f/nordic-q-a/60144/access_model_publish-returns-nrf_error_forbidden-in-lpn-and-all-friendships-time-out/254296#254296.

#define IV_UPDATE_TIMEOUT_MINUTES

#define IV_RECOVERY_TIMEOUT_MINUTES
#define IV_UPDATE_IN_PROGRESS_MAX_MINUTES

Or otherwise is there any cleaner way to reset the sequence counts so that the app does not crash?

Regards,

Rajendra

Parents
  • Hi.

    Sorry about the long delay.

    Like you said:

    I want to reduce values of following macros from net_state.c as mentioned in following link, so that the appropriate APIs(to reset sequence number) will get called once within 10 minutes. 

    Would be a solution to this.

    From the last ticket you linked to. You can look at the suggested solutions from Hung Bui's comment.

    Br,
    Joakim

Reply
  • Hi.

    Sorry about the long delay.

    Like you said:

    I want to reduce values of following macros from net_state.c as mentioned in following link, so that the appropriate APIs(to reset sequence number) will get called once within 10 minutes. 

    Would be a solution to this.

    From the last ticket you linked to. You can look at the suggested solutions from Hung Bui's comment.

    Br,
    Joakim

Children
No Data
Related