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

I am using nRF52832 board to un provision the device using the button from the hardware.how to configure this

I am using nRF52832 board to un provision the device using the button from the hardware.how to configure this

Parents
  • Hi, 

    I'm not sure I understand you 100% but if you are asking about unprovisioning a mesh device using nRF Mesh SDK , please have a look at the button_event_handler() in light switch server example. When you press button 4 , the provisioning data will be erased and all configuration information in flash will be erased. 

  • In sample example of nrf52 for light switch server handled for RTT pressing button4 from serial terminal it is getting unprovisioned.I need to unprovision by pressing the button on the hardware manually.How to give input via button instead of RTT.plz suggest your answer

  • Hi,

    Please don't click Verify Answer if it's not a solution for your problem. 

    If you have a look at the code inside app_rtt_input_handler() to handle RTT input, you can find that it in turn will call button_event_handler(). So in the light switch or light_lc example if you press button 4 on the board, it's the same as when you input '4' in RTT. Both of them will end up executing this code:

            case 4:
            {
                /* Clear all the states to reset the node. */
                if (mesh_stack_is_device_provisioned())
                {
    #if MESH_FEATURE_GATT_PROXY_ENABLED
                    (void) proxy_stop();
    #endif
                    mesh_stack_config_clear();
                    node_reset();
                }
                else
                {
                    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "The device is unprovisioned. Resetting has no effect.\n");
                }
                break;
            }

    So I'm not sure why you don't get the same effect when you press button 4 on your board, what's the issue here ? 

Reply
  • Hi,

    Please don't click Verify Answer if it's not a solution for your problem. 

    If you have a look at the code inside app_rtt_input_handler() to handle RTT input, you can find that it in turn will call button_event_handler(). So in the light switch or light_lc example if you press button 4 on the board, it's the same as when you input '4' in RTT. Both of them will end up executing this code:

            case 4:
            {
                /* Clear all the states to reset the node. */
                if (mesh_stack_is_device_provisioned())
                {
    #if MESH_FEATURE_GATT_PROXY_ENABLED
                    (void) proxy_stop();
    #endif
                    mesh_stack_config_clear();
                    node_reset();
                }
                else
                {
                    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "The device is unprovisioned. Resetting has no effect.\n");
                }
                break;
            }

    So I'm not sure why you don't get the same effect when you press button 4 on your board, what's the issue here ? 

Children
Related