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

Proxy node with BLE_UART coexist

I am using nRF52 SDK v15.2.0, nRF SDK Mesh 3.0.0, and  Segger  v4.1.2.

I am trying to add the proxy service to the client node of the BLE_UART_COEXIST example.  Has anyone here done this successfully?  

ERROR 8 [NRF_ERROR_INVALID_STATE]   is the error I get. 

Parents
  • Hi.

    Which function call gives you this error? It is hard to pin point the cause based on so little information.

    Best regards,

    Andreas

  • ble_softdevice_support.c:117 which is the ble_stack_init function from the mesh_main.    

    As far as I know the ble_stack_init, gap_params, conn_params functions need to be called twice; once for BLE_UART  and once for Proxy service. Is this correct? I also noticed these three functions are different in the Mesh SDK compared to the 15.2 SDK.  I feel like I am having some kind of storage conflict.

  • Hi.

    Line 117 in ble_softdevice_support.c is a error check for the function call nrf_sdh_enable_request(), and if you get NRF_ERROR_INVALID_STATE, you can see below in the API that you have already enabled the SoftDevice when you are making the function call nrf_sdh_enable_request():

    /**@brief   Function for requesting to enable the SoftDevice.
     *
     * This function issues a @ref NRF_SDH_EVT_ENABLE_REQUEST request to all observers that
     * were registered using the @ref NRF_SDH_REQUEST_OBSERVER macro. The observers may or
     * may not acknowledge the request. If all observers acknowledge the request, the
     * SoftDevice will be enabled. Otherwise, the process will be stopped and the observers
     * that did not acknowledge have the responsibility to restart it by calling
     * @ref nrf_sdh_request_continue when they are ready for the SoftDevice to change state.
     *
     * @retval  NRF_SUCCESS                 The process is started.
     * @retval  NRF_ERROR_INVALID_STATE     The SoftDevice is already enabled.
     */
    ret_code_t nrf_sdh_enable_request(void);

    You should not have to call ble_stack_init, gap_params_init, and conn_params_init twice.

    Best regards,

    Andreas

  • Thanks for the reply.

    So, I should be able to just set MESH_FEATURE_GATT_PROXY_ENABLED 1 and set MESH_FEATURE_PB_GATT_ENABLED 1 to get the proxy service to work with the BLE_UART?

  • Hi again and happy new year.

    I said something wrong in my previous reply, I've looked more close at the code and you can call gap_params_init and conn_params_init twice.

    brinehart said:
    So, I should be able to just set MESH_FEATURE_GATT_PROXY_ENABLED 1 and set MESH_FEATURE_PB_GATT_ENABLED 1 to get the proxy service to work with the BLE_UART?

     You should just set them in the nrf_mesh_config_core.h file

    Best regards,

    Andreas

  • Thanks again for your help. Here's what I have been getting. 

    ERROR 4 [NRF_ERROR_NO_MEM], mesh_adv.c:147 "Not enough memory to configure a new advertising handle. Update an existing advertising handle instead."

    It looks like this has been solved in other cases and seems that this is where my problem is.

  • Hi.

    The error NRF_ERROR_NO_MEM is because there is not enough memory to configure the advertising handle, you can check if you have the right start address atleast by following step 7 in this tutorial.

    Best regards,

    Andreas

Reply Children
Related