电子货架标签 Profile

[English]

电子货架标签 Profile (Electronic Shelf Label Profile, ESLP) 在 ble_conn_mgr 与 ESL Service 之上实现 ESL Tag 与 Access Point 角色。

Tag 角色 (CONFIG_BLE_ESL_PROFILE):

  • 注册 ESL Service

  • 状态:Unassociated、Configuring、Associated、Updating、Synchronized

  • 关联特性写入与生命周期 ECP 命令

  • 可选 PAST / PAwR 同步态

AP 角色 (CONFIG_BLE_ESL_PROFILE_AP):

  • 对已连接 Tag 做 GATT 关联配置

  • PAwR 广播控制、PAST 同步传输、按 subevent 排队命令

Tag 使用步骤:

  1. 在 menuconfig 中启用 CONFIG_BLE_ESL_PROFILE。

  2. 依次调用 esp_ble_conn_init()、esp_ble_eslp_init()、esp_ble_conn_start()。

AP 使用步骤:

  1. 启用 CONFIG_BLE_ESL_PROFILE_AP 以及所需的 ble_conn_mgr 选项。

  2. 依次调用 esp_ble_conn_init()、esp_ble_eslp_ap_init()、esp_ble_conn_start()。

  3. 发现完成后调用 esp_ble_eslp_ap_configure_tag()。

示例

bluetooth/ble_profiles/ble_esl/ble_esl_tag。

bluetooth/ble_profiles/ble_esl/ble_esl_ap。

API 参考

Header File

Functions

esp_err_t esp_ble_eslp_init(const esp_ble_eslp_config_t *config)

Initialization Electronic Shelf Label Profile.

Call esp_ble_esl_set_display_info() first when CONFIG_BLE_ESL_DISPLAY_INFO is enabled.

参数

config – [in] The pointer to store the profile configuration

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_STATE on wrong initialization

  • ESP_FAIL on error

esp_err_t esp_ble_eslp_deinit(void)

Deinitialization Electronic Shelf Label Profile.

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_register_ecp_handler(esp_ble_eslp_ecp_handler_t handler, void *priv)

Register an ECP command callback.

参数
  • handler – [in] The callback function

  • priv – [in] User context

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_get_state(esp_ble_eslp_state_t *state)

Get the current Tag state.

参数

state – [out] The pointer to store the Tag state

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_is_associated(bool *associated)

Get whether the Tag is associated.

参数

associated – [out] The pointer to store the association flag

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_get_basic_state(uint16_t *basic_state)

Get the Basic State bitmap value.

参数

basic_state – [out] The pointer to store the Basic State bitmap

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_set_basic_state(uint16_t basic_state)

Set the Basic State bitmap value.

参数

basic_state – [in] The Basic State bitmap

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_set_service_needed(bool needed)

Set or clear the Service Needed bit in Basic State.

参数

needed – [in] true to set Service Needed; false to clear it

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_register_service_needed_hold(esp_ble_eslp_service_needed_hold_cb_t cb, void *priv)

Register a hold callback for Service Reset.

Service Reset clears Service Needed only when the callback returns false. Pass NULL to unregister.

参数
  • cb – [in] Hold callback, or NULL

  • priv – [in] User context

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_indicate_ecp_response(const uint8_t *data, uint16_t len)

Indicate an ECP response.

参数
  • data – [in] The pointer to store the response TLV

  • len – [in] The length of response TLV

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_indicate_basic_state(const uint16_t *basic_state)

Indicate a Basic State response.

参数

basic_state – [in] The pointer to store the Basic State bitmap

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_indicate_error(uint8_t error_code)

Indicate an Error response.

参数

error_code – [in] One of BLE_ESL_ERR_*

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_indicate_display_state(uint8_t display_index, uint8_t image_index)

Indicate a Display State response.

参数
  • display_index – [in] The display index

  • image_index – [in] The image index

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_indicate_led_state(uint8_t led_index)

Indicate an LED State response.

参数

