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

Lighting switch and Ble_app_uart examples simultaneously (nRF52840, pca10056, s140, SDK 15.3.0, Mesh 3.1.0)

Hello,

I work with an nRF52840 DK and I want to put together the "Light switch" application with the "BLE_app_uart" application . I use the S140 softdevice, SDK 15.3.0 and version 3.1.0 of the mesh for this purpose.

For this I was inspired by this post: https://devzone.nordicsemi.com/f/nordic-q-a/29108/how-to-add-mesh-into-nrf5-sdk-v14-1-v15-ble-application , and also the example "ble_app_uart_coexist" which seems to do this, but only for nRF52832, s132, pca10040.

Currently I can operate the two codes "Light switch" and "ble_app_uart" separately, simply and only replacing the necessary code in the main.c file. 

Now the problem comes when I want to run the BLE and mesh together. When I launch the application. I then get a following error message:

app_error_weak.c, 119, Mesh error 4 at 0x000000000000 (:0)

However, I added the following lines at the beginning of my code : 

static void mesh_soc_evt_handler(uint32_t evt_id, void * p_context)
{
nrf_mesh_on_sd_evt(evt_id);
}

NRF_SDH_SOC_OBSERVER(m_mesh_soc_observer, 0, mesh_soc_evt_handler, NULL);

Despite this, it is impossible to run the BLE and mesh together. 

How can I get my code to work correctly?

I have attached the corresponding code to you.

server_BLE_Peripheral.zip

Thank you in advance for your help!

Maxime

 

Parents Reply Children
  • Hi Maxime, 

    I don't think it would be too hard to convert a project for nRF52832 to nRF52840. Most of our example has support for those device, with no change in the code, only changes in the project files.

    In your case Mesh Error 4 meaning no memory. Maybe you haven't configured your softdevice memory setting correctly? (configure the start address and the size of the application memory). If you want to see more debug information, you may need to change the debug level in Code Generation in Project option to level 3. 

  • Yes, you're right, thank you very much!

    I didn't think I could make the ble_uart_coexist work with my nRF52840...

    One more question. Do you think it's possible to replace the "ble_uart_peripheral" part with "ble_uart_central"? Or is it not possible because of the scanning?

  • Hi Maxime,

    Did you solve issue mentioned above:

    app_error_weak.c, 119, Mesh error 4 at 0x000000000000 (:0)

    in your compilation: server_BLE_Periheral ?

    If yes, could you tell me "how the way" ?

    Am working on this project now, and there is struggle with the Mesh error 4.

    Thanks forward.

    Kamo.

Related