Bluetooth Mesh Diagnostic Utilities#

Bluetooth Mesh Diagnostic Utilities.

Diagnostic Utilities. It provides the functionality that assist with diagnosing problems.

Modules#

sl_btmesh_evt_diagnostic_relay

sl_btmesh_evt_diagnostic_friend_queue

sl_btmesh_evt_diagnostic_friend_relay

sl_btmesh_evt_diagnostic_friend_remove

Functions#

sl_status_t
sl_btmesh_diagnostic_get_relay(uint32_t *relay_counter)
sl_status_t
sl_btmesh_diagnostic_get_statistics(uint32_t requested_chunk, uint32_t requested_offset, uint32_t *total_length, uint32_t *chunk_offset, size_t max_statistics_size, size_t *statistics_len, uint8_t *statistics)
sl_status_t
sl_btmesh_diagnostic_get_friend(uint32_t *queue_counter, uint32_t *relay_counter, uint32_t *remove_counter_sent, uint32_t *remove_counter_old_pdu, uint32_t *remove_counter_old_segack, uint32_t *remove_counter_old_segment)

Macros#

#define
sl_btmesh_cmd_diagnostic_init_id 0x006c0028
#define
sl_btmesh_cmd_diagnostic_deinit_id 0x016c0028
#define
sl_btmesh_cmd_diagnostic_enable_relay_id 0x026c0028
#define
sl_btmesh_cmd_diagnostic_disable_relay_id 0x036c0028
#define
sl_btmesh_cmd_diagnostic_get_relay_id 0x046c0028
#define
sl_btmesh_cmd_diagnostic_get_statistics_id 0x056c0028
#define
sl_btmesh_cmd_diagnostic_clear_statistics_id 0x066c0028
#define
sl_btmesh_cmd_diagnostic_enable_friend_id 0x076c0028
#define
sl_btmesh_cmd_diagnostic_disable_friend_id 0x086c0028
#define
sl_btmesh_cmd_diagnostic_get_friend_id 0x096c0028
#define
sl_btmesh_rsp_diagnostic_init_id 0x006c0028
#define
sl_btmesh_rsp_diagnostic_deinit_id 0x016c0028
#define
sl_btmesh_rsp_diagnostic_enable_relay_id 0x026c0028
#define
sl_btmesh_rsp_diagnostic_disable_relay_id 0x036c0028
#define
sl_btmesh_rsp_diagnostic_get_relay_id 0x046c0028
#define
sl_btmesh_rsp_diagnostic_get_statistics_id 0x056c0028
#define
sl_btmesh_rsp_diagnostic_clear_statistics_id 0x066c0028
#define
sl_btmesh_rsp_diagnostic_enable_friend_id 0x076c0028
#define
sl_btmesh_rsp_diagnostic_disable_friend_id 0x086c0028
#define
sl_btmesh_rsp_diagnostic_get_friend_id 0x096c0028

Function Documentation#

sl_btmesh_diagnostic_init#

sl_status_t sl_btmesh_diagnostic_init ()

Initialize Diagnostic Utilities.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_diagnostic_deinit#

sl_status_t sl_btmesh_diagnostic_deinit ()

Deinitialize Diagnostic Utilities. After this call it cannot be used until it is initialized again. See sl_btmesh_diagnostic_init.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_diagnostic_enable_relay#

sl_status_t sl_btmesh_diagnostic_enable_relay ()

Enable event sending for each relayed or proxied message. NOTE: On NCP target this can saturate the NCP PHY interface. An alternative for this is sl_btmesh_diagnostic_get_relay

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


sl_btmesh_diagnostic_disable_relay#

sl_status_t sl_btmesh_diagnostic_disable_relay ()

Disable event sending for each relayed or proxied message.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_diagnostic_get_relay#

sl_status_t sl_btmesh_diagnostic_get_relay (uint32_t * relay_counter)
Parameters
TypeDirectionArgument NameDescription
uint32_t *[out]relay_counter

Relayed or proxied message counter.

Get relayed or proxied message counter, which is a counter incremented for each relayed or proxied message.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_diagnostic_get_statistics#

sl_status_t sl_btmesh_diagnostic_get_statistics (uint32_t requested_chunk, uint32_t requested_offset, uint32_t * total_length, uint32_t * chunk_offset, size_t max_statistics_size, size_t * statistics_len, uint8_t * statistics)
Parameters
TypeDirectionArgument NameDescription
uint32_t[in]requested_chunk

Size of the statistics data chunk requested

uint32_t[in]requested_offset

Byte offset to the statistics data chunk requested

uint32_t *[out]total_length

Total length of the statistics data in the system

uint32_t *[out]chunk_offset

Byte offset to the statistics data chunk delivered

size_t[in]max_statistics_size

Size of output buffer passed in statistics

size_t *[out]statistics_len

On return, set to the length of output data written to statistics

uint8_t *[out]statistics

Raw statistics data counter array.

Get a chunk of Bluetooth mesh stack statistics data counters. As there can be a large amount of statistics, it has to be retrieved as chunks. The application is free to specify the size of the chunk it wants to use, but keep in mind that there is an inherent BGAPI limitation that caps the maximum size for the variable-length data array to 255 bytes; and furthermore, for the NCP use case there may be limited size buffers in the underlying serial channel.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_diagnostic_clear_statistics#

sl_status_t sl_btmesh_diagnostic_clear_statistics ()

Clear Bluetooth mesh stack statistics data counters.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_diagnostic_enable_friend#

sl_status_t sl_btmesh_diagnostic_enable_friend ()

Enable event sending for friendship diagnostics on the friend node side. NOTE: On NCP target this can saturate the NCP PHY interface. An alternative for this is sl_btmesh_diagnostic_get_friend

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


sl_btmesh_diagnostic_disable_friend#

sl_status_t sl_btmesh_diagnostic_disable_friend ()

Disable event sending for friendship diagnostics on the friend node side.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


sl_btmesh_diagnostic_get_friend#

sl_status_t sl_btmesh_diagnostic_get_friend (uint32_t * queue_counter, uint32_t * relay_counter, uint32_t * remove_counter_sent, uint32_t * remove_counter_old_pdu, uint32_t * remove_counter_old_segack, uint32_t * remove_counter_old_segment)
Parameters
TypeDirectionArgument NameDescription
uint32_t *[out]queue_counter

Number of messages queued for LPNs.

uint32_t *[out]relay_counter

Number of messages relayed to LPNs as a response to polls.

uint32_t *[out]remove_counter_sent

Number of messages discarded from LPN friendship queues due to message having been to sent to LPN and acknowledged by LPN by it sending the next poll.

uint32_t *[out]remove_counter_old_pdu

Number of messages discarded from LPN friendship queues due to message queue overflow, resulting in the need to flush the oldest PDU un the queue

uint32_t *[out]remove_counter_old_segack

Number of messages discarded from LPN friendship queues due to a new segment acknowledgement message replacing an old one in the queue.

uint32_t *[out]remove_counter_old_segment

Number of messages discarded from LPN friendship queues due to invalidated segments being removed from the queue.

Get friend event counters.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.