mesh: invalid message size for opcode

I have a vendor mesh model that needs to send a custom 8 byte message.

Here are some definitions

BT_MESH_MODEL_PUB_DEFINE(vnd_pub, NULL, 3 + 8); <--what is with this plus notation that I see in all samples? Does this mean 3 for vendor opcode and 8 for data? The documentation for the macro just says that the third parameter is the size
The message is defined as follows
typedef struct __attribute((packed))
    {
        uint16_t data1: 14;
        uint16_t data2: 14;
        uint16_t data3: 14;
        uint16_t data4: 7;
        uint16_t data5: 7;
        uint16_t data6: 7;
        uint16_t unused     : 1;
    } my_mesg_msg;
The message is sent the following way:
my_mesg_msg msg  = {
..initialize the message values
};
bt_mesh_model_msg_init(vnd_models[0].pub->msg,BT_MESH_MODEL_OP_3(0x0E 0x59));
net_buf_simple_add_mem(vnd_models[0].pub->msg,(void*)&msg,sizeof(msg));
bt_mesh_model_publish(&vnd_models[0]);  (returns 0)
Here is the log output from the mesh stack

00> [00:00:47.759,155] <dbg> bt_mesh_net: bt_mesh_net_send: src 0x0000 dst 0xffff len 11 headroom 9 tailroom 9
00> [00:00:47.759,185] <dbg> bt_mesh_net: bt_mesh_net_send: Payload len 11: 638b39e8d79b31a0d68f97
00> [00:00:47.759,216] <dbg> bt_mesh_net: bt_mesh_net_send: Seq 0x000181
00> [00:00:47.759,216] <dbg> bt_mesh_net: net_header_encode: src 0x0000 dst 0xffff ctl 0 seq 0x000181
00> [00:00:47.759,338] <dbg> bt_mesh_net: bt_mesh_net_local: src: 0x0000 dst: 0x0000 seq 0x000181 sub 0x20000948
00> [00:00:47.759,429] <err> bt_mesh_access: Invalid message size for OpCode 0x00ce0059

Any idea why?
Thanks
Parents Reply Children
No Data
Related