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

Manually Trigger IV update on a network

MeshSDK: 3.2.0

StockSDK: 15.2

Hello,

I have a network where the sequence numbers have become corrupt due to removing devices from a network and then provisioning other devices on that freed up unicast address causing the seq number to be out of sync. This causes the devices on the network to reject messages from the new device that was assigned the old unicast address. I know this is normal behavior due to section 3.10.7 of the mesh profile specification. 

Will doing a IV index update fix this problem by resetting everyones seq number back to 0x0000?

Is it possible to create a firmware where you press a button and it tiggers an IV update on a mesh network?

Parents
  • Hi,

    Yes, you are correct. After the IV index update all node will be setting the sequence number back to 0. But you don't need to do that all at the same time. There is a transition period, where the 2 IV index (old and new) are used. So node can decide when it want to switch to new IV index and set sequence number to 0. 

    I don't recommend triggering the IV index update manually, it should be handled in the stack automatically. net_state_iv_update_start() is the function to trigger the update. It's called automatically in iv_update_trigger_if_pending().

  • The issue with letting the stack handle the IV index automatically is that it seems like that will only happen when at least one node's sequence number reaches NETWORK_SEQNUM_IV_UPDATE_START_THRESHOLD (default approx 8 million).  This could be weeks.

    I looked through the firmware and I did not find an option to force IV updates more frequently than this, perhaps on a timed basis, to make the garbage collection of the replay_cache more deterministic.  Does such a mechanism exist ?

Reply
  • The issue with letting the stack handle the IV index automatically is that it seems like that will only happen when at least one node's sequence number reaches NETWORK_SEQNUM_IV_UPDATE_START_THRESHOLD (default approx 8 million).  This could be weeks.

    I looked through the firmware and I did not find an option to force IV updates more frequently than this, perhaps on a timed basis, to make the garbage collection of the replay_cache more deterministic.  Does such a mechanism exist ?

Children
No Data
Related