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
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
Hi Andy,
Happy New Year !
If you want to set the DFU distributor to distribute firmware to for example 60 targets, you can send 3 Firmware Distribution Receivers Add messages , each contain 20 targets.
The targets will be added to the list and you will have all 60 targets in the list.
You don't have to send one Firmware Distribution Receivers Add message with all 60 targets.
I believe that what the documentation suggests:
Before the Distributor can start distributing the firmware image, it needs a list of Target nodes to send the image to. The Initiator gets the full list of Target nodes either by querying the potential targets directly, or through some external authority. The Initiator uses this information to populate the Distributor’s receivers list with the address and relevant firmware image index of each Target node. The Initiator may send one or more Firmware Distribution Receivers Add messages to build the Distributor’s receivers list, and a Firmware Distribution Receivers Delete All message to clear it.
I assume by "send 3 Firmware distribution Receivers Add messages" you mean sending "mesh models dfd receivers-add" command 3 times with a different set of addresses? If that's the case - it did not work
Here is what I did. My CONFIG_BT_MESH_DFD_SRV_TARGETS_MAX is set to 20
mesh models dfd receivers-add 1,0;2,0;3,0;4,0;5,0;6,0;7,0;8,0;9,0;10,0;11,0;12,0;13,0;14,0;15,0;16,0;17,0;18,0;19,0;20,0
mesh models dfd receivers-get 0 100
{
"target_cnt": 20,
"targets": {
"0": { "blob_addr": 1, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"1": { "blob_addr": 2, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"2": { "blob_addr": 3, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"3": { "blob_addr": 4, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"4": { "blob_addr": 5, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"5": { "blob_addr": 6, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"6": { "blob_addr": 7, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"7": { "blob_addr": 8, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"8": { "blob_addr": 9, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"9": { "blob_addr": 10, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"10": { "blob_addr": 11, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"11": { "blob_addr": 12, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"12": { "blob_addr": 13, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"13": { "blob_addr": 14, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"14": { "blob_addr": 15, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"15": { "blob_addr": 16, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"16": { "blob_addr": 17, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"17": { "blob_addr": 18, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"18": { "blob_addr": 19, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"19": { "blob_addr": 20, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 }
}
}
mesh models dfd receivers-add 21,0;22,0;23,0;24,0;25,0;26,0;27,0;28,0;29,0;30,0;31,0;32,0;33,0;34,0;35,0;36,0;37,0;38,0;39,0;40,0
mesh models dfd receivers-get 0 100
{
"target_cnt": 20,
"targets": {
"0": { "blob_addr": 1, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"1": { "blob_addr": 2, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"2": { "blob_addr": 3, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"3": { "blob_addr": 4, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"4": { "blob_addr": 5, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"5": { "blob_addr": 6, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"6": { "blob_addr": 7, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"7": { "blob_addr": 8, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"8": { "blob_addr": 9, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"9": { "blob_addr": 10, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"10": { "blob_addr": 11, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"11": { "blob_addr": 12, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"12": { "blob_addr": 13, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"13": { "blob_addr": 14, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"14": { "blob_addr": 15, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"15": { "blob_addr": 16, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"16": { "blob_addr": 17, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"17": { "blob_addr": 18, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"18": { "blob_addr": 19, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 },
"19": { "blob_addr": 20, "phase": 0, "status": 0, "blob_status": 0, "progress": 0, "img_idx": 0 }
}
}
As you can see devices with addresses 20-40 were not added
That makes sense as CONFIG_BT_MESH_DFD_SRV_TARGETS_MAX is 20
Then I don't understand what you mean by "send 3 Firmware distribution Receivers Add messages". How do I do that?
Thanks
Could you try changing CONFIG_BT_MESH_DFD_SRV_TARGETS_MAX to 60 and send receivers-add 3 times with different sets ?
What's the difference between sending receivers-add once with 60 targets and sending it 3 times with 20 targets? All targets are added to the same list which is CONFIG_BT_MESH_DFD_SRV_TARGETS_MAX long. Could you clarify?
Also if you recall I ran into another problem . CONFIG_BT_MESH_DFD_SRV_TARGETS_MAX > 22 will require a CONFIG_BT_MESH_TX_SEG_MAX to be set to a value higher than 10 which results in "DFU canceled" error during distribution
I mentioned this earlier:
With mesh, the strategy is to avoid sending a large packet. It will be redistributed to the whole network and waste a lot or resources of the network (and cause congestion).
The better way of doing it is to send smaller number of receive list one by one using Firmware Distribution Receivers Add messages, instead of sending them at once.
Have you tried to test setting CONFIG_BT_MESH_DFD_SRV_TARGETS_MAX >22 but only send a few target once at a time (6 targets and four times for example)?