led_index – [in] The LED index

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_report_sensor_data(uint8_t sensor_index, uint8_t error_code, const uint8_t *data, uint8_t data_len)

Complete a Sensor Read after BLE_ESLP_EVENT_SENSOR_READ.

参数
  • sensor_index – [in] Sensor index

  • error_code – [in] 0 on success; otherwise BLE_ESL_ERR_*

  • data – [in] The pointer to store the sensor payload

  • data_len – [in] The length of sensor payload

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_get_image(uint8_t image_index, const uint8_t **data, uint32_t *len)

Get a stored ESL image buffer.

参数
  • image_index – [in] Image index

  • data – [out] The pointer to store the image buffer pointer

  • len – [out] The pointer to store the image length

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization

  • ESP_ERR_NOT_FOUND if the image slot is empty

  • ESP_ERR_NOT_SUPPORTED if OTP Object Server is disabled

Structures

struct esp_ble_eslp_display_image_t

Display Image Event Data.

Public Members

uint8_t display_index

Target display index

uint8_t image_index

Image index to show

struct esp_ble_eslp_refresh_display_t

Refresh Display Event Data.

Public Members

uint8_t display_index

Display to refresh

struct esp_ble_eslp_led_control_t

LED Control Event Data.

Public Members

uint8_t led_index

Target LED index

uint8_t color_red

2-bit red (0-3)

uint8_t color_green

2-bit green (0-3)

uint8_t color_blue

2-bit blue (0-3)

uint8_t brightness

2-bit brightness (0-3)

uint8_t flashing_pattern[7]

Pattern(5) + bit_off + bit_on

uint8_t repeat_type

0 = count, 1 = duration

uint16_t repeats_duration

Count or duration (seconds)

bool is_off

True if LED should turn off

struct esp_ble_eslp_sensor_read_t

Sensor Read Event Data.

Public Members

uint8_t sensor_index

Sensor to read

struct esp_ble_eslp_image_written_t

Image Written Event Data.

Public Members

uint8_t image_index

Image index that was written

uint32_t size

Final image size in bytes

esp_err_t status

ESP_OK on success

struct esp_ble_eslp_ecp_command_t

ECP Command Event Data.

Public Members

uint8_t opcode

ECP opcode

uint8_t params_len

Parameter length

uint8_t params[BLE_ESL_ECP_MAX_SIZE]

Parameter bytes

struct esp_ble_eslp_pawr_command_t

PAwR Command Event Data.

Public Members

uint16_t sync_handle

Periodic sync handle

uint16_t event_counter

Periodic event counter

uint8_t subevent

Subevent index

uint8_t data_len

ESL Payload length

uint8_t data[BLE_ESL_PAYLOAD_MAX_SIZE]

Decrypted ESL Payload

struct esp_ble_eslp_config_t

ESL Profile Tag Configuration.

Public Members

uint16_t basic_state

Initial Basic State bitmap

bool skip_auto_ecp_response

Disable automatic ECP responses

bool skip_past_receive

Skip enabling PAST receive after association

bool skip_auto_pawr_response

Disable automatic Ping response on PAwR

Type Definitions

typedef esp_err_t (*esp_ble_eslp_ecp_handler_t)(const esp_ble_eslp_ecp_command_t *cmd, void *priv)

ECP command callback.

Param cmd

[in] The pointer to store the ECP command

Param priv

[in] User context

Return

  • ESP_OK on successful

  • ESP_ERR_NOT_FINISHED to apply default handling

  • Other error codes on failure

typedef bool (*esp_ble_eslp_service_needed_hold_cb_t)(void *priv)

Service Needed hold callback.

Called on Service Reset. Return true to keep Service Needed set.

Param priv

[in] User context

Return

true to keep Service Needed; false to clear it

Enumerations

enum esp_ble_eslp_event_t

ESL Profile Tag Events.

Values:

enumerator BLE_ESLP_EVENT_STATE_CHANGED

Tag state changed

