Bluetooth: Mesh: subscription on fixed group addresses

There is errata clarification (Errata ID:18700)
about subscriptions on fixed group addresses.
It is possible to subscribe models on non primary elements
on any fixed group address except all nodes address.
Devices should be able to receive messages on fixed addresses
even if they do not support the feature
to which the fixed group address belongs.

Signed-off-by: Aleksandr Khromykh <Aleksandr.Khromykh@nordicsemi.no>
This commit is contained in:
Aleksandr Khromykh 2022-04-20 10:35:44 +02:00 committed by Carles Cufí
commit a7bb928420
4 changed files with 16 additions and 11 deletions

View file

@ -1039,7 +1039,7 @@ static int mod_sub_add(struct bt_mesh_model *model,
goto send_status;
}
if (!BT_MESH_ADDR_IS_GROUP(sub_addr)) {
if (!BT_MESH_ADDR_IS_GROUP(sub_addr) && !BT_MESH_ADDR_IS_FIXED_GROUP(sub_addr)) {
status = STATUS_INVALID_ADDRESS;
goto send_status;
}
@ -1117,7 +1117,7 @@ static int mod_sub_del(struct bt_mesh_model *model,
goto send_status;
}
if (!BT_MESH_ADDR_IS_GROUP(sub_addr)) {
if (!BT_MESH_ADDR_IS_GROUP(sub_addr) && !BT_MESH_ADDR_IS_FIXED_GROUP(sub_addr)) {
status = STATUS_INVALID_ADDRESS;
goto send_status;
}
@ -1198,7 +1198,7 @@ static int mod_sub_overwrite(struct bt_mesh_model *model,
goto send_status;
}
if (!BT_MESH_ADDR_IS_GROUP(sub_addr)) {
if (!BT_MESH_ADDR_IS_GROUP(sub_addr) && !BT_MESH_ADDR_IS_FIXED_GROUP(sub_addr)) {
status = STATUS_INVALID_ADDRESS;
goto send_status;
}