Bluetooth Mesh Light Control Client Model#

Bluetooth Mesh Light Control Client Model.

Bluetooth Mesh LC Client model API provides functionality to send and receive messages to/from the LC Server and LC Setup Server models.

Throughout the API, the client model that's used is identified by its element address and model ID, while the server model responding to the client model requests is identified by its element address and model ID.

The API has functions for querying server model states and requesting server model state changes

Modules#

sl_btmesh_evt_lc_client_mode_status

sl_btmesh_evt_lc_client_om_status

sl_btmesh_evt_lc_client_light_onoff_status

sl_btmesh_evt_lc_client_property_status

Functions#

sl_status_t
sl_btmesh_lc_client_init(uint16_t elem_index)
sl_status_t
sl_btmesh_lc_client_get_mode(uint16_t server_address, uint16_t elem_index, uint16_t appkey_index)
sl_status_t
sl_btmesh_lc_client_set_mode(uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint8_t flags, uint8_t mode)
sl_status_t
sl_btmesh_lc_client_get_om(uint16_t server_address, uint16_t elem_index, uint16_t appkey_index)
sl_status_t
sl_btmesh_lc_client_set_om(uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint8_t flags, uint8_t mode)
sl_status_t
sl_btmesh_lc_client_get_light_onoff(uint16_t server_address, uint16_t elem_index, uint16_t appkey_index)
sl_status_t
sl_btmesh_lc_client_set_light_onoff(uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint8_t flags, uint8_t target_state, uint8_t tid, uint32_t transition_time_ms, uint16_t message_delay_ms)
sl_status_t
sl_btmesh_lc_client_get_property(uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint16_t property_id)
sl_status_t
sl_btmesh_lc_client_set_property(uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint8_t flags, uint16_t property_id, size_t params_len, const uint8_t *params)

Function Documentation#

sl_btmesh_lc_client_init#

sl_status_t sl_btmesh_lc_client_init (uint16_t elem_index)
Parameters
[in]elem_index

Index of the client element.

Initialize the LC Client model. LC Client does not have any internal configuration. It only activates the model in the mesh stack.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 13678 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_lc_client_get_mode#

sl_status_t sl_btmesh_lc_client_get_mode (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index)
Parameters
[in]server_address

Device to be queried. The address 0x0000 can be used to publish the message according to the model configuration.

[in]elem_index

Index of the client element.

[in]appkey_index

Appkey used by server_address.

Get the mode status.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 13695 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_lc_client_set_mode#

sl_status_t sl_btmesh_lc_client_set_mode (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint8_t flags, uint8_t mode)
Parameters
[in]server_address

Destination server model address. The address 0x0000 can be used to publish the message according to the model configuration.

[in]elem_index

Client model element index

[in]appkey_index

The application key index to use.

[in]flags

Bit 1 (0x02) defines whether a response is required. If set to 1, SET PROPERTY message will be sent. Zero will send SET PROPERTY UNACKNOWLEDGED.

[in]mode

Mode value to set

Set mode

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 13719 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_lc_client_get_om#

sl_status_t sl_btmesh_lc_client_get_om (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index)
Parameters
[in]server_address

Device to be queried. The address 0x0000 can be used to publish the message according to the model configuration.

[in]elem_index

Index of the client element.

[in]appkey_index

Appkey used by server_address.

Get the OM status.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 13740 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_lc_client_set_om#

sl_status_t sl_btmesh_lc_client_set_om (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint8_t flags, uint8_t mode)
Parameters
[in]server_address

Destination server model address. The address 0x0000 can be used to publish the message according to the model configuration.

[in]elem_index

Client model element index

[in]appkey_index

The application key index to use.

[in]flags

Bit 1 (0x02) defines whether response is required. If set to 1, SET PROPERTY message will be sent. Zero will send SET PROPERTY UNACKNOWLEDGED.

[in]mode

Mode value to set

Set occupancy mode.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 13764 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_lc_client_get_light_onoff#

sl_status_t sl_btmesh_lc_client_get_light_onoff (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index)
Parameters
[in]server_address

Device to be queried. The address 0x0000 can be used to publish the message according to the model configuration.

[in]elem_index

Index of the client element.

[in]appkey_index

Appkey used by server_address.

Get the Light OnOff status.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 13785 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_lc_client_set_light_onoff#

sl_status_t sl_btmesh_lc_client_set_light_onoff (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint8_t flags, uint8_t target_state, uint8_t tid, uint32_t transition_time_ms, uint16_t message_delay_ms)
Parameters
[in]server_address

Destination server model address. The address 0x0000 can be used to publish the message according to the model configuration.

[in]elem_index

Client model element index

[in]appkey_index

The application key index to use.

[in]flags