enumerator BLE_ESLP_EVENT_ADDRESS_WRITTEN

ESL Address written

enumerator BLE_ESLP_EVENT_AP_SYNC_KEY_WRITTEN

AP Sync Key Material written

enumerator BLE_ESLP_EVENT_RESP_KEY_WRITTEN

Response Key Material written

enumerator BLE_ESLP_EVENT_ABS_TIME_WRITTEN

Current Absolute Time written

enumerator BLE_ESLP_EVENT_ECP_COMMAND

ECP command received

enumerator BLE_ESLP_EVENT_ASSOCIATED

Association completed

enumerator BLE_ESLP_EVENT_UNASSOCIATED

Association cleared

enumerator BLE_ESLP_EVENT_SYNCHRONIZED

PAST sync established

enumerator BLE_ESLP_EVENT_SYNC_LOST

Periodic sync lost

enumerator BLE_ESLP_EVENT_PAWR_COMMAND

Command received on a PAwR report

enumerator BLE_ESLP_EVENT_IMAGE_WRITTEN

Image object write completed via OTP

enumerator BLE_ESLP_EVENT_DISPLAY_IMAGE

Display a stored image (HW action)

enumerator BLE_ESLP_EVENT_REFRESH_DISPLAY

Refresh the current display (HW action)

enumerator BLE_ESLP_EVENT_LED_CONTROL

LED control request (HW action)

enumerator BLE_ESLP_EVENT_SENSOR_READ

Sensor read request (call report_sensor_data)

Header File

Functions

esp_err_t esp_ble_eslp_ap_init(void)

Initialization Electronic Shelf Label AP Profile.

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_ap_deinit(void)

Deinitialization Electronic Shelf Label AP Profile.

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_ap_tag_config_default(esp_ble_eslp_ap_tag_config_t *cfg)

Fill default Tag association configuration.

参数

cfg – [out] The pointer to store the configuration

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

esp_err_t esp_ble_eslp_ap_configure_tag(uint16_t conn_handle, const esp_ble_eslp_ap_tag_config_t *cfg)

Write Address / Keys / Absolute Time to a connected Tag.

The link must already be encrypted; otherwise ESP_ERR_INVALID_STATE is returned.

参数
  • conn_handle – [in] Connection handle

  • cfg – [in] The pointer to store the Tag configuration

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization or unencrypted link

esp_err_t esp_ble_eslp_ap_write_ecp(uint16_t conn_handle, const uint8_t *data, uint16_t len)

Write an ECP command to a connected Tag.

参数
  • conn_handle – [in] Connection handle

  • data – [in] The pointer to store the ECP TLV

  • len – [in] The length of ECP TLV

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_ap_read_info(uint16_t conn_handle, esp_ble_eslp_ap_tag_info_t *out_info)

Read ESL information characteristics from a connected Tag.

参数
  • conn_handle – [in] Connection handle

  • out_info – [out] The pointer to store the Tag information

返回

  • ESP_OK on successful

  • ESP_ERR_NOT_FOUND if none of the optional info chars were present

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_ap_ping(uint8_t esl_id, uint8_t group_id)

Send Ping (opcode 0x00)

参数
  • esl_id – [in] ESL ID

  • group_id – [in] ESL Group ID

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_ap_unassociate(uint8_t esl_id, uint8_t group_id)

Send Unassociate (opcode 0x01), ECP only.

参数
  • esl_id – [in] ESL ID

  • group_id – [in] ESL Group ID

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_ap_service_reset(uint8_t esl_id, uint8_t group_id)

Send Service Reset (opcode 0x02)

参数
  • esl_id – [in] ESL ID

  • group_id – [in] ESL Group ID

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_ap_factory_reset(uint8_t esl_id, uint8_t group_id)

Send Factory Reset (opcode 0x03), ECP only.

参数
  • esl_id – [in] ESL ID

  • group_id – [in] ESL Group ID

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_ap_update_complete(uint8_t esl_id, uint8_t group_id)

Send Update Complete (opcode 0x04), ECP only.

