Bluetooth: Mesh: split gatt client and solicitation pdu sending

The ability to send the solicitation PDU doesn't
depend on GATT Client role.
Commit makes independent one functionality from
another.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
This commit is contained in:
Aleksandr Khromykh 2023-11-06 12:51:48 +01:00 committed by Carles Cufí
commit 50d17a0d52
4 changed files with 7 additions and 8 deletions

View file

@ -31,7 +31,7 @@ In the case where both GATT Proxy and Private GATT Proxy states are disabled on
device cannot connect to it. A node supporting the :ref:`bluetooth_mesh_od_srv` may however be
solicited to advertise connectable advertising events without enabling the Private GATT Proxy state.
To solicit the node, the legacy device can send a Solicitation PDU by calling the
:func:`bt_mesh_proxy_solicit` function. To enable this feature, the client must to be compiled with
:func:`bt_mesh_proxy_solicit` function. To enable this feature, the device must to be compiled with
the :kconfig:option:`CONFIG_BT_MESH_PROXY_SOLICITATION` option set.
Solicitation PDUs are non-mesh, non-connectable, undirected advertising messages containing Proxy

View file

@ -97,9 +97,9 @@ int bt_mesh_proxy_connect(uint16_t net_idx);
*/
int bt_mesh_proxy_disconnect(uint16_t net_idx);
/** @brief Schedule advertising of Solicitation PDUs on Proxy Client .
/** @brief Schedule advertising of Solicitation PDUs.
*
* Once called Proxy Client will schedule advertising Solicitation PDUs for the amount of time
* Once called, the device will schedule advertising Solicitation PDUs for the amount of time
* defined by @c adv_int * (@c CONFIG_BT_MESH_SOL_ADV_XMIT + 1), where @c adv_int is 20ms
* for Bluetooth v5.0 or higher, or 100ms otherwise.
*

View file

@ -1439,11 +1439,10 @@ config BT_MESH_SOLICITATION
bool
config BT_MESH_PROXY_SOLICITATION
bool "Proxy solicitation feature for Proxy Client support"
depends on BT_MESH_PROXY_CLIENT
bool "Proxy solicitation feature"
select BT_MESH_SOLICITATION
help
This option enables support for sending Solicitation PDUs for Proxy Client.
This option enables support for sending Solicitation PDUs.
config BT_MESH_SOL_ADV_XMIT
int "Solicitation PDU retransmission count"

View file

@ -387,6 +387,7 @@ static int cmd_proxy_disconnect(const struct shell *sh, size_t argc,
return 0;
}
#endif /* CONFIG_BT_MESH_PROXY_CLIENT */
#if defined(CONFIG_BT_MESH_PROXY_SOLICITATION)
static int cmd_proxy_solicit(const struct shell *sh, size_t argc,
@ -410,7 +411,6 @@ static int cmd_proxy_solicit(const struct shell *sh, size_t argc,
return err;
}
#endif /* CONFIG_BT_MESH_PROXY_SOLICITATION */
#endif /* CONFIG_BT_MESH_PROXY_CLIENT */
#endif /* CONFIG_BT_MESH_SHELL_GATT_PROXY */
#if defined(CONFIG_BT_MESH_SHELL_PROV)
@ -1739,11 +1739,11 @@ SHELL_STATIC_SUBCMD_SET_CREATE(proxy_cmds,
#if defined(CONFIG_BT_MESH_PROXY_CLIENT)
SHELL_CMD_ARG(connect, NULL, "<NetKeyIdx>", cmd_proxy_connect, 2, 0),
SHELL_CMD_ARG(disconnect, NULL, "<NetKeyIdx>", cmd_proxy_disconnect, 2, 0),
#endif
#if defined(CONFIG_BT_MESH_PROXY_SOLICITATION)
SHELL_CMD_ARG(solicit, NULL, "<NetKeyIdx>",
cmd_proxy_solicit, 2, 0),
#endif
#endif
SHELL_SUBCMD_SET_END);
#endif /* CONFIG_BT_MESH_SHELL_GATT_PROXY */