CONFIG_BT_MESH_DFD_SRV_TARGETS_MAX questions

Hello

I've been experimenting in increasing the number of targets that a mesh FOTA distribution server can support on nRF52840

The CONFIG_BT_MESH_DFD_SRV_TARGETS_MAX has a maximum  65535

But for practical purposes I'd be happy if I could have at least 50-60.
Ran into build asserts in zephyr\subsys\bluetooth\mesh\dfd_srv.c
"The Firmware Distribution Receivers List message does not fit into the maximum " "outgoing SDU size"

The comparison is done to the  BT_MESH_TX_SDU_MAX which is built as follows
#define BT_MESH_TX_SDU_MAX        MAX((BT_MESH_TX_SEG_MAX *     \
                       BT_MESH_APP_SEG_SDU_MAX),    \
                      BT_MESH_APP_UNSEG_SDU_MAX)
CONFIG_BT_MESH_TX_SEG_MAX is limited to 32
BT_MESH_APP_SEG_SDU_MAX is defined as 12
BT_MESH_APP_UNSEG_SDU_MAX is defined as 15
By trial and error I was able to set the number of targets to 39 with these configurations
ONFIG_BT_MESH_MSG_CACHE_SIZE=256
CONFIG_BT_MESH_ADV_BUF_COUNT=128
CONFIG_BT_MESH_TX_SEG_MAX=32
CONFIG_BT_MESH_RX_SEG_MAX=32
CONFIG_BT_MESH_TX_SEG_MSG_COUNT=64
CONFIG_BT_MESH_RX_SEG_MSG_COUNT=64
CONFIG_BT_MESH_DFD_SRV_TARGETS_MAX=39
Is this it? Or is there another way to increase the number of supported targets?
Thank you
 
Parents
  • Update

    Experimented with CONFIG_BT_MESH_TX_SEG_MAX and CONFIG_BT_MESH_DFD_SRV_TARGETS_MAX
    Was able to increase CONFIG_BT_MESH_DFD_SRV_TARGETS_MAX to 40 with CONFIG_BT_MESH_TX_SEG_MAX set to 20

    However, new problem
    Image transfer fails with status 3 (internal error)

    Distributor log shows multiple messages " <wrn> bt_mesh_transport: SDU canceled"

    which come from zephyr\subsys\bluetooth\mesh\transport.c 

    ack = net_buf_simple_pull_be32(buf);
    If the ack is not in the buffer this message is printed
    More experimentation shows that any  CONFIG_BT_MESH_TX_SEG_MAX value greater than 10 causes "SDU canceled" message and a failure to transfer the image
    Which means that the CONFIG_BT_MESH_DFD_SRV_TARGETS_MAX can only be 22 - any greater value requires CONFIG_BT_MESH_TX_SEG_MAX  to be increased otherwise there is a build assert  described above. 
     
    Any ideas?
    Thanks

     

Reply
  • Update

    Experimented with CONFIG_BT_MESH_TX_SEG_MAX and CONFIG_BT_MESH_DFD_SRV_TARGETS_MAX
    Was able to increase CONFIG_BT_MESH_DFD_SRV_TARGETS_MAX to 40 with CONFIG_BT_MESH_TX_SEG_MAX set to 20

    However, new problem
    Image transfer fails with status 3 (internal error)

    Distributor log shows multiple messages " <wrn> bt_mesh_transport: SDU canceled"

    which come from zephyr\subsys\bluetooth\mesh\transport.c 

    ack = net_buf_simple_pull_be32(buf);
    If the ack is not in the buffer this message is printed
    More experimentation shows that any  CONFIG_BT_MESH_TX_SEG_MAX value greater than 10 causes "SDU canceled" message and a failure to transfer the image
    Which means that the CONFIG_BT_MESH_DFD_SRV_TARGETS_MAX can only be 22 - any greater value requires CONFIG_BT_MESH_TX_SEG_MAX  to be increased otherwise there is a build assert  described above. 
     
    Any ideas?
    Thanks

     

Children
No Data
Related