I think instead of releasing separate SDK for #BluetoothMesh, Nordic Semiconductor should merge #BluetoothMesh into #SoftDevice. Is it possible ?
If yes, then we can even add support for all Models defined by Bluetooth_SIG in it.
Firmware app developer will only enable feature of MESH & required Models using preprocessor like
#define Bluetooth_Mesh
#define GEN_ONOFF_SRV_MODEL
#define GEN_ONOFF_CLI_MODEL
#define GEN_LEVEL_SRV_MODEL ...etc....etc...
Then internally all functions within every Model (which are part of #SoftDevice) will transfer control to one function let's say foo(model, ctx, buf, OPCODE).
With foo() Firmware app developer could do whatever he wants like ......
void foo(struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx, struct net_buf_simple *buf, uint16_t opcode)
{
switch(opcode)
{
case 0x8201: //GEN_ONOFF_SRV_GET
// firmware App's Logic
break;
case 0x8203: //GEN_ONOFF_SRV_UNACK
// firmware App's Logic
beak;
:
:
}
}
Thank You !!
Note : my foo() is inspired from Zephyr OS implementation.