参数
  • esl_id – [in] ESL ID

  • group_id – [in] ESL Group ID

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_ap_read_sensor(uint8_t esl_id, uint8_t group_id, uint8_t sensor_index)

Send Read Sensor Data (opcode 0x10)

参数
  • esl_id – [in] ESL ID

  • group_id – [in] ESL Group ID

  • sensor_index – [in] Sensor index

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_ap_refresh_display(uint8_t esl_id, uint8_t group_id, uint8_t display_index)

Send Refresh Display (opcode 0x11)

参数
  • esl_id – [in] ESL ID

  • group_id – [in] ESL Group ID

  • display_index – [in] Display index

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_ap_display_image(uint8_t esl_id, uint8_t group_id, uint8_t display_index, uint8_t image_index)

Send Display Image (opcode 0x20)

参数
  • esl_id – [in] ESL ID

  • group_id – [in] ESL Group ID

  • display_index – [in] Display index

  • image_index – [in] Image index

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_ap_display_timed_image(uint8_t esl_id, uint8_t group_id, uint8_t display_index, uint8_t image_index, uint32_t absolute_time)

Send Display Timed Image (opcode 0x60)

参数
  • esl_id – [in] ESL ID

  • group_id – [in] ESL Group ID

  • display_index – [in] Display index

  • image_index – [in] Image index

  • absolute_time – [in] Absolute time in ms; 0 cancels a pending timed display

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_ap_led_control(uint8_t esl_id, uint8_t group_id, uint8_t led_index, const esp_ble_eslp_ap_led_settings_t *settings)

Send LED Control (opcode 0xB0)

参数
  • esl_id – [in] ESL ID

  • group_id – [in] ESL Group ID

  • led_index – [in] LED index

  • settings – [in] The pointer to store the LED settings

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_ap_led_timed_control(uint8_t esl_id, uint8_t group_id, uint8_t led_index, const esp_ble_eslp_ap_led_settings_t *settings, uint32_t absolute_time)

Send LED Timed Control (opcode 0xF0)

参数
  • esl_id – [in] ESL ID

  • group_id – [in] ESL Group ID

  • led_index – [in] LED index

  • settings – [in] The pointer to store the LED settings

  • absolute_time – [in] Absolute time in ms; 0 cancels a pending timed LED command

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_ap_pawr_start(const esp_ble_eslp_ap_pawr_config_t *pawr)

Start local PAwR advertising.

参数

pawr – [in] The pointer to store the PAwR parameters

返回

  • ESP_OK on successful

  • ESP_ERR_NOT_SUPPORTED on unsupported feature

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_ap_pawr_stop(void)

Stop local PAwR advertising.

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_ap_sync_transfer(uint16_t conn_handle, uint16_t service_data)

Transfer local periodic sync info to a Tag.

参数
  • conn_handle – [in] Connection handle

  • service_data – [in] PAST service data

返回

  • ESP_OK on successful

  • ESP_ERR_NOT_SUPPORTED on unsupported feature

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_ap_queue_pawr_command(uint8_t subevent, const uint8_t *tlv, uint8_t tlv_len, uint8_t rsp_slot_start, uint8_t rsp_slot_count)

Queue an ESL command TLV for a PAwR subevent.

For unicast, set rsp_slot_start to the response slot of the last addressed TLV and rsp_slot_count to 1. For broadcast-only payloads, set rsp_slot_count to 0.

参数
  • subevent – [in] Subevent index

  • tlv – [in] The pointer to store the command TLV

  • tlv_len – [in] The length of command TLV

  • rsp_slot_start – [in] First response slot to listen to

  • rsp_slot_count – [in] Number of response slots to listen to

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization

  • ESP_ERR_NOT_SUPPORTED on unsupported feature

esp_err_t esp_ble_eslp_ap_queue_ping(uint8_t group_id, uint8_t esl_id)

Queue a Ping command for a group.

