Hello,
I am currently working with a couple of nRF52833 development kits.
My software is based on the bluetooth mesh light & light switch examples and extends them by adding additional client as well as server models.
To achieve this, I added vendor model IDs as well as vendor OpCodes. I kept the company ID set to nordic.
The model is initialized as seen below:
#define BT_MESH_VENDOR_MODEL_HEARTBEAT_CLI(_cli) \ BT_MESH_MODEL_VND_CB(VENDOR_COMPANY_ID, \ BT_MESH_MODEL_ID_VENDOR_HEARTBEAT_CLI, \ _vendor_heartbeat_cli_opcode_list, &(_cli)->pub, \ BT_MESH_MODEL_USER_DATA(struct bt_mesh_vendor_heartbeat_cli, _cli), \ &_bt_mesh_vendor_heartbeat_cli_cb)
My issue arises, whenever I use the BT_MESH_MODEL_OP_3 macro to setup the vendor OpCodes. Doing so will throw the following error:
- <err> bt_mesh_access: No OpCode 0x00d30059 for elem 0x159
- The Macro I use looks like this
-
#define BT_MESH_VENDOR_HEARTBEAT_STATUS_OP BT_MESH_MODEL_OP_3(0x13, VENDOR_COMPANY_ID)
-
- With VENDOR_COMPANY_ID set to 0x0059 (Nordic)
- The Model ID for client/server is the following:
-
#define BT_MESH_MODEL_ID_VENDOR_HEARTBEAT_CLI 0x000F#define BT_MESH_MODEL_ID_VENDOR_HEARTBEAT_SRV 0x0010
-
Based on my understanding, the above setup should be correct.
My code works fine if I swap the vendor models/opcodes for some generic one like from the OnOff Client/Server.
Looking forward to your feedback. Maybe I'm just overlooking some obvious mistake in my setup.
Thank you.
Best regards,
Andreas