Use BLE GATT and BLE mesh in same code in nrf connect SDK

Hello,

For our project, we have a gateway which is in a mesh network with others devices. But we would like our gateway to be able to, sometime, connect to a specific device using LE GATT service to send it a big file (around 600 Ko) as it is way to slow to do it with a BLE mesh network. As such, we are trying to merge the example GATT Throughput Service with our code.

But we do have some problems since the settings for the BLE mesh and LE GATT are different. As it is not mandatory for us to use the mesh and the connected BLE in the same time, our idea was to use two settings files: one for the mesh and one for the LE GATT and load the specific file in function of the connection we are trying to do. For example, if the gateway wants to send a file to a device, it will first send it a message to inform it to pass into LE GATT. Then both will load their settings file for LE GATT. Then the device will start advertising and the gateway will start scanning. And when both are connected, they will exchange the file and go back to the mesh settings. However, if the device is already provisioned by the gateway in mesh,
the device is not able to to advertising (error 120 for the function bt_le_adv_start) even if we call settings_load on a new file. We didn't see in the API something to unload the settings. Is there some way to do that ? And in general, what is the correct way to merge bluetooth GATT and mesh in a same code ?


Parents Reply Children
No Data
Related