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

(Mesh)device restart,how to communicate with the previous configuration;

Board: custom board; Mesh SDK: V1.0.0; Softdevice: S132; IDE: SEGGER Embedded; BLE: nrf52832

When I test the steps specified by “Interactive PyACI”, I can Provisioning the client and server, and client can send message to server. but when i restart the board, how to communicate with the previous configuration?

Parents Reply Children
  • mesh V1.0.0;

    This problem has been solved by me. I found the configration has been stored on flash, but has not been reload after reboot , so add this line "dsm_flash_config_load();" in main fountion , that is ok! I think this is a bug.

    Add, there still has a little problem is that the relay node can relay messages in a same subnet after reboot and don't need to reconfigrate the app key and subnet address, but if let the client and server node that has been rebooted print log by serial port we must reconfigrate the publlication and subscription address by this command

    send(cmd.AddrSubscriptionAdd(49218));send(cmd.AddrPublicationAdd(49218))

    so can you tell me why?

  • I was asking which application firmware/example did you use ? In our lightswitch example we did call dsm_flash_config_load() in main. 

    What do you mean by " if let the client and server node that has been rebooted print log by serial port" ? 

    Are you saying the subscription/publication address is missing on the client/server after reboot  ? 

  • Sorry, My description is not clear enough. I am using Serial example.

    yes, i think  the subscription/publication address is missing on the client/server after reboot.

    after reboot device, we must send this command  "send(cmd.AddrSubscriptionAdd(49218))"  to reconnfigrate the subscription address to receive the messages.

  • today, this problem solved by me .

    Adding this command in flash_load fountion.

        if(type == DSM_ENTRY_TYPE_ADDR_NONVIRTUAL)
        {
            m_addresses[index].subscription_count++;
        }

    static void flash_load(dsm_entry_type_t type, uint32_t index, const dsm_flash_entry_t * p_entry, uint16_t entry_len)
    {
        NRF_MESH_ASSERT(type < DSM_ENTRY_TYPES);
        const flash_group_t * p_group = &m_flash_groups[type];
    
        p_group->to_dsm_entry(index, p_entry, entry_len);
        bitfield_set(p_group->p_allocated_bitfield, index);
    
        //add by zhou ,to update the subscription address number , avoid adding subscription address after reboot.
        if(type == DSM_ENTRY_TYPE_ADDR_NONVIRTUAL)
        {
            m_addresses[index].subscription_count++;
        }
    }

    to update the subscription number after reboot.

    is this a bug?

Related