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

How to add mesh into nRF5 SDK v14.1/v15 BLE application ?

What do I need to know to add mesh functionality into a normal BLE application ?

  • Hi Hung, I still get message that: "Cannot send. Device is busy.". I have changed inverval:

    define MIN_CONN_INTERVAL MSEC_TO_UNITS(100, UNIT_1_25_MS)
    define MAX_CONN_INTERVAL MSEC_TO_UNITS(500, UNIT_1_25_MS)

    And removed errror related to ble_gatt which I have mentioned before. However the message is still present and I can not send data via mesh. It seems that provisioning is fine because the message "Successfully provisioned" is visible in server logs. Maybe I have changed wrong values in connection interval.

  • Any update on this issue, I am having the same problem. If I disable all the BLE activity it does work but when I have it enabled it will not work. I get the " device is busy ".

    These are my BLE settings :

    #define SCAN_INTERVAL             0x00A0                                /**< Determines scan interval in units of 0.625 millisecond. */
    #define SCAN_WINDOW               0x0050                                /**< Determines scan window in units of 0.625 millisecond. */
    #define SCAN_TIMEOUT              0x0000                                /**< Timout when scanning. 0x0000 disables timeout. */
    
    #define MIN_CONNECTION_INTERVAL   MSEC_TO_UNITS(100, UNIT_1_25_MS)      /**< Determines minimum connection interval in milliseconds. */
    #define MAX_CONNECTION_INTERVAL   MSEC_TO_UNITS(500, UNIT_1_25_MS)       /**< Determines maximum connection interval in milliseconds. */
    #define SLAVE_LATENCY             0                                     /**< Determines slave latency in terms of connection events. */
    #define SUPERVISION_TIMEOUT       MSEC_TO_UNITS(4000, UNIT_10_MS)       /**< Determines supervision time-out in units of 10 milliseconds. */
    
  • I also added the nrf_mesh_on_ble_evt((ble_evt_t *)p_ble_evt); same as in the BLE uart example. When I follow the code and go to the definition of the code it takes me to nrf_mesh.c.

    There I see the following function :

    uint32_t nrf_mesh_on_ble_evt(ble_evt_t * p_ble_evt)
    {
        /**
         * @todo Populate with GATT handling when the time comes.
         */
        return NRF_SUCCESS;
    }
    

    Can I make the assumption this piece of code has not been implemented yet and BLE GATT + BLE mesh models do not work together yet ?

  • @Toaster: Please try increasing the scan interval and limit the scan window. The mesh stack and BLE stack both requires the radio, so the BLE stack shouldn't occupy the radio for too long. i would suggest to try giving 80% to mesh and 20% for BLE.

  • @Hung Bui: Could you tell me where can I change values in example ( ble_app_uart combined with light_switch_client) . I do not see variables like SCAN_INTERVAL in light_switch_client and do not know what can I change.

Related