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

Mesh 3.2: LPN GET and receiving STATUS

Based on the experimental_lpn example if have ported at application (light switch) to work as a low power node.

Everything work fine on the lpn node where i use the generic_onoff_client to send button on/off to a server node.

I now want to 'request' the generic_onoff_server status issuing a GET from the client. This is also received on the server and a STATUS published.

Both server and client have been setup to use same app-key and group address on publish/subscribe.

To help me verifying what is send/received, i have added debug-print (__LOG) in app_mesh_core_event_cb()  on NRF_MESH_EVT_MESSAGE_RECEIVED and NRF_MESH_EVT_TX_COMPLETE.

I using the light_switch_server example as server and have verified that the light_switch_client example works fine receiving STATUS, but not the exprimental_lpn 

Are there any restriction in the experimental_lpn that prevent me from receiving STATUS ?

Parents
  • I have also made these changes to the mesh-init and main loop .. allowing me to use APP_SCHED (Event Scheduler) .

    void mesh_init(void)
    {
        mesh_stack_init_params_t init_params =
        {
            /* Run application and mesh event handling in main loop using app_scheduler:
               When using the APP_SCHED to post event, the irq_priority must be changed from 
               NRF_MESH_IRQ_PRIORITY_LOWEST to NRF_MESH_IRQ_PRIORITY_THREAD in order to avoid 
               mesh app assert. */
            .core.irq_priority       = NRF_MESH_IRQ_PRIORITY_THREAD, //NRF_MESH_IRQ_PRIORITY_LOWEST,
            .core.lfclksrc           = DEV_BOARD_LF_CLK_CFG,
            .core.p_uuid             = NULL,
            .models.models_init_cb   = models_init_cb,
            .models.config_server_cb = NULL //config_server_evt_cb
        };
        ERROR_CHECK(mesh_stack_init(&init_params, &m_device_provisioned));
    
        __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "m_device_provisioned:%d\n",m_device_provisioned);
    
        /* Register event handler to receive LPN and friendship events. */
        nrf_mesh_evt_handler_add(&m_mesh_core_event_handler);
    }
    

        for (;;)
        {
            app_sched_execute();
            bool done = nrf_mesh_process();
            if (done)
            {
                sd_app_evt_wait();
            }
        }

Reply
  • I have also made these changes to the mesh-init and main loop .. allowing me to use APP_SCHED (Event Scheduler) .

    void mesh_init(void)
    {
        mesh_stack_init_params_t init_params =
        {
            /* Run application and mesh event handling in main loop using app_scheduler:
               When using the APP_SCHED to post event, the irq_priority must be changed from 
               NRF_MESH_IRQ_PRIORITY_LOWEST to NRF_MESH_IRQ_PRIORITY_THREAD in order to avoid 
               mesh app assert. */
            .core.irq_priority       = NRF_MESH_IRQ_PRIORITY_THREAD, //NRF_MESH_IRQ_PRIORITY_LOWEST,
            .core.lfclksrc           = DEV_BOARD_LF_CLK_CFG,
            .core.p_uuid             = NULL,
            .models.models_init_cb   = models_init_cb,
            .models.config_server_cb = NULL //config_server_evt_cb
        };
        ERROR_CHECK(mesh_stack_init(&init_params, &m_device_provisioned));
    
        __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "m_device_provisioned:%d\n",m_device_provisioned);
    
        /* Register event handler to receive LPN and friendship events. */
        nrf_mesh_evt_handler_add(&m_mesh_core_event_handler);
    }
    

        for (;;)
        {
            app_sched_execute();
            bool done = nrf_mesh_process();
            if (done)
            {
                sd_app_evt_wait();
            }
        }

Children
No Data
Related