参数
  • group_id – [in] ESL Group ID

  • esl_id – [in] ESL ID

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization

  • ESP_ERR_NOT_SUPPORTED on unsupported feature

esp_err_t esp_ble_eslp_ap_transfer_image(const esp_ble_eslp_ap_image_transfer_t *params)

Transfer an image to a connected Tag via OTP.

参数

params – [in] The pointer to store the transfer parameters

返回

  • ESP_OK on successful

  • ESP_ERR_INVALID_ARG on wrong parameter

  • ESP_ERR_INVALID_STATE on wrong initialization

esp_err_t esp_ble_eslp_ap_get_tag_state(const esp_ble_esl_address_t *addr, esp_ble_eslp_state_t *out_state)

Get the tracked lifecycle state of a remote Tag.

参数
  • addr – [in] ESL Address

  • out_state – [out] The pointer to store the state

返回

  • ESP_OK on successful

  • ESP_ERR_NOT_FOUND if the Tag is not tracked

esp_err_t esp_ble_eslp_ap_note_tag_sync_activity(uint16_t conn_handle)

Refresh Synchronized-state activity timer for a connected Tag.

参数

conn_handle – [in] Connection handle

返回

  • ESP_OK on successful

  • ESP_ERR_NOT_FOUND if no tracked Tag matches the connection

Structures

struct esp_ble_eslp_ap_tag_state_changed_t

Tracked Tag state-changed event.

Public Members

esp_ble_esl_address_t address

ESL Address

uint16_t conn_handle

Connection handle, or 0xFFFF if none

esp_ble_eslp_state_t prev_state

Previous state

esp_ble_eslp_state_t new_state

New state

struct esp_ble_eslp_ap_tag_timeout_t

Tracked Tag timeout event.

Public Members

esp_ble_esl_address_t address

ESL Address

uint16_t conn_handle

Connection handle, or 0xFFFF if none

esp_ble_eslp_timeout_kind_t kind

Timeout kind

struct esp_ble_eslp_ap_image_transfer_t

Image transfer parameters.

Public Members

uint16_t conn_handle

Connection handle

uint8_t image_index

Target Image_Index on the ESL

const uint8_t *data

Image payload

uint32_t data_len

Image payload length

struct esp_ble_eslp_ap_image_transferred_t

Image Transferred Event Data.

Public Members

uint16_t conn_handle

Connection handle

uint8_t image_index

Image index that was transferred

esp_err_t status

ESP_OK on success

struct esp_ble_eslp_ap_tag_config_t

Tag Association Configuration.

Public Members

esp_ble_esl_address_t address

ESL Address

esp_ble_esl_key_material_t ap_sync_key

AP Sync Key Material

esp_ble_esl_key_material_t resp_key

Response Key Material

esp_ble_esl_abs_time_t abs_time

Absolute time, 0 uses a local timestamp

bool subscribe_ecp

Subscribe to ECP indications

bool send_update_complete

If true, write Update Complete after config writes

struct esp_ble_eslp_ap_pawr_config_t

PAwR Advertising Parameters.

Public Members

uint16_t itvl_min

Min interval in 1.25 ms units

uint16_t itvl_max

Max interval in 1.25 ms units

uint8_t num_subevents

Number of subevents

uint8_t subevent_interval

Interval between subevents in 1.25 ms units

uint8_t response_slot_delay

Delay to first response slot in 1.25 ms units

uint8_t response_slot_spacing

Spacing between response slots in 0.125 ms units

uint8_t num_response_slots

Response slots per subevent

bool include_tx_power

Include TX power in the advertising PDU

struct esp_ble_eslp_ap_ecp_response_t

ECP Response Event Data.

Public Members

uint16_t conn_handle

Connection handle

uint8_t data_len

Response length

uint8_t data[BLE_ESL_ECP_MAX_SIZE]

Response bytes

struct esp_ble_eslp_ap_ecp_timeout_t

ECP Procedure Timeout Event Data.

Public Members

uint16_t conn_handle

Connection handle

uint8_t esl_id