Bit 1 (0x02) defines whether response is required. If set to 1, SET PROPERTY message will be sent. Zero will send SET PROPERTY UNACKNOWLEDGED.

[in]target_state

The target value of the Light LC Light OnOff state

[in]tid

Transaction identifier

[in]transition_time_ms

Transition time in milliseconds. Value of 0xFFFFFFFF will cause this parameter as well as the "delay" parameter to be omitted.

[in]message_delay_ms

Message execution delay in milliseconds. If the "transition_time" is 0xFFFFFFFF, this parameter is ignored. If both the transition time and the delay are zero, the transition is immediate. Valid range: 0-1275.

Set the Light OnOff.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 13817 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_lc_client_get_property#

sl_status_t sl_btmesh_lc_client_get_property (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint16_t property_id)
Parameters
[in]server_address

Device to be queried. The address 0x0000 can be used to publish the message according to the model configuration.

[in]elem_index

Index of the client element.

[in]appkey_index

Appkey used by server_address.

[in]property_id

The property ID to query.

Get the Property status.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 13842 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_lc_client_set_property#

sl_status_t sl_btmesh_lc_client_set_property (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint8_t flags, uint16_t property_id, size_t params_len, const uint8_t * params)
Parameters
[in]server_address

Destination server model address. The address 0x0000 can be used to publish the message according to the model configuration.

[in]elem_index

Client model element index

[in]appkey_index

The application key index to use.

[in]flags

Bit 1 (0x02) defines whether response is required. If set to 1, SET PROPERTY message will be sent. Zero will send SET PROPERTY UNACKNOWLEDGED.

[in]property_id

Property ID for the LC Server. Range: 0x0001 - 0x0ffff for a specific device property, the value 0x0000 is prohibited.

[in]params_len

Length of data in params

[in]params

Byte array containing serialized fields of LC Property, excluding the property ID

Set a particular property.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 13871 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

Macro Definition Documentation#

sl_btmesh_cmd_lc_client_init_id#

#define sl_btmesh_cmd_lc_client_init_id
Value:
0x004c0028

Definition at line 13530 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_cmd_lc_client_get_mode_id#

#define sl_btmesh_cmd_lc_client_get_mode_id
Value:
0x014c0028

Definition at line 13531 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_cmd_lc_client_set_mode_id#

#define sl_btmesh_cmd_lc_client_set_mode_id
Value:
0x024c0028

Definition at line 13532 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_cmd_lc_client_get_om_id#

#define sl_btmesh_cmd_lc_client_get_om_id
Value:
0x044c0028

Definition at line 13533 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_cmd_lc_client_set_om_id#

#define sl_btmesh_cmd_lc_client_set_om_id
Value:
0x054c0028

Definition at line 13534 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_cmd_lc_client_get_light_onoff_id#

#define sl_btmesh_cmd_lc_client_get_light_onoff_id
Value:
0x074c0028

Definition at line 13535 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_cmd_lc_client_set_light_onoff_id#

#define sl_btmesh_cmd_lc_client_set_light_onoff_id
Value:
0x084c0028

Definition at line 13536 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_cmd_lc_client_get_property_id#

#define sl_btmesh_cmd_lc_client_get_property_id
Value:
0x094c0028

Definition at line 13537 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_cmd_lc_client_set_property_id#

#define sl_btmesh_cmd_lc_client_set_property_id
Value:
0x0a4c0028

Definition at line 13538 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_lc_client_init_id#

#define sl_btmesh_rsp_lc_client_init_id
Value:
0x004c0028

Definition at line 13539 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_lc_client_get_mode_id#

#define sl_btmesh_rsp_lc_client_get_mode_id
Value:
0x014c0028

Definition at line 13540 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_lc_client_set_mode_id#

#define sl_btmesh_rsp_lc_client_set_mode_id
Value:
0x024c0028

Definition at line 13541 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_lc_client_get_om_id#

#define sl_btmesh_rsp_lc_client_get_om_id
Value:
0x044c0028

Definition at line 13542 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_lc_client_set_om_id#

#define sl_btmesh_rsp_lc_client_set_om_id
Value:
0x054c0028

Definition at line 13543 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_lc_client_get_light_onoff_id#

#define sl_btmesh_rsp_lc_client_get_light_onoff_id
Value:
0x074c0028

Definition at line 13544 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_lc_client_set_light_onoff_id#

#define sl_btmesh_rsp_lc_client_set_light_onoff_id
Value:
0x084c0028

Definition at line 13545 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_lc_client_get_property_id#

#define sl_btmesh_rsp_lc_client_get_property_id
Value:
0x094c0028

Definition at line 13546 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_lc_client_set_property_id#

#define sl_btmesh_rsp_lc_client_set_property_id
Value:
0x0a4c0028

Definition at line 13547 of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h