RE:Sequence Number Recovery for bluetooth mesh?

Hi Amanda,
My Last Ticket  with Same Subject wrongly closed and issue not resolved So starting new

Want to know how suggestion in your last reply will resolve my sequence number mismatch issue.

I tried procedure above but not working .

also Sequence number is not part of JSON and it's backup will not help for this.

Please go throgh my case below,

1.  I have working provisioned node 0x09 and  it commuicates with gateway 0x01.
     gw_seq_num  =0x100004  node_seq_num  = 0x100002 (last pkt ).
2.  Now if my gateway bluetooth device dammged  (using using nrf52840 DK now).
3.  and Want to use new Gateway bluetooth  (nrf52840 DK new) with same JSON
4.  If i try to use this new hardware sequence number is starting from 0x000000.
5.  And as node sequence number reached at  0x100002. it will not accept packet from gateway.

In my case i am  25 node are in network. 
So what i have to do to communicate with all nodes.

Thanks and Regards,
Mital

Parents Reply Children
  • Hi Terje,

    I did PERSISTENT_STORAGE=1. only. but not able to set/update sequence number getting invalid state error.

    Can u check and comment on below function from file  "nrf5_sdk_mesh/mesh/serial/src/serial_handler_mesh.c"

    I think this is not allowing me to set sequence number.  Shall i  remove this condition check? Is this create any other issue?

    static void handle_net_state_set(const serial_packet_t * p_cmd)
    {
     #if PERSISTENT_STORAGE
      serial_handler_common_cmd_rsp_nodata_on_error(p_cmd->opcode, NRF_ERROR_INVALID_STATE, NULL, 0);
    #else
        uint32_t status = net_state_iv_index_and_seqnum_block_set(
      p_cmd->payload.cmd.mesh.net_state_set.iv_index,
      p_cmd->payload.cmd.mesh.net_state_set.iv_update_in_progress,
      p_cmd->payload.cmd.mesh.net_state_set.next_seqnum_block);
      serial_handler_common_cmd_rsp_nodata_on_error(p_cmd->opcode, status, NULL, 0);
    #endif
    }

    Also i need command/function to reset provisioned node from pyaci ( I didn't find this in pyaci code) 


    Thanks and Regards,
    Mital 




  • Hi Terje,
    Can you  please update on my last message that if PERSISTENT_STORAGE=1 then gerting error response for 'net_state_set" 

    Thanks and Regards,

    Mital

  • Hi,

    I am sorry for the delay. I see that my initial reply is not 100 % clear. What I meant was:

    There are two ways to solve this. Either:

    • set PERSISTENT_STORAGE=1, which will automatically make sure the sequence number gets updated. Or:
    • use the Net State Get and Set functionality, for manually keeping track of the sequence number and set it correctly.

    Regards,
    Terje

Related