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

NUS service don't run correct in MESH

Hi all, I have some question for ask : 

I add NUS service into light switch proxy server example. And I only run nus service part (Don't run Mesh part)

when I use IOS to connect , it disconnect right away and get stuck

when I use Android connect , I can send data , disconnect and reconnect . But when my phone receiver data from Dev Kit , it received its first success, after it get stuck

This image when my kit stuck 

Pls, tell me the reason and how to fix this . Thank very much 

Parents
  • Error at function in mesh_gatt.c : 

            /* TODO: The following events should be handled by an SDK module/the application. */
            case BLE_GATTS_EVT_SYS_ATTR_MISSING:
            {
                uint32_t err_code = sd_ble_gatts_service_changed(p_ble_evt->evt.gatts_evt.conn_handle,
                                                                 m_gatt.handles.service,
                                                                 m_gatt.handles.service);
    
                /* Those errors can be expected when sending trying to send Service Changed indication
                 * if the CCCD is not set to indicate. Thus set the returning error code to success. */
                NRF_MESH_ASSERT((err_code == NRF_SUCCESS) ||
                                (err_code == BLE_ERROR_INVALID_CONN_HANDLE) ||
                                (err_code == NRF_ERROR_INVALID_STATE) ||
                                (err_code == NRF_ERROR_BUSY));
                NRF_MESH_ERROR_CHECK(sd_ble_gatts_sys_attr_set(p_ble_evt->evt.gatts_evt.conn_handle, NULL, 0, 0));
                break;
            }

    error return 6 . 

Reply
  • Error at function in mesh_gatt.c : 

            /* TODO: The following events should be handled by an SDK module/the application. */
            case BLE_GATTS_EVT_SYS_ATTR_MISSING:
            {
                uint32_t err_code = sd_ble_gatts_service_changed(p_ble_evt->evt.gatts_evt.conn_handle,
                                                                 m_gatt.handles.service,
                                                                 m_gatt.handles.service);
    
                /* Those errors can be expected when sending trying to send Service Changed indication
                 * if the CCCD is not set to indicate. Thus set the returning error code to success. */
                NRF_MESH_ASSERT((err_code == NRF_SUCCESS) ||
                                (err_code == BLE_ERROR_INVALID_CONN_HANDLE) ||
                                (err_code == NRF_ERROR_INVALID_STATE) ||
                                (err_code == NRF_ERROR_BUSY));
                NRF_MESH_ERROR_CHECK(sd_ble_gatts_sys_attr_set(p_ble_evt->evt.gatts_evt.conn_handle, NULL, 0, 0));
                break;
            }

    error return 6 . 

Children
No Data
Related