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

BLE Mesh SDK along with peripheral mode.

I want to change the light-control example given in mesh SDK such that instead of using buttons to trigger messages, I want to connect client with mobile and control servers through mobile. At beginning, I am trying with one client and one server to reduce the complexities. I have combined the mesh SDK light control client example with our SDK12 based application as suggested here

The client side application has both mesh and peripheral mode activated. I am using the ble_nus service to communicate with the mobile. The client communicates with the server using the simple_on_off model provided in the mesh SDK. I have not called the mesh related calls from the ble_nus context and have kept the two contexts exclusive.

On the server side, I have flashed the server example directly on a PCA10040 board directly without tampering with the example code. So the server side is only mesh.

When the devices are powered, the provisioning happens successfully. And the mobile also gets connected to the client successfully. But when I send a command from the mobile, I get the error 8 (NRF_ERROR_INVALID_STATE) from the ble_nus_string_send function, and nothing happens. When I send a command again, then I receive "Device is busy" error from the mesh side.

Can someone help me on this?

Related