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
  • 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. 

Children
Related