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
  • Hello Edvin,

      I download nRF Connect for Desktop and launch " Bluetooth Low Energy" App, after I select COM port (PCA10028 old version no mbed include), Error found in Log: "Failed to get device info:Error occured when get device info. Errorcode: CouldNotCallFunction(0x9)....".

      I read the "nRFConnect_BLE_User_Guide_v2.1.pdf", but I don't find answer to fix the problem. Would you let me know what can I do?

    Thanks & kind regards

    kwan

Children
  • Can you try to erase the board using nRFGo Studio or "nrfjprog -e" in cmd with the command line tools before opening nRF Connect?

     

    BR,

    Edvin

  • Hello,

    I would like to clarify, I found the service is 0x1827 and characteristics are 0x2adb and 0x2adc, but you said it should 0x1828?

    Thanks & kind regards

    kwan

  • Hello,

    Ok. I believe you. I just saw in the proxy_server project that it used the UUID 0x1828. Maybe the proxy_client uses 0x1827, or that we have different versions.

     

    If you want to use a phone to control the light_switch examples in the SDK for Mesh, I suggest that you look into the mesh library (currently only for iOS. I believe Android is on it's way). The mesh library is written for iOS, and available here on github.

     

    Erasing the board was only because I thought that you were not able to communicate with the board that you used with nRF Connect.

     

    What happens if you try to either enable the notification on 2ADC or try to write to 2ADB?

     

    BR,

    Edvin

  • The app is available on app store (iOS) as well. Search for nRF Mesh. The link in the previous reply is for the source code for the app.

    BR,

    Edvin

  • 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

Related