Chapter 2. API Reference
ESP_PING_PROF_TIMEGAP
Elapsed time between request and reply packet
ESP_PING_PROF_DURATION
Elapsed time of the whole ping session
2.3.9 ESP Local Control
Overview
ESP Local Control (esp_local_ctrl) component in ESP-IDF provides capability to control an ESP device over Wi-Fi
+ HTTPS or BLE. It provides access to application defined properties that are available for reading / writing via a
set of configurable handlers.
Initialization of the esp_local_ctrl service over BLE transport is performed as follows:
esp_local_ctrl_config_t config
.transport
.transport_config
.ble
= &
.device_name
.service_uuid
}
}
},
.proto_sec
.version
.custom_handle
.pop
=
},
.handlers
=
/* User defined handler functions */
.get_prop_values
.set_prop_values
.usr_ctx
.usr_ctx_free_fn
},
/* Maximum number of properties that may be set */
.max_properties
};
/* Start esp_local_ctrl service */
ESP_ERROR_CHECK(esp_local_ctrl_start(&config));
Similarly for HTTPS transport:
/* Set the configuration */
httpd_ssl_config_t https_conf
/* Load server certificate */
extern const
unsigned char
start");
→
extern const
unsigned char
");
→
https_conf.cacert_pem
https_conf.cacert_len
Espressif Systems
=
{
=
ESP_LOCAL_CTRL_TRANSPORT_BLE,
=
{
(protocomm_ble_config_t) {
=
SERVICE_NAME,
=
{
/* LSB <---------------------------------------
* ---------------------------------------> MSB */
0x21, 0xd5, 0x3b, 0x8d, 0xbd, 0x75, 0x68, 0x8a,
0xb4, 0x42, 0xeb, 0x31, 0x4a, 0x1e, 0x98,
=
{
=
PROTOCOM_SEC0,
=
NULL,
NULL,
{
=
get_property_values,
=
set_property_values,
=
NULL,
=
NULL
=
10
=
HTTPD_SSL_CONFIG_DEFAULT();
cacert_pem_start[]
cacert_pem_end[]
=
cacert_pem_start;
=
cacert_pem_end
Submit Document Feedback
asm("_binary_cacert_pem_
asm("_binary_cacert_pem_end
-
cacert_pem_start;
600
0x3d
(continues on next page)
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?
Questions and answers