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

light_switch_proxy_server of mesh sdk 2.0.0

Hi Nordic:

I build up an mesh network with following setting:

1. A nRF52 platform with example/light_switch/provisioner with a auto-start-provisioner

2. Another nRF52 platform with example/light_switch/proxy_server, and controlled by segger debugger.

After proxy_server node start, I saw "successfully provisioned" in RTT terminal, and then I use nRFConnect to connect proxy_server, 

I saw "app_error_weak.c,   95, Mesh assert at 0x0002C880 (:0)"

If I change this node to proxy_client, the result is same.

So, is light_switch/proxy_client or server of mesh-sdk-2.0 only experimentally?

Could you give me any hint to fix?

(thank you very much, it would be great for me to have many mesh-nodes with proxy feature, thanks!)

Parents
  • Hello JosephWei,

    I would like to suggest you modify the mesh_gatt.c, like the following part:

            case BLE_GATTS_EVT_SYS_ATTR_MISSING:
            {
                error_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. */
                __LOG(LOG_SRC_APP, LOG_LEVEL_INFO,"sd_ble_gatts_service_changed 0x%04X\n", error_code);
                
                NRF_MESH_ASSERT((error_code == BLE_ERROR_INVALID_CONN_HANDLE) ||
                                (error_code == NRF_ERROR_INVALID_STATE) ||
                                (error_code == NRF_ERROR_BUSY) ||
                                (error_code == NRF_SUCCESS));   //Please add this line
                                
                                
                NRF_MESH_ERROR_CHECK(sd_ble_gatts_sys_attr_set(p_ble_evt->evt.gatts_evt.conn_handle, NULL, 0, 0));
                break;
            }

    Please add " || (err_code == NRF_SUCCESS)" in the NRF_MESH_ASSERT()

Reply
  • Hello JosephWei,

    I would like to suggest you modify the mesh_gatt.c, like the following part:

            case BLE_GATTS_EVT_SYS_ATTR_MISSING:
            {
                error_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. */
                __LOG(LOG_SRC_APP, LOG_LEVEL_INFO,"sd_ble_gatts_service_changed 0x%04X\n", error_code);
                
                NRF_MESH_ASSERT((error_code == BLE_ERROR_INVALID_CONN_HANDLE) ||
                                (error_code == NRF_ERROR_INVALID_STATE) ||
                                (error_code == NRF_ERROR_BUSY) ||
                                (error_code == NRF_SUCCESS));   //Please add this line
                                
                                
                NRF_MESH_ERROR_CHECK(sd_ble_gatts_sys_attr_set(p_ble_evt->evt.gatts_evt.conn_handle, NULL, 0, 0));
                break;
            }

    Please add " || (err_code == NRF_SUCCESS)" in the NRF_MESH_ASSERT()

Children
No Data
Related