Hello,
I am trying to have my own BLE advertising and scanning (with filtering) custom service (from now on peer service) in parallel with BLE mesh. So far I've been able to make the peer and mesh work independently by looking at the Zephyr's Bluetooth mesh provisioning sample [1] (for mesh) and the Nordic's Distance measurement sample [2] (for peer, removing the distance measurement feature, I am only interested in the scanning/adv part). But when I combine them one of the two services it does not work.
I've tried to follow the approach of the Nordic's Bluetooth Mesh and Peripheral Coexistence [3], where they create a second BLE identity for the custom advertisement set. But it does not solve the issue, where one of the services (mesh or peer) is broken. Which service is broken depends on the order of initialization. If I start the mesh first, then the peer scan filtering callback does not execute. This means that I am either not scanning or not advertising my peer service. If I start peer first, then the mesh provisioner is incapable of provisioning any nodes (except itself).
Where could the issue be? I've produced a minimal example [4] in case the issue is not clear from my explanation. Any help is greatly apreciated.
[1] github.com/.../mesh_provisioner
[2] github.com/.../nrf_dm
[3] github.com/.../ble_peripheral_lbs_coex