bt_mesh_friend_set() function
Enable or disable the Friend feature. Any active friendships will be terminated immediately if the Friend feature is disabled. Support for the Friend feature must be enabled through the @c CONFIG_BT_MESH_FRIEND configuration option.
Arguments
friendship
New Friend feature state. Must be one of BT_MESH_FEATURE_ENABLED and BT_MESH_FEATURE_DISABLED.
Return value
0 Successfully changed the Friend feature state. -ENOTSUP The Friend feature is not supported. -EINVAL Invalid parameter. -EALREADY Already in the given state.