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

BLE Mesh, how to make the provision by Master Control Panel

Dear Sir,

I use nrf5_SDK_for_Mesh_v2.0.1_src.zip and test proxy server project,

I scanned the device nRF5x Mesh Light (0x1827 Service), I click "Discover services", but the Service discovery aborted, connection terminated.

What is correct procedure to use proxy server? I expect that I can control the LED On/Off by MCP.

Thanks & kind regards

kwan

Parents Reply Children
  • Hi Edvin,

    I tested iOS nRF Connect App with mesh proxy_server application, and I send data 0x01,0x02,0x03, everything , the device will disconnect at write_evt_handle().

    However, if I remove the disconnect function at write_evt_handle routine, send data sometime, it will jump to app_error_weak.c.

     0> <t:    1957023>, mesh_gatt.c,  688, BLE_GATTS_EVT_WRITE = 80
     0> <t:    1970784>, mesh_gatt.c,  700, BLE_GATTS_EVT_SYS_ATTR_MISSING = 82
     0> <t:    2233252>, mesh_gatt.c,  688, BLE_GATTS_EVT_WRITE = 80
     0> <t:    2477043>, mesh_gatt.c,  688, BLE_GATTS_EVT_WRITE = 80
     0> <t:    2477049>, mesh_gatt.c,  399, handles.rx.value_handle data = 0x1
     0> <t:    2479008>, mesh_gatt.c,  683, BLE_GAP_EVT_DISCONNECTED = 17
     0> <t:    2671982>, mesh_gatt.c,  678, BLE_GAP_EVT_CONNECTED = 16
     0> <t:    2675905>, mesh_gatt.c,  761, BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST = 85
     0> <t:    2683771>, mesh_gatt.c,  688, BLE_GATTS_EVT_WRITE = 80
     0> <t:    2697532>, mesh_gatt.c,  700, BLE_GATTS_EVT_SYS_ATTR_MISSING = 82
     0> <t:    2767328>, mesh_gatt.c,  688, BLE_GATTS_EVT_WRITE = 80
     0> <t:    2943290>, mesh_gatt.c,  688, BLE_GATTS_EVT_WRITE = 80
     0> <t:    2943296>, mesh_gatt.c,  399, handles.rx.value_handle data = 0x2
     0> <t:    2945255>, mesh_gatt.c,  683, BLE_GAP_EVT_DISCONNECTED = 17
     0> <t:    3265945>, mesh_gatt.c,  678, BLE_GAP_EVT_CONNECTED = 16
     0> <t:    3269867>, mesh_gatt.c,  761, BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST = 85
     0> <t:    3277733>, mesh_gatt.c,  688, BLE_GATTS_EVT_WRITE = 80
     0> <t:    3291494>, mesh_gatt.c,  700, BLE_GATTS_EVT_SYS_ATTR_MISSING = 82
     0> <t:    3357358>, mesh_gatt.c,  688, BLE_GATTS_EVT_WRITE = 80
     0> <t:    3519557>, mesh_gatt.c,  688, BLE_GATTS_EVT_WRITE = 80
     0> <t:    3519563>, mesh_gatt.c,  399, handles.rx.value_handle data = 0x3
     0> <t:    3521522>, mesh_gatt.c,  683, BLE_GAP_EVT_DISCONNECTED = 17

    #remark, There are three modification on

    1.
    case BLE_GATTS_EVT_SYS_ATTR_MISSING:      
    {
               
      NRF_MESH_ERROR_CHECK(sd_ble_gatts_sys_attr_set(p_ble_evt->evt.gatts_evt.conn_handle, NULL, 0, 0));          
      break;
    }

    2.
    #define TIMESLOT_END_SAFETY_MARGIN_US (200UL)

    3. 

    static void disconnect_evt_handle(const ble_evt_t * p_ble_evt)
    {
        uint16_t conn_index = conn_handle_to_index(p_ble_evt->evt.gap_evt.conn_handle);
        if (conn_index != MESH_GATT_CONN_INDEX_INVALID)
        {
            conn_index_free(conn_index);

            mesh_gatt_evt_t evt;
            evt.type = MESH_GATT_EVT_TYPE_DISCONNECTED;
            evt.conn_index = conn_index;
            m_gatt.evt_handler(&evt, m_gatt.p_context);      
        }
        mesh_adv_start();
    }

    Thanks & kind regards

    kwan

  • Hello,

    The proxy example is not inteded to use with nRF Connect. Have you tested the nRF Mesh app?

     

    BR,

    Edvin

  • Hi Edvin,

    Thanks for your help a lots, I will test it by nRF Mesh app!

    Kwan

Related