Target ESL_ID

uint8_t group_id

Target Group_ID

struct esp_ble_eslp_ap_tag_info_t

ESL information read from a connected Tag.

Public Members

uint16_t conn_handle

Connection handle

esp_err_t status

Overall status (ESP_OK if at least one char read)

bool has_display_info

Display Information present

uint8_t num_displays

Number of display records

esp_ble_esl_display_info_t displays[BLE_ESLP_AP_MAX_DISPLAYS]

Display records

bool has_image_info

Image Information present

esp_ble_esl_image_info_t image_info

Image Information

bool has_sensor_info

Sensor Information present

uint16_t sensor_info_len

Sensor Information length

uint8_t sensor_info[BLE_ESLP_AP_SENSOR_INFO_MAX_LEN]

Raw Sensor Information

bool has_led_info

LED Information present

uint8_t num_leds

Number of LED info octets

uint8_t leds[BLE_ESLP_AP_MAX_LEDS]

LED Information octets

bool has_pnp_id

DIS PnP ID present

uint8_t pnp_id[7]

PnP ID (src, vid, pid, ver)

struct esp_ble_eslp_ap_led_settings_t

LED control settings for LED Control / LED Timed Control.

Public Members

uint8_t color_red

2-bit red (0-3)

uint8_t color_green

2-bit green (0-3)

uint8_t color_blue

2-bit blue (0-3)

uint8_t brightness

2-bit brightness (0-3)

uint8_t flashing_pattern[7]

56-bit flashing pattern

uint8_t repeat_type

0 = count, 1 = duration

uint16_t repeats_duration

15-bit count or duration (s)

struct esp_ble_eslp_ap_subev_resp_t

PAwR Subevent Response Event Data.

Public Members

uint8_t subevent

Subevent index

uint8_t response_slot

Response slot

uint8_t data_status

Data status

bool address_valid

True if address was resolved

esp_ble_esl_address_t address

Tag address (when address_valid)

uint8_t data_len

Decrypted TLV length

uint8_t data[BLE_ESL_PAYLOAD_MAX_SIZE]

Plaintext response TLV(s)

struct esp_ble_eslp_ap_tag_configured_t

Tag Configured Event Data.

Public Members

uint16_t conn_handle

Connection handle

esp_ble_esl_address_t address

Configured ESL address

Macros

BLE_ESLP_AP_MAX_DISPLAYS

Max Display Information records stored from a remote Tag

BLE_ESLP_AP_MAX_LEDS

Max LED Information octets stored from a remote Tag

BLE_ESLP_AP_SENSOR_INFO_MAX_LEN

Max Sensor Information characteristic length

Enumerations

enum esp_ble_eslp_ap_event_t

ESL Profile AP Events.

Values:

enumerator BLE_ESLP_AP_EVENT_TAG_CONFIGURED

Tag GATT association complete

enumerator BLE_ESLP_AP_EVENT_ECP_RESPONSE

ECP indication/notification received

enumerator BLE_ESLP_AP_EVENT_ECP_TIMEOUT

ECP procedure timeout (30 s)

enumerator BLE_ESLP_AP_EVENT_TAG_INFO

ESL info characteristics read complete

enumerator BLE_ESLP_AP_EVENT_PAWR_STARTED

PAwR advertising started

enumerator BLE_ESLP_AP_EVENT_PAWR_STOPPED

PAwR advertising stopped

enumerator BLE_ESLP_AP_EVENT_SYNC_TRANSFERRED

PAST set_info accepted

enumerator BLE_ESLP_AP_EVENT_SUBEV_RESP

PAwR response received

enumerator BLE_ESLP_AP_EVENT_IMAGE_TRANSFERRED

OTP image transfer finished

enumerator BLE_ESLP_AP_EVENT_TAG_STATE_CHANGED

Tracked Tag lifecycle state changed

enumerator BLE_ESLP_AP_EVENT_TAG_TIMEOUT

Tracked Tag sync/unsync timeout