data
stringlengths 512
2.99k
|
---|
CONFIG_IEEE802154_RECORD_EVENT
set the record event table size
- Range:
-
-
from 1 to 50 if CONFIG_IEEE802154_RECORD_EVENT
- Default value:
-
CONFIG_IEEE802154_RECORD_STATE
Enable record state information for debugging
Found in: Component config > IEEE 802.15.4 > CONFIG_IEEE802154_ENABLED > CONFIG_IEEE802154_DEBUG
Enabling this option to record state, when assert, the recorded state will be printed.
- Default value:
-
-
No (disabled) if CONFIG_IEEE802154_DEBUG
CONFIG_IEEE802154_RECORD_STATE_SIZE
Record state table size
Found in: Component config > IEEE 802.15.4 > CONFIG_IEEE802154_ENABLED > |
CONFIG_IEEE802154_RECORD_STATE
set the record state table size
- Range:
-
-
from 1 to 50 if CONFIG_IEEE802154_RECORD_STATE
- Default value:
-
CONFIG_IEEE802154_RECORD_CMD
Enable record command information for debugging
Found in: Component config > IEEE 802.15.4 > CONFIG_IEEE802154_ENABLED > CONFIG_IEEE802154_DEBUG
Enabling this option to record the command, when assert, the recorded command will be printed.
- Default value:
-
-
No (disabled) if CONFIG_IEEE802154_DEBUG
CONFIG_IEEE802154_RECORD_CMD_SIZE
Record command table size
Found in: Component config > IEEE 802.15.4 > CONFIG_IEEE802154_ENABLED > CONFIG_IEEE802154_DEBUG > CONFIG_IEEE802154_RECORD_CMD
set the record command table size
- Range:
-
-
from 1 to 50 if CONFIG_IEEE802154_RECORD_CMD
- Default value:
-
CONFIG_IEEE802154_RECORD_ABORT
Enable record abort information for debugging
Found in: Component config > IEEE 802.15.4 > CONFIG_IEEE802154_ENABLED > CONFIG_IEEE802154_DEBUG
Enabling this option to record the abort, when assert, the recorded abort will be printed.
- Default value:
-
-
No (disabled) if CONFIG_IEEE802154_DEBUG
CONFIG_IEEE802154_RECORD_ABORT_SIZE
Record abort table size
Found in: Component config > IEEE 802.15.4 > CONFIG_IEEE802154_ENABLED > CONFIG_IEEE802154_DEBUG > CONFIG_IEEE802154_RECORD_ABORT
set the record abort table size
- Range:
-
-
from 1 to 50 if CONFIG_IEEE802154_RECORD_ABORT
- Default value:
-
CONFIG_IEEE802154_TXRX_STATISTIC
Enable record tx/rx packets information for debugging
Found in: Component config > IEEE 802.15.4 > CONFIG_IEEE802154_ENABLED > CONFIG_IEEE802154_DEBUG
Enabling this option to record the tx and rx
- Default value:
-
-
No (disabled) if CONFIG_IEEE802154_DEBUG
Log output
Contains:
CONFIG_LOG_DEFAULT_LEVEL
Default log verbosity
Found in: Component config > Log output
Specify how much output to see in logs by default. You can set lower verbosity level at runtime using esp_log_level_set function.
By default, this setting limits which log statements are compiled into the program. For example, selecting "Warning" would mean that changing log level to "Debug" at runtime will not be possible. To allow increasing log level above the default at runtime, see the next option.
|
This level may be higher than the default verbosity level which is set when the app starts up.
This can be used enable debugging output only at a critical point, for a particular tag, or to minimize startup time but then enable more logs once the firmware has loaded.
Note that increasing the maximum available log level will increase the firmware binary size.
This option only applies to logging from the app, the bootloader log level is fixed at compile time to the separate "Bootloader log verbosity" setting.
|
CONFIG_LOG_MASTER_LEVEL
Enable global master log level
Found in: Component config > Log output
Enables an additional global "master" log level check that occurs before a log tag cache lookup. This is useful if you want to compile in a lot of logs that are selectable at runtime, but avoid the performance hit during periods where you don't want log output. Examples include remote log forwarding, or disabling logs during a time-critical or CPU-intensive section and re-enabling them later. Results in larger program size depending on number of logs compiled in.
If enabled, defaults to LOG_DEFAULT_LEVEL and can be set using esp_log_set_level_master(). This check takes precedence over ESP_LOG_LEVEL_LOCAL.
- Default value:
-
-
No (disabled)
CONFIG_LOG_COLORS
Use ANSI terminal colors in log output
Found in: Component config > Log output
Enable ANSI terminal color codes in bootloader output.
In order to view these, your terminal program must support ANSI color codes.
- Default value:
-
-
Yes (enabled)
CONFIG_LOG_TIMESTAMP_SOURCE
Log Timestamps
Found in: Component config > Log output
Choose what sort of timestamp is displayed in the log output:
-
Milliseconds since boot is calulated from the RTOS tick count multiplied by the tick period. This time will reset after a software reboot. e.g. (90000)
-
System time is taken from POSIX time functions which use the chip's RTC and high resoultion timers to maintain an accurate time. The system time is initialized to 0 on startup, it can be set with an SNTP sync, or with POSIX time functions. This time will not reset after a software reboot. |
LWIP
Builds normally if selected. Excludes LwIP from build if unselected, even if it is a dependency of a component or application. Some applications can switch their IP stacks, e.g., when switching between chip and Linux targets (LwIP stack vs. Linux IP stack). Since the LwIP dependency cannot easily be excluded based on a Kconfig option, it has to be a dependency in all cases. This switch allows the LwIP stack to be built selectively, even if it is a dependency.
- Default value:
-
-
Yes (enabled)
CONFIG_LWIP_LOCAL_HOSTNAME
Local netif hostname
Found in: Component config > LWIP
|
The default name this device will report to other devices on the network. Could be updated at runtime with esp_netif_set_hostname()
- Default value:
-
-
"espressif"
CONFIG_LWIP_NETIF_API
Enable usage of standard POSIX APIs in LWIP
Found in: Component config > LWIP
If this feature is enabled, standard POSIX APIs: if_indextoname(), if_nametoindex() could be used to convert network interface index to name instead of IDF specific esp-netif APIs (such as esp_netif_get_netif_impl_name())
- Default value:
-
-
No (disabled)
CONFIG_LWIP_TCPIP_TASK_PRIO
LWIP TCP/IP Task Priority
Found in: Component config > LWIP
LWIP tcpip task priority. In case of high throughput, this parameter could be changed up to (configMAX_PRIORITIES-1).
- Range:
-
-
from 1 to 24
- Default value:
-
-
18
CONFIG_LWIP_TCPIP_CORE_LOCKING
Enable tcpip core locking
Found in: Component config > LWIP
If Enable tcpip core locking,Creates a global mutex that is held during TCPIP thread operations. Can be locked by client code to perform lwIP operations without changing into TCPIP thread using callbacks. |
If disable tcpip core locking,TCP IP will perform tasks through context switching
- Default value:
-
-
No (disabled)
CONFIG_LWIP_TCPIP_CORE_LOCKING_INPUT
Enable tcpip core locking input
Found in: Component config > LWIP > CONFIG_LWIP_TCPIP_CORE_LOCKING
when LWIP_TCPIP_CORE_LOCKING is enabled, this lets tcpip_input() grab the mutex for input packets as well, instead of allocating a message and passing it to tcpip_thread.
- Default value:
-
-
No (disabled) if CONFIG_LWIP_TCPIP_CORE_LOCKING
CONFIG_LWIP_CHECK_THREAD_SAFETY
Checks that lwip API runs in expected context
Found in: Component config > LWIP
Enable to check that the project does not violate lwip thread safety. If enabled, all lwip functions that require thread awareness run an assertion to verify that the TCP/IP core functionality is either locked or accessed from the correct thread.
- Default value:
-
-
No (disabled)
CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES
Enable mDNS queries in resolving host name
Found in: Component config > LWIP
If this feature is enabled, standard API such as gethostbyname support .local addresses by sending one shot multicast mDNS query
- Default value:
-
-
Yes (enabled)
CONFIG_LWIP_L2_TO_L3_COPY
Enable copy between Layer2 and Layer3 packets
Found in: Component config > LWIP
If this feature is enabled, all traffic from layer2(WIFI Driver) will be copied to a new buffer before sending it to layer3(LWIP stack), freeing the layer2 buffer. Please be notified that the total layer2 receiving buffer is fixed and ESP32 currently supports 25 layer2 receiving buffer, when layer2 buffer runs out of memory, then the incoming packets will be dropped in hardware. The layer3 buffer is allocated from the heap, so the total layer3 receiving buffer depends on the available heap size, when heap runs out of memory, no copy will be sent to layer3 and packet will be dropped in layer2. Please make sure you fully understand the impact of this feature before enabling it.
- Default value:
-
-
No (disabled)
CONFIG_LWIP_IRAM_OPTIMIZATION
Enable LWIP IRAM optimization
Found in: Component config > LWIP
If this feature is enabled, some functions relating to RX/TX in LWIP will be put into IRAM, it can improve UDP/TCP throughput by >10% for single core mode, it doesn't help too much for dual core mode. On the other hand, it needs about 10KB IRAM for these optimizations.
If this feature is disabled, all lwip functions will be put into FLASH.
- Default value:
-
-
No (disabled)
CONFIG_LWIP_EXTRA_IRAM_OPTIMIZATION
Enable LWIP IRAM optimization for TCP part
Found in: Component config > LWIP
If this feature is enabled, some tcp part functions relating to RX/TX in LWIP will be put into IRAM, it can improve TCP throughput. On the other hand, it needs about 17KB IRAM for these optimizations.
- Default value:
-
-
No (disabled)
CONFIG_LWIP_TIMERS_ONDEMAND
Enable LWIP Timers on demand
Found in: Component config > LWIP
|
If this feature is enabled, IGMP and MLD6 timers will be activated only when joining groups or receiving QUERY packets.
This feature will reduce the power consumption for applications which do not use IGMP and MLD6.
- Default value:
-
-
Yes (enabled)
CONFIG_LWIP_ND6
LWIP NDP6 Enable/Disable
Found in: Component config > LWIP
This option is used to disable the Network Discovery Protocol (NDP) if it is not required. Please use this option with caution, as the NDP is essential for IPv6 functionality within a local network.
- Default value:
-
-
|
Component config > LWIP
This option is deprecated. Do not use this option, use VFS_SUPPORT_SELECT instead.
- Default value:
-
-
No (disabled)
CONFIG_LWIP_SO_LINGER
Enable SO_LINGER processing
Found in: Component config > LWIP
Enabling this option allows SO_LINGER processing. l_onoff = 1,l_linger can set the timeout.
If l_linger=0, When a connection is closed, TCP will terminate the connection. This means that TCP will discard any data packets stored in the socket send buffer and send an RST to the peer.
If l_linger!=0,Then closesocket() calls to block the process until the remaining data packets has been sent or timed out.
- Default value:
-
-
No (disabled)
CONFIG_LWIP_SO_REUSE
Enable SO_REUSEADDR option
Found in: Component config > LWIP
Enabling this option allows binding to a port which remains in TIME_WAIT.
- Default value:
-
-
Yes (enabled)
CONFIG_LWIP_SO_REUSE_RXTOALL
SO_REUSEADDR copies broadcast/multicast to all matches
Found in: Component config > LWIP > CONFIG_LWIP_SO_REUSE
Enabling this option means that any incoming broadcast or multicast packet will be copied to all of the local sockets that it matches (may be more than one if SO_REUSEADDR is set on the socket.)
This increases memory overhead as the packets need to be copied, however they are only copied per matching socket. You can safely disable it if you don't plan to receive broadcast or multicast traffic on more than one socket at a time.
- Default value:
-
-
|
Yes (enabled)
CONFIG_LWIP_SO_RCVBUF
Enable SO_RCVBUF option
Found in: Component config > LWIP
Enabling this option allows checking for available data on a netconn.
- Default value:
-
-
No (disabled)
CONFIG_LWIP_NETBUF_RECVINFO
Enable IP_PKTINFO option
Found in: Component config > LWIP
Enabling this option allows checking for the destination address of a received IPv4 Packet.
- Default value:
-
-
No (disabled)
CONFIG_LWIP_IP_DEFAULT_TTL
The value for Time-To-Live used by transport layers
Found in: Component config > LWIP
Set value for Time-To-Live used by transport layers.
- Range:
-
-
from 1 to 255
- Default value:
-
-
64
CONFIG_LWIP_IP4_FRAG
Enable fragment outgoing IP4 packets
Found in: Component config > LWIP
Enabling this option allows fragmenting outgoing IP4 packets if their size exceeds MTU.
- Default value:
-
-
Yes (enabled)
CONFIG_LWIP_IP6_FRAG
Enable fragment outgoing IP6 packets
Found in: Component config > LWIP
Enabling this option allows fragmenting outgoing IP6 packets if their size exceeds MTU.
- Default value:
-
-
Yes (enabled)
CONFIG_LWIP_IP4_REASSEMBLY
Enable reassembly incoming fragmented IP4 packets
Found in: Component config > LWIP
Enabling this option allows reassemblying incoming fragmented IP4 packets.
- Default value:
-
-
No (disabled)
CONFIG_LWIP_IP6_REASSEMBLY
Enable reassembly incoming fragmented IP6 packets
Found in: Component config > LWIP
Enabling this option allows reassemblying incoming fragmented IP6 packets.
- Default value:
-
-
No (disabled)
CONFIG_LWIP_IP_REASS_MAX_PBUFS
The maximum amount of pbufs waiting to be reassembled
Found in: Component config > LWIP
Set the maximum amount of pbufs waiting to be reassembled.
- Range:
-
-
from 10 to 100
- Default value:
-
-
10
CONFIG_LWIP_IP_FORWARD
Enable IP forwarding
Found in: Component config > LWIP
Enabling this option allows packets forwarding across multiple interfaces.
- Default value:
-
-
No (disabled)
CONFIG_LWIP_IPV4_NAPT
Enable NAT (new/experimental)
Found in: Component config > LWIP > CONFIG_LWIP_IP_FORWARD
Enabling this option allows Network Address and Port Translation.
- Default value:
-
-
No (disabled) if CONFIG_LWIP_IP_FORWARD
CONFIG_LWIP_IPV4_NAPT_PORTMAP
Enable NAT Port Mapping (new/experimental)
Found in: Component config > LWIP > CONFIG_LWIP_IP_FORWARD > CONFIG_LWIP_IPV4_NAPT
Enabling this option allows Port Forwarding or Port mapping.
- Default value:
-
-
Yes (enabled) if CONFIG_LWIP_IPV4_NAPT
CONFIG_LWIP_STATS
Enable LWIP statistics
Found in: Component config > LWIP
Enabling this option allows LWIP statistics
- Default value:
-
-
No (disabled)
CONFIG_LWIP_ESP_GRATUITOUS_ARP
Send gratuitous ARP periodically
Found in: Component config > |
CONFIG_LWIP_ESP_MLDV6_REPORT
Set the timer interval for mldv6 report. The default value is 30s
- Default value:
-
-
40
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE
TCPIP task receive mail box size
Found in: Component config > LWIP
Set TCPIP task receive mail box size. Generally bigger value means higher throughput but more memory. The value should be bigger than UDP/TCP mail box size.
- Range:
-
-
from 6 to 1024 if CONFIG_LWIP_WND_SCALE
- Default value:
-
-
32
CONFIG_LWIP_DHCP_DOES_ARP_CHECK
DHCP: Perform ARP check on any offered address
Found in: Component config > LWIP
Enabling this option performs a check (via ARP request) if the offered IP address is not already in use by another host on the network.
- Default value:
-
-
|
Yes (enabled)
CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID
DHCP: Disable Use of HW address as client identification
Found in: Component config > LWIP
This option could be used to disable DHCP client identification with its MAC address. (Client id is used by DHCP servers to uniquely identify clients and are included in the DHCP packets as an option 61) Set this option to "y" in order to exclude option 61 from DHCP packets.
- Default value:
-
-
No (disabled)
CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID
DHCP: Disable Use of vendor class identification
Found in: Component config > LWIP
This option could be used to disable DHCP client vendor class identification. Set this option to "y" in order to exclude option 60 from DHCP packets.
- Default value:
-
-
|
Yes (enabled)
CONFIG_LWIP_DHCP_RESTORE_LAST_IP
DHCP: Restore last IP obtained from DHCP server
Found in: Component config > LWIP
When this option is enabled, DHCP client tries to re-obtain last valid IP address obtained from DHCP server. Last valid DHCP configuration is stored in nvs and restored after reset/power-up. If IP is still available, there is no need for sending discovery message to DHCP server and save some time.
- Default value:
-
-
No (disabled)
CONFIG_LWIP_DHCP_OPTIONS_LEN
DHCP total option length
Found in: Component config > LWIP
Set total length of outgoing DHCP option msg. Generally bigger value means it can carry more options and values. If your code meets LWIP_ASSERT due to option value is too long. Please increase the LWIP_DHCP_OPTIONS_LEN value.
- Range:
-
-
from 68 to 255
- Default value:
-
-
68
CONFIG_LWIP_NUM_NETIF_CLIENT_DATA
Number of clients store data in netif
Found in: Component config > LWIP
Number of clients that may store data in client_data member array of struct netif.
- Range:
-
-
from 0 to 256
- Default value:
-
-
0
CONFIG_LWIP_DHCP_COARSE_TIMER_SECS
DHCP coarse timer interval(s)
Found in: Component config > LWIP
Set DHCP coarse interval in seconds. A higher value will be less precise but cost less power consumption.
- Range:
-
-
from 1 to 10
- Default value:
-
-
1
DHCP server
Contains:
CONFIG_LWIP_DHCPS
DHCPS: Enable IPv4 Dynamic Host Configuration Protocol Server (DHCPS)
Found in: Component config > LWIP > DHCP server
Enabling this option allows the device to run the DHCP server (to dynamically assign IPv4 addresses to clients).
- Default value:
-
-
Yes (enabled)
CONFIG_LWIP_DHCPS_LEASE_UNIT
Multiplier for lease time, in seconds
Found in: Component config > LWIP > DHCP server > CONFIG_LWIP_DHCPS
The DHCP server is calculating lease time multiplying the sent and received times by this number of seconds per unit. The default is 60, that equals one minute.
- Range:
-
-
from 1 to 3600
- Default value:
-
-
60
CONFIG_LWIP_DHCPS_MAX_STATION_NUM
Maximum number of stations
Found in: Component config > LWIP > DHCP server > CONFIG_LWIP_DHCPS
The maximum number of DHCP clients that are connected to the server. After this number is exceeded, DHCP server removes of the oldest device from it's address pool, without notification.
- Range:
-
-
from 1 to 64
- Default value:
-
-
8
CONFIG_LWIP_DHCPS_STATIC_ENTRIES
Enable ARP static entries
Found in: Component config > LWIP > DHCP server > CONFIG_LWIP_DHCPS
Enabling this option allows DHCP server to support temporary static ARP entries for DHCP Client. This will help the DHCP server to send the DHCP OFFER and DHCP ACK using IP unicast.
- Default value:
-
-
Yes (enabled)
CONFIG_LWIP_AUTOIP
Enable IPV4 Link-Local Addressing (AUTOIP)
Found in: Component config > LWIP
Enabling this option allows the device to self-assign an address in the 169.256/16 range if none is assigned statically or via DHCP.
|
.
- Default value:
-
-
No (disabled)
Contains:
CONFIG_LWIP_AUTOIP_TRIES
DHCP Probes before self-assigning IPv4 LL address
Found in: Component config > LWIP > CONFIG_LWIP_AUTOIP
DHCP client will send this many probes before self-assigning a link local address.
From LWIP help: "This can be set as low as 1 to get an AutoIP address very quickly, but you should be prepared to handle a changing IP address when DHCP overrides AutoIP." (In the case of ESP-IDF, this means multiple SYSTEM_EVENT_STA_GOT_IP events.)
- Range:
-
-
from 1 to 100 if CONFIG_LWIP_AUTOIP
- Default value:
-
-
2 if CONFIG_LWIP_AUTOIP
CONFIG_LWIP_AUTOIP_MAX_CONFLICTS
Max IP conflicts before rate limiting
Found in: Component config > LWIP > CONFIG_LWIP_AUTOIP
If the AUTOIP functionality detects this many IP conflicts while self-assigning an address, it will go into a rate limited mode.
- Range:
-
-
from 1 to 100 if CONFIG_LWIP_AUTOIP
- Default value:
-
-
9 if CONFIG_LWIP_AUTOIP
CONFIG_LWIP_AUTOIP_RATE_LIMIT_INTERVAL
Rate limited interval (seconds)
Found in: Component config > LWIP > CONFIG_LWIP_AUTOIP
If rate limiting self-assignment requests, wait this long between each request.
- Range:
-
-
from 5 to 120 if CONFIG_LWIP_AUTOIP
- Default value:
-
-
20 if CONFIG_LWIP_AUTOIP
CONFIG_LWIP_IPV4
Enable IPv4
Found in: Component config > LWIP
Enable IPv4 stack. If you want to use IPv6 only TCP/IP stack, disable this.
- Default value:
-
-
Yes (enabled)
CONFIG_LWIP_IPV6
Enable IPv6
Found in: Component config > LWIP
Enable IPv6 function. If not use IPv6 function, set this option to n. If disabling LWIP_IPV6 then some other components (coap and asio) will no longer be available.
- Default value:
-
-
|
Found in: Component config > LWIP > CONFIG_LWIP_IPV6
Enabling this option allows the devices to IPV6 stateless address autoconfiguration (SLAAC).
See RFC 4862.
- Default value:
-
-
No (disabled)
CONFIG_LWIP_IPV6_NUM_ADDRESSES
Number of IPv6 addresses on each network interface
Found in: Component config > LWIP > CONFIG_LWIP_IPV6
The maximum number of IPv6 addresses on each interface. Any additional addresses will be discarded.
- Default value:
-
-
3
CONFIG_LWIP_IPV6_FORWARD
Enable IPv6 forwarding between interfaces
Found in: Component config > LWIP > CONFIG_LWIP_IPV6
Forwarding IPv6 packets between interfaces is only required when acting as a router.
- Default value:
-
-
No (disabled)
CONFIG_LWIP_IPV6_RDNSS_MAX_DNS_SERVERS
Use IPv6 Router Advertisement Recursive DNS Server Option
Found in: Component config > LWIP
Use IPv6 Router Advertisement Recursive DNS Server Option (as per RFC 6106) to copy a defined maximum number of DNS servers to the DNS module. Set this option to a number of desired DNS servers advertised in the RA protocol. This feature is disabled when set to 0.
- Default value:
-
CONFIG_LWIP_IPV6_DHCP6
Enable DHCPv6 stateless address autoconfiguration
Found in: Component config > LWIP
Enable DHCPv6 for IPv6 stateless address autoconfiguration. Note that the dhcpv6 client has to be started using dhcp6_enable_stateless(netif); Note that the stateful address autoconfiguration is not supported.
- Default value:
-
-
No (disabled) if CONFIG_LWIP_IPV6_AUTOCONFIG
CONFIG_LWIP_NETIF_STATUS_CALLBACK
Enable status callback for network interfaces
Found in: Component config > LWIP
Enable callbacks when the network interface is up/down and addresses are changed.
- Default value:
-
-
No (disabled)
CONFIG_LWIP_NETIF_LOOPBACK
Support per-interface loopback
Found in: Component config > LWIP
Enabling this option means that if a packet is sent with a destination address equal to the interface's own IP address, it will "loop back" and be received by this interface. Disabling this option disables support of loopback interface in lwIP
- Default value:
-
-
Yes (enabled)
Contains:
CONFIG_LWIP_LOOPBACK_MAX_PBUFS
Max queued loopback packets per interface
Found in: Component config > LWIP > |
In the Wi-Fi scenario, recommended OOSEQ PBUFS Range: 0 <= TCP_OOSEQ_MAX_PBUFS <= CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM/(MAX_TCP_NUMBER + 1)
In the Ethernet scenario,recommended Ethernet OOSEQ PBUFS Range: 0 <= TCP_OOSEQ_MAX_PBUFS <= CONFIG_ETH_DMA_RX_BUFFER_NUM/(MAX_TCP_NUMBER + 1)
Within the recommended value range, the larger the value, the better the performance.
MAX_TCP_NUMBER represent Maximum number of TCP connections in Wi-Fi(STA+SoftAP) and Ethernet scenario.
- Range:
-
-
from 0 to 12
- Default value:
-
CONFIG_LWIP_TCP_SACK_OUT
Support sending selective acknowledgements
Found in: Component config > LWIP > TCP > CONFIG_LWIP_TCP_QUEUE_OOSEQ
TCP will support sending selective acknowledgements (SACKs).
- Default value:
-
-
No (disabled)
CONFIG_LWIP_TCP_OVERSIZE
Pre-allocate transmit PBUF size
Found in: Component config > LWIP > TCP
Allows enabling "oversize" allocation of TCP transmission pbufs ahead of time, which can reduce the length of pbuf chains used for transmission.
This will not make a difference to sockets where Nagle's algorithm is disabled.
Default value of MSS is fine for most applications, 25% MSS may save some RAM when only transmitting small amounts of data. Disabled will have worst performance and fragmentation characteristics, but uses least RAM overall.
|
CONFIG_LWIP_WND_SCALE
Support TCP window scale
Found in: Component config > LWIP > TCP
Enable this feature to support TCP window scaling.
- Default value:
-
-
No (disabled) if CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP
CONFIG_LWIP_TCP_RCV_SCALE
Set TCP receiving window scaling factor
Found in: Component config > LWIP > TCP > CONFIG_LWIP_WND_SCALE
Enable this feature to support TCP window scaling.
- Range:
-
-
from 0 to 14 if CONFIG_LWIP_WND_SCALE
- Default value:
-
CONFIG_LWIP_TCP_RTO_TIME
Default TCP rto time
Found in: Component config > LWIP > TCP
Set default TCP rto time for a reasonable initial rto. In bad network environment, recommend set value of rto time to 1500.
- Default value:
-
-
1500
UDP
Contains:
CONFIG_LWIP_MAX_UDP_PCBS
Maximum active UDP control blocks
Found in: Component config > LWIP > UDP
The maximum number of active UDP "connections" (ie UDP sockets sending/receiving data). The practical maximum limit is determined by available heap memory at runtime.
- Range:
-
-
from 1 to 1024
- Default value:
-
-
16
CONFIG_LWIP_UDP_RECVMBOX_SIZE
Default UDP receive mail box size
Found in: Component config > LWIP > UDP
Set UDP receive mail box size. The recommended value is 6.
|
UDP receive mail box is a per socket mail box, when the application receives packets from UDP socket, LWIP core firstly posts the packets to UDP receive mail box and the application then fetches the packets from mail box. It means LWIP can caches maximum UDP_RECCVMBOX_SIZE packets for each UDP socket, so the maximum possible cached UDP packets for all UDP sockets is UDP_RECCVMBOX_SIZE multiples the maximum UDP socket number. In other words, the bigger UDP_RECVMBOX_SIZE means more memory. On the other hand, if the receiv mail box is too small, the mail box may be full. If the mail box is full, the LWIP drops the packets. So generally we need to make sure the UDP receive mail box is big enough to avoid packet drop between LWIP core and application.
- Range:
-
-
from 6 to 64
- Default value:
-
-
6
Checksums
Contains:
CONFIG_LWIP_CHECKSUM_CHECK_IP
Enable LWIP IP checksums
Found in: Component config > LWIP > Checksums
Enable checksum checking for received IP messages
- Default value:
-
-
No (disabled)
CONFIG_LWIP_CHECKSUM_CHECK_UDP
Enable LWIP UDP checksums
Found in: Component config > LWIP > Checksums
Enable checksum checking for received UDP messages
- Default value:
-
-
No (disabled)
CONFIG_LWIP_CHECKSUM_CHECK_ICMP
Enable LWIP ICMP checksums
Found in: Component config > LWIP > Checksums
Enable checksum checking for received ICMP messages
- Default value:
-
-
Yes (enabled)
CONFIG_LWIP_TCPIP_TASK_STACK_SIZE
TCP/IP Task Stack Size
Found in: Component config > LWIP
Configure TCP/IP task stack size, used by LWIP to process multi-threaded TCP/IP operations. Setting this stack too small will result in stack overflow crashes.
- Range:
-
-
from 2048 to 65536
- Default value:
-
-
3072
CONFIG_LWIP_TCPIP_TASK_AFFINITY
TCP/IP task affinity
Found in: Component config > |
LWIP
Enable PPP stack. Now only PPP over serial is possible.
- Default value:
-
-
No (disabled)
Contains:
CONFIG_LWIP_PPP_ENABLE_IPV6
Enable IPV6 support for PPP connections (IPV6CP)
Found in: Component config > LWIP > CONFIG_LWIP_PPP_SUPPORT
Enable IPV6 support in PPP for the local link between the DTE (processor) and DCE (modem). There are some modems which do not support the IPV6 addressing in the local link. If they are requested for IPV6CP negotiation, they may time out. This would in turn fail the configuration for the whole link. If your modem is not responding correctly to PPP Phase Network, try to disable IPV6 support.
- Default value:
-
-
|
CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE
Max number of IPv6 packets to queue during MAC resolution
Found in: Component config > LWIP
Config max number of IPv6 packets to queue during MAC resolution.
- Range:
-
-
from 3 to 20
- Default value:
-
-
3
CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS
Max number of entries in IPv6 neighbor cache
Found in: Component config > LWIP
Config max number of entries in IPv6 neighbor cache
- Range:
-
-
from 3 to 10
- Default value:
-
-
5
CONFIG_LWIP_PPP_NOTIFY_PHASE_SUPPORT
Enable Notify Phase Callback
Found in: Component config > LWIP
Enable to set a callback which is called on change of the internal PPP state machine.
- Default value:
-
-
No (disabled) if CONFIG_LWIP_PPP_SUPPORT
CONFIG_LWIP_PPP_PAP_SUPPORT
Enable PAP support
Found in: Component config > LWIP
Enable Password Authentication Protocol (PAP) support
- Default value:
-
-
No (disabled) if CONFIG_LWIP_PPP_SUPPORT
CONFIG_LWIP_PPP_CHAP_SUPPORT
Enable CHAP support
Found in: Component config > LWIP
Enable Challenge Handshake Authentication Protocol (CHAP) support
- Default value:
-
-
No (disabled) if CONFIG_LWIP_PPP_SUPPORT
CONFIG_LWIP_PPP_MSCHAP_SUPPORT
Enable MSCHAP support
Found in: Component config > LWIP
Enable Microsoft version of the Challenge-Handshake Authentication Protocol (MSCHAP) support
- Default value:
-
-
No (disabled) if CONFIG_LWIP_PPP_SUPPORT
CONFIG_LWIP_PPP_MPPE_SUPPORT
Enable MPPE support
Found in: Component config > LWIP
Enable Microsoft Point-to-Point Encryption (MPPE) support
- Default value:
-
-
No (disabled) if CONFIG_LWIP_PPP_SUPPORT
CONFIG_LWIP_ENABLE_LCP_ECHO
Enable LCP ECHO
Found in: Component config > LWIP
Enable LCP echo keepalive requests
- Default value:
-
-
No (disabled) if CONFIG_LWIP_PPP_SUPPORT
CONFIG_LWIP_LCP_ECHOINTERVAL
Echo interval (s)
Found in: Component config > LWIP > |
SLIP over serial support is experimental and unsupported.
- Default value:
-
-
No (disabled)
Contains:
CONFIG_LWIP_SLIP_DEBUG_ON
Enable SLIP debug log output
Found in: Component config > LWIP > CONFIG_LWIP_SLIP_SUPPORT
Enable SLIP debug log output
- Default value:
-
-
No (disabled) if CONFIG_LWIP_SLIP_SUPPORT
ICMP
Contains:
CONFIG_LWIP_ICMP
ICMP: Enable ICMP
Found in: Component config > LWIP > ICMP
Enable ICMP module for check network stability
- Default value:
-
-
Yes (enabled)
CONFIG_LWIP_MULTICAST_PING
Respond to multicast pings
Found in: Component config > LWIP > ICMP
- Default value:
-
-
No (disabled)
CONFIG_LWIP_BROADCAST_PING
Respond to broadcast pings
Found in: Component config > LWIP > ICMP
- Default value:
-
-
No (disabled)
LWIP RAW API
Contains:
CONFIG_LWIP_MAX_RAW_PCBS
Maximum LWIP RAW PCBs
Found in: Component config > LWIP > LWIP RAW API
The maximum number of simultaneously active LWIP RAW protocol control blocks. The practical maximum limit is determined by available heap memory at runtime.
- Range:
-
-
from 1 to 1024
- Default value:
-
-
16
SNTP
Contains:
CONFIG_LWIP_SNTP_MAX_SERVERS
Maximum number of NTP servers
Found in: Component config > LWIP > SNTP
Set maximum number of NTP servers used by LwIP SNTP module. First argument of sntp_setserver/sntp_setservername functions is limited to this value.
- Range:
-
-
from 1 to 16
- Default value:
-
-
1
CONFIG_LWIP_DHCP_GET_NTP_SRV
Request NTP servers from DHCP
Found in: Component config > LWIP > SNTP
If enabled, LWIP will add 'NTP' to Parameter-Request Option sent via DHCP-request. DHCP server might reply with an NTP server address in option 42. |
CONFIG_LWIP_DHCP_GET_NTP_SRV
Set maximum number of NTP servers aquired via DHCP-offer. Should be less or equal to "Maximum number of NTP servers", any extra servers would be just ignored.
- Range:
-
-
from 1 to 16 if CONFIG_LWIP_DHCP_GET_NTP_SRV
- Default value:
-
CONFIG_LWIP_SNTP_UPDATE_DELAY
Request interval to update time (ms)
Found in: Component config > LWIP > SNTP
This option allows you to set the time update period via SNTP. Default is 1 hour. Must not be below 15 seconds by specification. (SNTPv4 RFC 4330 enforces a minimum update time of 15 seconds).
- Range:
-
-
from 15000 to 4294967295
- Default value:
-
-
3600000
DNS
Contains:
CONFIG_LWIP_DNS_MAX_SERVERS
Maximum number of DNS servers
Found in: Component config > LWIP > DNS
Set maximum number of DNS servers. If fallback DNS servers are supported, the number of DNS servers needs to be greater than or equal to 3.
- Range:
-
-
from 1 to 4
- Default value:
-
-
3
CONFIG_LWIP_FALLBACK_DNS_SERVER_SUPPORT
Enable DNS fallback server support
Found in: Component config > LWIP > DNS
Enable this feature to support DNS fallback server.
- Default value:
-
-
No (disabled)
CONFIG_LWIP_FALLBACK_DNS_SERVER_ADDRESS
DNS fallback server address
Found in: Component config > LWIP > DNS > CONFIG_LWIP_FALLBACK_DNS_SERVER_SUPPORT
This option allows you to config dns fallback server address.
- Default value:
-
-
"114.114.114.114" if CONFIG_LWIP_FALLBACK_DNS_SERVER_SUPPORT
CONFIG_LWIP_BRIDGEIF_MAX_PORTS
Maximum number of bridge ports
Found in: Component config > LWIP
Set maximum number of ports a bridge can consists of.
- Range:
-
-
from 1 to 63
- Default value:
-
-
7
CONFIG_LWIP_ESP_LWIP_ASSERT
Enable LWIP ASSERT checks
Found in: Component config > LWIP
Enable this option keeps LWIP assertion checks enabled. It is recommended to keep this option enabled.
If asserts are disabled for the entire project, they are also disabled for LWIP and this option is ignored.
|
Hooks
Enables to define a TCP ISN hook to randomize initial sequence number in TCP connection. The default TCP ISN algorithm used in IDF (standardized in RFC 6528) produces ISN by combining an MD5 of the new TCP id and a stable secret with the current time. This is because the lwIP implementation (tcp_next_iss) is not very strong, as it does not take into consideration any platform specific entropy source.
Set to LWIP_HOOK_TCP_ISN_CUSTOM to provide custom implementation. Set to LWIP_HOOK_TCP_ISN_NONE to use lwIP implementation.
|
Available options:
-
No hook declared (CONFIG_LWIP_HOOK_ND6_GET_GW_NONE)
-
Default (weak) implementation (CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT)
-
Custom implementation (CONFIG_LWIP_HOOK_ND6_GET_GW_CUSTOM)
CONFIG_LWIP_HOOK_IP6_SELECT_SRC_ADDR
IPv6 source address selection Hook
Found in: Component config > LWIP > Hooks
Enables custom IPv6 source address selection. Setting this to "default" provides weak implementation stub that could be overwritten in application code. Setting this to "custom" provides hook's declaration only and expects the application to implement it.
|
Available options:
-
No hook declared (CONFIG_LWIP_HOOK_IP6_SELECT_SRC_ADDR_NONE)
-
Default (weak) implementation (CONFIG_LWIP_HOOK_IP6_SELECT_SRC_ADDR_DEFAULT)
-
Custom implementation (CONFIG_LWIP_HOOK_IP6_SELECT_SRC_ADDR_CUSTOM)
CONFIG_LWIP_HOOK_NETCONN_EXTERNAL_RESOLVE
Netconn external resolve Hook
Found in: Component config > LWIP > Hooks
Enables custom DNS resolve hook. Setting this to "default" provides weak implementation stub that could be overwritten in application code. Setting this to "custom" provides hook's declaration only and expects the application to implement it.
|
TLS input and output buffers will be allocated in IRAM section which is 32bit aligned memory. Every unaligned (8bit or 16bit) access will result in an exception and incur penalty of certain clock cycles per unaligned read/write.
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN
TLS maximum message content length
Found in: Component config > mbedTLS
Maximum TLS message length (in bytes) supported by mbedTLS.
16384 is the default and this value is required to comply fully with TLS standards.
However you can set a lower value in order to save RAM. This is safe if the other end of the connection supports Maximum Fragment Length Negotiation Extension (max_fragment_length, see RFC6066) or you know for certain that it will never send a message longer than a certain number of bytes.
If the value is set too low, symptoms are a failed TLS handshake or a return value of MBEDTLS_ERR_SSL_INVALID_RECORD (-0x7200).
|
CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN
Asymmetric in/out fragment length
Found in: Component config > mbedTLS
If enabled, this option allows customizing TLS in/out fragment length in asymmetric way. Please note that enabling this with default values saves 12KB of dynamic memory per TLS connection.
- Default value:
-
-
Yes (enabled)
CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN
TLS maximum incoming fragment length
Found in: Component config > mbedTLS > CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN
This defines maximum incoming fragment length, overriding default maximum content length (MBEDTLS_SSL_MAX_CONTENT_LEN).
- Range:
-
-
from 512 to 16384
- Default value:
-
-
16384
CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN
TLS maximum outgoing fragment length
Found in: Component config > mbedTLS > CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN
This defines maximum outgoing fragment length, overriding default maximum content length (MBEDTLS_SSL_MAX_CONTENT_LEN).
- Range:
-
-
from 512 to 16384
- Default value:
-
-
4096
CONFIG_MBEDTLS_DYNAMIC_BUFFER
Using dynamic TX/RX buffer
Found in: Component config > mbedTLS
Using dynamic TX/RX buffer. |
After enabling this option, mbedTLS will allocate TX buffer when need to send data and then free it if all data is sent, allocate RX buffer when need to receive data and then free it when all data is used or read by upper layer.
By default, when SSL is initialized, mbedTLS also allocate TX and RX buffer with the default value of "MBEDTLS_SSL_OUT_CONTENT_LEN" or "MBEDTLS_SSL_IN_CONTENT_LEN", so to save more heap, users can set the options to be an appropriate value.
CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA
Free private key and DHM data after its usage
Found in: Component config > |
CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA
Free CA certificate after its usage in the handshake process. This option will decrease the heap footprint for the TLS handshake, but may lead to a problem: If the respective ssl object needs to perform the TLS handshake again, the CA certificate should once again be registered to the ssl object.
- Default value:
-
-
Yes (enabled) if CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA
CONFIG_MBEDTLS_DEBUG
Enable mbedTLS debugging
Found in: Component config > mbedTLS
Enable mbedTLS debugging functions at compile time.
If this option is enabled, you can include "mbedtls/esp_debug.h" and call mbedtls_esp_enable_debug_log() at runtime in order to enable mbedTLS debug output via the ESP log mechanism.
- Default value:
-
-
No (disabled)
CONFIG_MBEDTLS_DEBUG_LEVEL
Set mbedTLS debugging level
Found in: Component config > mbedTLS > CONFIG_MBEDTLS_DEBUG
Set mbedTLS debugging level
Available options:
-
Warning (CONFIG_MBEDTLS_DEBUG_LEVEL_WARN)
-
Info (CONFIG_MBEDTLS_DEBUG_LEVEL_INFO)
-
Debug (CONFIG_MBEDTLS_DEBUG_LEVEL_DEBUG)
-
Verbose (CONFIG_MBEDTLS_DEBUG_LEVEL_VERBOSE)
Certificate Bundle
Contains:
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE
Enable trusted root certificate bundle
Found in: Component config > |
mbedTLS > Certificate Bundle
Enable support for large number of default root certificates
When enabled this option allows user to store default as well as customer specific root certificates in compressed format rather than storing full certificate. For the root certificates the public key and the subject name will be stored.
- Default value:
-
-
Yes (enabled)
CONFIG_MBEDTLS_DEFAULT_CERTIFICATE_BUNDLE
Default certificate bundle options
Found in: Component config > mbedTLS > Certificate Bundle > CONFIG_MBEDTLS_CERTIFICATE_BUNDLE
Available options:
-
Use the full default certificate bundle (CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL)
-
Use only the most common certificates from the default bundles (CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN)
Use only the most common certificates from the default bundles, reducing the size with 50%, while still having around 99% coverage.
-
Do not use the default certificate bundle (CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE)
CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE
Add custom certificates to the default bundle
Found in: Component config > mbedTLS > Certificate Bundle > CONFIG_MBEDTLS_CERTIFICATE_BUNDLE
- Default value:
-
-
No (disabled)
CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH
Custom certificate bundle path
Found in: Component config > mbedTLS > Certificate Bundle > CONFIG_MBEDTLS_CERTIFICATE_BUNDLE > CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE
Name of the custom certificate directory or file. This path is evaluated relative to the project root directory.
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_MAX_CERTS
Maximum no of certificates allowed in certificate bundle
Found in: Component config > mbedTLS > Certificate Bundle > CONFIG_MBEDTLS_CERTIFICATE_BUNDLE
- Default value:
-
-
200
CONFIG_MBEDTLS_ECP_RESTARTABLE
Enable mbedTLS ecp restartable
Found in: Component config > mbedTLS
Enable "non-blocking" ECC operations that can return early and be resumed.
- Default value:
-
-
No (disabled)
CONFIG_MBEDTLS_CMAC_C
Enable CMAC mode for block ciphers
Found in: Component config > mbedTLS
Enable the CMAC (Cipher-based Message Authentication Code) mode for block ciphers.
- Default value:
-
-
No (disabled)
CONFIG_MBEDTLS_HARDWARE_AES
Enable hardware AES acceleration
Found in: Component config > mbedTLS
Enable hardware accelerated AES encryption & decryption.
Note that if the ESP32 CPU is running at 240MHz, hardware AES does not offer any speed boost over software AES.
CONFIG_MBEDTLS_HARDWARE_GCM
Enable partially hardware accelerated GCM
Found in: Component config > mbedTLS > |
Yes (enabled) if SOC_AES_SUPPORT_GCM && CONFIG_MBEDTLS_HARDWARE_AES
CONFIG_MBEDTLS_HARDWARE_MPI
Enable hardware MPI (bignum) acceleration
Found in: Component config > mbedTLS
Enable hardware accelerated multiple precision integer operations.
Hardware accelerated multiplication, modulo multiplication, and modular exponentiation for up to SOC_RSA_MAX_BIT_LEN bit results.
These operations are used by RSA.
CONFIG_MBEDTLS_HARDWARE_SHA
Enable hardware SHA acceleration
Found in: Component config > mbedTLS
Enable hardware accelerated SHA1, SHA256, SHA384 & SHA512 in mbedTLS.
Due to a hardware limitation, on the ESP32 hardware acceleration is only guaranteed if SHA digests are calculated one at a time. If more than one SHA digest is calculated at the same time, one will be calculated fully in hardware and the rest will be calculated (at least partially calculated) in software. This happens automatically.
SHA hardware acceleration is faster than software in some situations but slower in others. You should benchmark to find the best setting for you.
CONFIG_MBEDTLS_HARDWARE_ECC
Enable hardware ECC acceleration
Found in: Component config > mbedTLS
Enable hardware accelerated ECC point multiplication and point verification for points on curve SECP192R1 and SECP256R1 in mbedTLS
- Default value:
-
-
Yes (enabled) if SOC_ECC_SUPPORTED
CONFIG_MBEDTLS_ECC_OTHER_CURVES_SOFT_FALLBACK
Fallback to software implementation for curves not supported in hardware
Found in: Component config > |
Enable ECDSA signing using on-chip ECDSA peripheral
Found in: Component config > mbedTLS
Enable hardware accelerated ECDSA peripheral to sign data on curve SECP192R1 and SECP256R1 in mbedTLS.
Note that for signing, the private key has to be burnt in an efuse key block with key purpose set to ECDSA_KEY. If no key is burnt, it will report an error
The key should be burnt in little endian format. espefuse.py utility handles it internally but care needs to be taken while burning using esp_efuse APIs
- Default value:
-
-
No (disabled) if SOC_ECDSA_SUPPORTED
CONFIG_MBEDTLS_HARDWARE_ECDSA_VERIFY
Enable ECDSA signature verification using on-chip ECDSA peripheral
Found in: Component config > mbedTLS
Enable hardware accelerated ECDSA peripheral to verify signature on curve SECP192R1 and SECP256R1 in mbedTLS.
- Default value:
-
-
Yes (enabled) if SOC_ECDSA_SUPPORTED
CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN
Enable hardware ECDSA sign acceleration when using ATECC608A
Found in: Component config > mbedTLS
This option enables hardware acceleration for ECDSA sign function, only when using ATECC608A cryptoauth chip (integrated with ESP32-WROOM-32SE)
- Default value:
-
-
No (disabled)
CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY
Enable hardware ECDSA verify acceleration when using ATECC608A
Found in: Component config > mbedTLS
This option enables hardware acceleration for ECDSA sign function, only when using ATECC608A cryptoauth chip (integrated with ESP32-WROOM-32SE)
- Default value:
-
-
No (disabled)
CONFIG_MBEDTLS_HAVE_TIME
Enable mbedtls time support
Found in: Component config > mbedTLS
Enable use of time.h functions (time() and gmtime()) by mbedTLS.
|
CONFIG_MBEDTLS_HAVE_TIME
Enables X.509 certificate expiry checks in mbedTLS.
If this option is disabled (default) then X.509 certificate "valid from" and "valid to" timestamp fields are ignored.
If this option is enabled, these fields are compared with the current system date and time. The time is retrieved using the standard time() and gmtime() functions. If the certificate is not valid for the current system time then verification will fail with code MBEDTLS_X509_BADCERT_FUTURE or MBEDTLS_X509_BADCERT_EXPIRED.
Enabling this option requires adding functionality in the firmware to set the system clock to a valid timestamp before using TLS. The recommended way to do this is via ESP-IDF's SNTP functionality, but any method can be used.
In the case where only a small number of certificates are trusted by the device, please carefully consider the tradeoffs of enabling this option. There may be undesired consequences, for example if all trusted certificates expire while the device is offline and a TLS connection is required to update. Or if an issue with the SNTP server means that the system time is invalid for an extended period after a reset.
- Default value:
-
-
No (disabled)
CONFIG_MBEDTLS_ECDSA_DETERMINISTIC
Enable deterministic ECDSA
Found in: Component config > mbedTLS
Standard ECDSA is "fragile" in the sense that lack of entropy when signing may result in a compromise of the long-term signing key.
- Default value:
-
-
|
TLS Key Exchange Methods
Enable to show configuration for different types of pre-shared-key TLS authentatication methods.
Leaving this options disabled will save code size if they are not used.
- Default value:
-
-
No (disabled)
CONFIG_MBEDTLS_KEY_EXCHANGE_PSK
Enable PSK based ciphersuite modes
Found in: Component config > mbedTLS > TLS Key Exchange Methods > CONFIG_MBEDTLS_PSK_MODES
Enable to support symmetric key PSK (pre-shared-key) TLS key exchange modes.
- Default value:
-
-
No (disabled) if CONFIG_MBEDTLS_PSK_MODES
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK
Enable DHE-PSK based ciphersuite modes
Found in: Component config > mbedTLS > TLS Key Exchange Methods > CONFIG_MBEDTLS_PSK_MODES
Enable to support Diffie-Hellman PSK (pre-shared-key) TLS authentication modes.
- Default value:
-
-
Yes (enabled) if CONFIG_MBEDTLS_PSK_MODES && CONFIG_MBEDTLS_DHM_C
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK
Enable ECDHE-PSK based ciphersuite modes
Found in: Component config > mbedTLS > TLS Key Exchange Methods > CONFIG_MBEDTLS_PSK_MODES
Enable to support Elliptic-Curve-Diffie-Hellman PSK (pre-shared-key) TLS authentication modes.
- Default value:
-
-
Yes (enabled) if CONFIG_MBEDTLS_PSK_MODES && CONFIG_MBEDTLS_ECDH_C
CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK
Enable RSA-PSK based ciphersuite modes
Found in: Component config > mbedTLS > TLS Key Exchange Methods > CONFIG_MBEDTLS_PSK_MODES
Enable to support RSA PSK (pre-shared-key) TLS authentication modes.
- Default value:
-
-
Yes (enabled) if CONFIG_MBEDTLS_PSK_MODES
CONFIG_MBEDTLS_KEY_EXCHANGE_RSA
Enable RSA-only based ciphersuite modes
Found in: Component config > mbedTLS > |
TLS Key Exchange Methods
Enable to show Elliptic Curve based ciphersuite mode options.
Disabling all Elliptic Curve ciphersuites saves code size and can give slightly faster TLS handshakes, provided the server supports RSA-only ciphersuite modes.
- Default value:
-
-
Yes (enabled)
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA
Enable ECDHE-RSA based ciphersuite modes
Found in: Component config > mbedTLS > TLS Key Exchange Methods > CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE
Enable to support ciphersuites with prefix TLS-ECDHE-RSA-WITH-
- Default value:
-
-
|
Yes (enabled)
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA
Enable ECDHE-ECDSA based ciphersuite modes
Found in: Component config > mbedTLS > TLS Key Exchange Methods > CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE
Enable to support ciphersuites with prefix TLS-ECDHE-RSA-WITH-
- Default value:
-
-
Yes (enabled)
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA
Enable ECDH-ECDSA based ciphersuite modes
Found in: Component config > mbedTLS > TLS Key Exchange Methods > CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE
Enable to support ciphersuites with prefix TLS-ECDHE-RSA-WITH-
- Default value:
-
-
Yes (enabled)
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA
Enable ECDH-RSA based ciphersuite modes
Found in: Component config > mbedTLS > TLS Key Exchange Methods > CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE
Enable to support ciphersuites with prefix TLS-ECDHE-RSA-WITH-
- Default value:
-
-
Yes (enabled)
CONFIG_MBEDTLS_KEY_EXCHANGE_ECJPAKE
Enable ECJPAKE based ciphersuite modes
Found in: Component config > mbedTLS > |
TLS Key Exchange Methods
Enable to support ciphersuites with prefix TLS-ECJPAKE-WITH-
- Default value:
-
-
No (disabled) if CONFIG_MBEDTLS_ECJPAKE_C && CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED
CONFIG_MBEDTLS_SSL_RENEGOTIATION
Support TLS renegotiation
Found in: Component config > mbedTLS
The two main uses of renegotiation are (1) refresh keys on long-lived connections and (2) client authentication after the initial handshake. If you don't need renegotiation, disabling it will save code size and reduce the possibility of abuse/vulnerability.
- Default value:
-
-
Yes (enabled)
CONFIG_MBEDTLS_SSL_PROTO_TLS1_2
Support TLS 1.2 protocol
Found in: Component config > mbedTLS
- Default value:
-
-
Yes (enabled)
CONFIG_MBEDTLS_SSL_PROTO_GMTSSL1_1
Support GM/T SSL 1.1 protocol
Found in: Component config > mbedTLS
Provisions for GM/T SSL 1.1 support
- Default value:
-
-
No (disabled)
CONFIG_MBEDTLS_SSL_PROTO_DTLS
Support DTLS protocol (all versions)
Found in: Component config > mbedTLS
Requires TLS 1.2 to be enabled for DTLS 1.2
- Default value:
-
-
No (disabled)
CONFIG_MBEDTLS_SSL_ALPN
Support ALPN (Application Layer Protocol Negotiation)
Found in: Component config > mbedTLS
Disabling this option will save some code size if it is not needed.
- Default value:
-
-
Yes (enabled)
CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS
TLS: Client Support for RFC 5077 SSL session tickets
Found in: Component config > mbedTLS
Client support for RFC 5077 session tickets. See mbedTLS documentation for more details. Disabling this option will save some code size.
- Default value:
-
-
Yes (enabled)
CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS
TLS: Server Support for RFC 5077 SSL session tickets
Found in: Component config > mbedTLS
Server support for RFC 5077 session tickets. See mbedTLS documentation for more details. Disabling this option will save some code size.
- Default value:
-
-
Yes (enabled)
Symmetric Ciphers
Contains:
CONFIG_MBEDTLS_AES_C
AES block cipher
Found in: Component config > mbedTLS > Symmetric Ciphers
- Default value:
-
-
Yes (enabled)
CONFIG_MBEDTLS_CAMELLIA_C
Camellia block cipher
Found in: Component config > mbedTLS > Symmetric Ciphers
- Default value:
-
-
No (disabled)
CONFIG_MBEDTLS_DES_C
DES block cipher (legacy, insecure)
Found in: Component config > mbedTLS > |
Symmetric Ciphers
Enables the Blowfish block cipher (not used for TLS sessions.)
The Blowfish cipher is not used for mbedTLS TLS sessions but can be used for other purposes. Read up on the limitations of Blowfish (including Sweet32) before enabling.
- Default value:
-
-
No (disabled)
CONFIG_MBEDTLS_XTEA_C
XTEA block cipher
Found in: Component config > mbedTLS > Symmetric Ciphers
Enables the XTEA block cipher.
- Default value:
-
-
No (disabled)
CONFIG_MBEDTLS_CCM_C
CCM (Counter with CBC-MAC) block cipher modes
Found in: Component config > mbedTLS > Symmetric Ciphers
Enable Counter with CBC-MAC (CCM) modes for AES and/or Camellia ciphers.
Disabling this option saves some code size.
- Default value:
-
-
Yes (enabled)
CONFIG_MBEDTLS_GCM_C
GCM (Galois/Counter) block cipher modes
Found in: Component config > mbedTLS > |
Symmetric Ciphers
Enable Galois/Counter Mode for AES and/or Camellia ciphers.
This option is generally faster than CCM.
- Default value:
-
-
Yes (enabled)
CONFIG_MBEDTLS_NIST_KW_C
NIST key wrapping (KW) and KW padding (KWP)
Found in: Component config > mbedTLS > Symmetric Ciphers
Enable NIST key wrapping and key wrapping padding.
- Default value:
-
-
No (disabled)
CONFIG_MBEDTLS_RIPEMD160_C
Enable RIPEMD-160 hash algorithm
Found in: Component config > mbedTLS
Enable the RIPEMD-160 hash algorithm.
- Default value:
-
-
No (disabled)
Certificates
Contains:
CONFIG_MBEDTLS_PEM_PARSE_C
Read & Parse PEM formatted certificates
Found in: Component config > mbedTLS > Certificates
Enable decoding/parsing of PEM formatted certificates.
If your certificates are all in the simpler DER format, disabling this option will save some code size.
- Default value:
-
-
Yes (enabled)
CONFIG_MBEDTLS_PEM_WRITE_C
Write PEM formatted certificates
Found in: Component config > mbedTLS > Certificates
Enable writing of PEM formatted certificates.
If writing certificate data only in DER format, disabling this option will save some code size.
- Default value:
-
-
Yes (enabled)
CONFIG_MBEDTLS_X509_CRL_PARSE_C
X.509 CRL parsing
Found in: Component config > mbedTLS > Certificates
Support for parsing X.509 Certifificate Revocation Lists.
- Default value:
-
-
Yes (enabled)
CONFIG_MBEDTLS_X509_CSR_PARSE_C
X.509 CSR parsing
Found in: Component config > mbedTLS > Certificates
Support for parsing X.509 Certifificate Signing Requests
- Default value:
-
-
Yes (enabled)
CONFIG_MBEDTLS_ECP_C
Elliptic Curve Ciphers
Found in: Component config > mbedTLS
- Default value:
-
-
Yes (enabled)
CONFIG_MBEDTLS_DHM_C
Diffie-Hellman-Merkle key exchange (DHM)
Found in: Component config > |
Needed to use ECJPAKE-xxx TLS ciphersuites.
- Default value:
-
-
No (disabled)
CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED
Enable SECP192R1 curve
Found in: Component config > mbedTLS
Enable support for SECP192R1 Elliptic Curve.
CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED
Enable SECP224R1 curve
Found in: Component config > mbedTLS
Enable support for SECP224R1 Elliptic Curve.
CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED
Enable SECP256R1 curve
Found in: Component config > mbedTLS
Enable support for SECP256R1 Elliptic Curve.
- Default value:
-
-
Yes (enabled)
CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED
Enable SECP384R1 curve
Found in: Component config > mbedTLS
Enable support for SECP384R1 Elliptic Curve.
CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED
Enable SECP521R1 curve
Found in: Component config > mbedTLS
Enable support for SECP521R1 Elliptic Curve.
|
CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED
Enable BP512R1 curve
Found in: Component config > mbedTLS
support for DP Elliptic Curve.
CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED
Enable CURVE25519 curve
Found in: Component config > mbedTLS
Enable support for CURVE25519 Elliptic Curve.
CONFIG_MBEDTLS_ECP_NIST_OPTIM
NIST 'modulo p' optimisations
Found in: Component config > mbedTLS
NIST 'modulo p' optimisations increase Elliptic Curve operation performance.
Disabling this option saves some code size.
- Default value:
-
-
Yes (enabled)
CONFIG_MBEDTLS_ECP_FIXED_POINT_OPTIM
Enable fixed-point multiplication optimisations
Found in: Component config > mbedTLS
This configuration option enables optimizations to speedup (about 3 ~ 4 times) the ECP fixed point multiplication using pre-computed tables in the flash memory. Disabling this configuration option saves flash footprint (about 29KB if all Elliptic Curve selected) in the application binary.
# end of Elliptic Curve options
- Default value:
-
-
Yes (enabled)
CONFIG_MBEDTLS_POLY1305_C
Poly1305 MAC algorithm
Found in: Component config > mbedTLS
Enable support for Poly1305 MAC algorithm.
- Default value:
-
-
No (disabled)
CONFIG_MBEDTLS_CHACHA20_C
Chacha20 stream cipher
Found in: Component config > mbedTLS
Enable support for Chacha20 stream cipher.
- Default value:
-
-
No (disabled)
CONFIG_MBEDTLS_CHACHAPOLY_C
ChaCha20-Poly1305 AEAD |
CONFIG_MBEDTLS_THREADING_C
Enable threading alt to allow your own alternate threading implementation.
- Default value:
-
-
Yes (enabled) if CONFIG_MBEDTLS_THREADING_C
CONFIG_MBEDTLS_THREADING_PTHREAD
Enable threading pthread implementation
Found in: Component config > mbedTLS > CONFIG_MBEDTLS_THREADING_C
Enable the pthread wrapper layer for the threading layer.
- Default value:
-
-
No (disabled) if CONFIG_MBEDTLS_THREADING_C
CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI
Fallback to software implementation for larger MPI values
Found in: Component config > mbedTLS
Fallback to software implementation for RSA key lengths larger than SOC_RSA_MAX_BIT_LEN. If this is not active then the ESP will be unable to process keys greater than SOC_RSA_MAX_BIT_LEN.
- Default value:
-
-
No (disabled)
CONFIG_MBEDTLS_USE_CRYPTO_ROM_IMPL
Use ROM implementation of the crypto algorithm
Found in: Component config > mbedTLS
Enable this flag to use mbedtls crypto algorithm from ROM instead of ESP-IDF.
This configuration option saves flash footprint in the application binary. Note that the version of mbedtls crypto algorithm library in ROM is v2.16.12. We have done the security analysis of the mbedtls revision in ROM (v2.16.12) and ensured that affected symbols have been patched (removed). If in the future mbedtls revisions there are security issues that also affects the version in ROM (v2.16.12) then we shall patch the relevant symbols. This would increase the flash footprint and hence care must be taken to keep some reserved space for the application binary in flash layout.
- Default value:
-
-
No (disabled) if ESP_ROM_HAS_MBEDTLS_CRYPTO_LIB && CONFIG_IDF_EXPERIMENTAL_FEATURES
ESP-MQTT Configurations
Contains:
CONFIG_MQTT_PROTOCOL_311
Enable MQTT protocol |
CONFIG_MQTT_USE_CUSTOM_CONFIG
Default config employs API locks to protect internal structures. It is possible to disable these locks if the user code doesn't access MQTT API from multiple concurrent tasks
- Default value:
-
-
No (disabled) if CONFIG_MQTT_USE_CUSTOM_CONFIG
CONFIG_MQTT_TASK_PRIORITY
MQTT task priority
Found in: Component config > ESP-MQTT Configurations > CONFIG_MQTT_USE_CUSTOM_CONFIG
MQTT task priority. Higher number denotes higher priority.
- Default value:
-
CONFIG_MQTT_POLL_READ_TIMEOUT_MS
MQTT transport poll read timeut
Found in: Component config > ESP-MQTT Configurations > CONFIG_MQTT_USE_CUSTOM_CONFIG
Timeout when polling underlying transport for read.
- Default value:
-
-
1000 if CONFIG_MQTT_USE_CUSTOM_CONFIG
CONFIG_MQTT_EVENT_QUEUE_SIZE
Number of queued events.
|
Found in: Component config > ESP-MQTT Configurations > CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED
Available options:
-
Core 0 (CONFIG_MQTT_USE_CORE_0)
-
Core 1 (CONFIG_MQTT_USE_CORE_1)
CONFIG_MQTT_OUTBOX_DATA_ON_EXTERNAL_MEMORY
Use external memory for outbox data
Found in: Component config > ESP-MQTT Configurations
Set to true to use external memory for outbox data.
- Default value:
-
-
No (disabled) if CONFIG_MQTT_USE_CUSTOM_CONFIG
CONFIG_MQTT_CUSTOM_OUTBOX
Enable custom outbox implementation
Found in: Component config > ESP-MQTT Configurations
Set to true if a specific implementation of message outbox is needed (e.g. persistent outbox in NVM or similar). Note: Implementation of the custom outbox must be added to the mqtt component. These CMake commands could be used to append the custom implementation to lib-mqtt sources: idf_component_get_property(mqtt mqtt COMPONENT_LIB) set_property(TARGET ${mqtt} PROPERTY SOURCES ${PROJECT_DIR}/custom_outbox.c APPEND)
- Default value:
-
-
No (disabled)
CONFIG_MQTT_OUTBOX_EXPIRED_TIMEOUT_MS
Outbox message expired timeout[ms]
Found in: Component config > ESP-MQTT Configurations
Messages which stays in the outbox longer than this value before being published will be discarded.
- Default value:
-
-
30000 if CONFIG_MQTT_USE_CUSTOM_CONFIG
Newlib
Contains:
CONFIG_NEWLIB_STDOUT_LINE_ENDING
Line ending for UART output
Found in: Component config > Newlib
This option allows configuring the desired line endings sent to UART when a newline ('n', LF) appears on stdout. Three options are possible:
CRLF: whenever LF is encountered, prepend it with CR
LF: no modification is applied, stdout is sent as is
CR: each occurence of LF is replaced with CR
This option doesn't affect behavior of the UART driver (drivers/uart.h).
|
These functions have been compiled with so-called "nano" formatting option. This option doesn't support 64-bit integer formats and C99 features, such as positional arguments.
For more details about "nano" formatting option, please see newlib readme file, search for '--enable-newlib-nano-formatted-io': https://sourceware.org/newlib/README
If this option is enabled and the ROM contains functions from newlib-nano, the build system will use functions available in ROM, reducing the application binary size. Functions available in ROM run faster than functions which run from flash. Functions available in ROM can also run when flash instruction cache is disabled.
Some chips (e.g. ESP32-C6) has the full formatting versions of printf/scanf in ROM instead of the nano versions and in this building with newlib nano might actually increase the size of the binary. Which functions are present in ROM can be seen from ROM caps: ESP_ROM_HAS_NEWLIB_NANO_FORMAT and ESP_ROM_HAS_NEWLIB_NORMAL_FORMAT.
If you need 64-bit integer formatting support or C99 features, keep this option disabled.
CONFIG_NEWLIB_TIME_SYSCALL
Timers used for gettimeofday function
Found in: Component config > Newlib
This setting defines which hardware timers are used to implement 'gettimeofday' and 'time' functions in C library.
-
- If both high-resolution (systimer for all targets except ESP32)
-
and RTC timers are used, timekeeping will continue in deep sleep. |
Time will be reported at 1 microsecond resolution. This is the default, and the recommended option.
-
- If only high-resolution timer (systimer) is used, gettimeofday will
-
provide time at microsecond resolution. Time will not be preserved when going into deep sleep mode.
-
- If only RTC timer is used, timekeeping will continue in
-
deep sleep, but time will be measured at 6.(6) microsecond resolution. Also the gettimeofday function itself may take longer to run.
-
- If no timers are used, gettimeofday and time functions
-
return -1 and set errno to ENOSYS.
-
- When RTC is used for timekeeping, two RTC_STORE registers are
-
used to keep time in deep sleep mode.
|
NVS
This option enables encryption for NVS. When enabled, XTS-AES is used to encrypt the complete NVS data, except the page headers. It requires XTS encryption keys to be stored in an encrypted partition (enabling flash encryption is mandatory here) or to be derived from an HMAC key burnt in eFuse.
- Default value:
-
-
Yes (enabled) if CONFIG_SECURE_FLASH_ENC_ENABLED && (CONFIG_SECURE_FLASH_ENC_ENABLED || SOC_HMAC_SUPPORTED)
CONFIG_NVS_COMPATIBLE_PRE_V4_3_ENCRYPTION_FLAG
NVS partition encrypted flag compatible with ESP-IDF before v4.3
Found in: Component config > NVS
Enabling this will ignore "encrypted" flag for NVS partitions. |
CONFIG_NVS_ASSERT_ERROR_CHECK
Use assertions for error checking
Found in: Component config > NVS
This option switches error checking type between assertions (y) or return codes (n).
- Default value:
-
-
No (disabled)
CONFIG_NVS_LEGACY_DUP_KEYS_COMPATIBILITY
Enable legacy nvs_set function behavior when same key is reused with different data types
Found in: Component config > NVS
Enabling this option will switch the nvs_set() family of functions to the legacy mode: when called repeatedly with the same key but different data type, the existing value in the NVS remains active and the new value is just stored, actually not accessible through corresponding nvs_get() call for the key given. Use this option only when your application relies on such NVS API behaviour.
- Default value:
-
-
No (disabled)
NVS Security Provider
Contains:
CONFIG_NVS_SEC_KEY_PROTECTION_SCHEME
NVS Encryption: Key Protection Scheme
Found in: Component config > NVS Security Provider
This choice defines the default NVS encryption keys protection scheme; which will be used for the default NVS partition. Users can use the corresponding scheme registration APIs to register other schemes for the default as well as other NVS partitions.
Available options:
-
Using Flash Encryption (CONFIG_NVS_SEC_KEY_PROTECT_USING_FLASH_ENC)
Protect the NVS Encryption Keys using Flash Encryption Requires a separate 'nvs_keys' partition (which will be encrypted by flash encryption) for storing the NVS encryption keys
-
Using HMAC peripheral (CONFIG_NVS_SEC_KEY_PROTECT_USING_HMAC)
Derive and protect the NVS Encryption Keys using the HMAC peripheral Requires the specified eFuse block (NVS_SEC_HMAC_EFUSE_KEY_ID or the v2 API argument) to be empty or pre-written with a key with the purpose ESP_EFUSE_KEY_PURPOSE_HMAC_UP
CONFIG_NVS_SEC_HMAC_EFUSE_KEY_ID
eFuse key ID storing the HMAC key
Found in: Component config > NVS Security Provider
eFuse block key ID storing the HMAC key for deriving the NVS encryption keys
Note: The eFuse block key ID required by the HMAC scheme (CONFIG_NVS_SEC_KEY_PROTECT_USING_HMAC) is set using this config when the default NVS partition is initialized with nvs_flash_init(). The eFuse block key ID can also be set at runtime by passing the appropriate value to the NVS security scheme registration APIs.
- Range:
-
-
from 0 to 6 if CONFIG_NVS_SEC_KEY_PROTECT_USING_HMAC
- Default value:
-
OpenThread
Contains:
CONFIG_OPENTHREAD_ENABLED
OpenThread
Found in: Component config > OpenThread
Select this option to enable OpenThread and show the submenu with OpenThread configuration choices.
- Default value:
-
-
No (disabled)
CONFIG_OPENTHREAD_LOG_LEVEL_DYNAMIC
Enable dynamic log level control
Found in: Component config > |
Available options:
-
No logs (CONFIG_OPENTHREAD_LOG_LEVEL_NONE)
-
Error logs (CONFIG_OPENTHREAD_LOG_LEVEL_CRIT)
-
Warning logs (CONFIG_OPENTHREAD_LOG_LEVEL_WARN)
-
Notice logs (CONFIG_OPENTHREAD_LOG_LEVEL_NOTE)
-
Info logs (CONFIG_OPENTHREAD_LOG_LEVEL_INFO)
-
Debug logs (CONFIG_OPENTHREAD_LOG_LEVEL_DEBG)
Thread Operational Dataset
Contains:
CONFIG_OPENTHREAD_NETWORK_NAME
OpenThread network name
Found in: Component config > OpenThread > Thread Operational Dataset
- Default value:
-
-
"OpenThread-ESP"
CONFIG_OPENTHREAD_MESH_LOCAL_PREFIX
OpenThread mesh local prefix, format <address>/<plen>
Found in: Component config > OpenThread > Thread Operational Dataset
A string in the format "<address>/<plen>", where <address> is an IPv6 address and <plen> is a prefix length. For example "fd00:db8:a0:0::/64"
- Default value:
-
-
"fd00:db8:a0:0::/64"
CONFIG_OPENTHREAD_NETWORK_CHANNEL
OpenThread network channel
Found in: Component config > OpenThread > Thread Operational Dataset
- Range:
-
-
from 11 to 26
- Default value:
-
-
15
CONFIG_OPENTHREAD_NETWORK_PANID
OpenThread network pan id
Found in: Component config > OpenThread > |
OpenThread extended pan id
Found in: Component config > OpenThread > Thread Operational Dataset
The OpenThread network extended pan id in hex string format
- Default value:
-
-
dead00beef00cafe
CONFIG_OPENTHREAD_NETWORK_MASTERKEY
OpenThread network key
Found in: Component config > OpenThread > Thread Operational Dataset
The OpenThread network network key in hex string format
- Default value:
-
-
00112233445566778899aabbccddeeff
CONFIG_OPENTHREAD_NETWORK_PSKC
OpenThread pre-shared commissioner key
Found in: Component config > OpenThread > Thread Operational Dataset
The OpenThread pre-shared commissioner key in hex string format
- Default value:
-
-
104810e2315100afd6bc9215a6bfac53
CONFIG_OPENTHREAD_RADIO_TYPE
Config the Thread radio type
Found in: Component config > OpenThread
Configure how OpenThread connects to the 15.4 radio
Available options:
-
Native 15.4 radio (CONFIG_OPENTHREAD_RADIO_NATIVE)
Select this to use the native 15.4 radio.
-
Connect via UART (CONFIG_OPENTHREAD_RADIO_SPINEL_UART)
Select this to connect to a Radio Co-Processor via UART.
-
Connect via SPI (CONFIG_OPENTHREAD_RADIO_SPINEL_SPI)
Select this to connect to a Radio Co-Processor via SPI.
CONFIG_OPENTHREAD_DEVICE_TYPE
|
Config the Thread device type
Found in: Component config > OpenThread
OpenThread can be configured to different device types (FTD, MTD, Radio)
Available options:
-
Full Thread Device (CONFIG_OPENTHREAD_FTD)
Select this to enable Full Thread Device which can act as router and leader in a Thread network.
-
Minimal Thread Device (CONFIG_OPENTHREAD_MTD)
Select this to enable Minimal Thread Device which can only act as end device in a Thread network. This will reduce the code size of the OpenThread stack.
-
Radio Only Device (CONFIG_OPENTHREAD_RADIO)
|
if CONFIG_OPENTHREAD_ENABLED
CONFIG_OPENTHREAD_DIAG
Enable diag
Found in: Component config > OpenThread
Select this option to enable Diag in OpenThread. This will enable diag mode and a series of diag commands in the OpenThread command line. These commands allow users to manipulate low-level features of the storage and 15.4 radio.
- Default value:
-
-
Yes (enabled) if CONFIG_OPENTHREAD_ENABLED
CONFIG_OPENTHREAD_COMMISSIONER
Enable Commissioner
Found in: Component config > OpenThread
Select this option to enable commissioner in OpenThread. This will enable the device to act as a commissioner in the Thread network. A commissioner checks the pre-shared key from a joining device with the Thread commissioning protocol and shares the network parameter with the joining device upon success.
- Default value:
-
-
No (disabled) if CONFIG_OPENTHREAD_ENABLED
CONFIG_OPENTHREAD_COMM_MAX_JOINER_ENTRIES
The size of max commissioning joiner entries
Found in: Component config > |
OpenThread
Select this option to enable Joiner in OpenThread. This allows a device to join the Thread network with a pre-shared key using the Thread commissioning protocol.
- Default value:
-
-
No (disabled) if CONFIG_OPENTHREAD_ENABLED
CONFIG_OPENTHREAD_SRP_CLIENT
Enable SRP Client
Found in: Component config > OpenThread
Select this option to enable SRP Client in OpenThread. This allows a device to register SRP services to SRP Server.
- Default value:
-
-
Yes (enabled) if CONFIG_OPENTHREAD_ENABLED
CONFIG_OPENTHREAD_SRP_CLIENT_MAX_SERVICES
Specifies number of service entries in the SRP client service pool
Found in: Component config > OpenThread > CONFIG_OPENTHREAD_SRP_CLIENT
Set the max buffer size of service entries in the SRP client service pool.
- Range:
-
-
from 2 to 20 if CONFIG_OPENTHREAD_SRP_CLIENT
- Default value:
-
CONFIG_OPENTHREAD_DNS_CLIENT
Enable DNS Client
Found in: Component config > OpenThread
Select this option to enable DNS Client in OpenThread.
- Default value:
-
-
Yes (enabled) if CONFIG_OPENTHREAD_ENABLED
CONFIG_OPENTHREAD_BORDER_ROUTER
Enable Border Router
Found in: Component config > OpenThread
Select this option to enable border router features in OpenThread.
- Default value:
-
-
No (disabled) if CONFIG_OPENTHREAD_ENABLED
CONFIG_OPENTHREAD_PLATFORM_MSGPOOL_MANAGEMENT
Allocate message pool buffer from PSRAM
Found in: Component config > OpenThread
If enabled, the message pool is managed by platform defined logic.
- Default value:
-
-
No (disabled) if CONFIG_OPENTHREAD_ENABLED && (CONFIG_SPIRAM_USE_CAPS_ALLOC || CONFIG_SPIRAM_USE_MALLOC)
CONFIG_OPENTHREAD_NUM_MESSAGE_BUFFERS
|
The number of openthread message buffers
Found in: Component config > OpenThread
- Range:
-
-
from 10 to 8191 if CONFIG_OPENTHREAD_PLATFORM_MSGPOOL_MANAGEMENT && CONFIG_OPENTHREAD_ENABLED
- Default value:
-
CONFIG_OPENTHREAD_SPINEL_RX_FRAME_BUFFER_SIZE
The size of openthread spinel rx frame buffer
Found in: Component config > OpenThread
- Range:
-
-
from 512 to 8192 if CONFIG_OPENTHREAD_ENABLED || CONFIG_OPENTHREAD_SPINEL_ONLY
- Default value:
-
CONFIG_OPENTHREAD_MLE_MAX_CHILDREN
The size of max MLE children entries
Found in: Component config > OpenThread
- Range:
-
-
from 5 to 50 if CONFIG_OPENTHREAD_ENABLED
- Default value:
-
CONFIG_OPENTHREAD_TMF_ADDR_CACHE_ENTRIES
|
The size of max TMF address cache entries
Found in: Component config > OpenThread
- Range:
-
-
from 5 to 50 if CONFIG_OPENTHREAD_ENABLED
- Default value:
-
CONFIG_OPENTHREAD_DNS64_CLIENT
Use dns64 client
Found in: Component config > OpenThread
Select this option to acquire NAT64 address from dns servers.
- Default value:
-
-
No (disabled) if CONFIG_OPENTHREAD_ENABLED && CONFIG_LWIP_IPV4
CONFIG_OPENTHREAD_DNS_SERVER_ADDR
DNS server address (IPv4)
Found in: Component config > OpenThread > CONFIG_OPENTHREAD_DNS64_CLIENT
Set the DNS server IPv4 address.
- Default value:
-
-
"8.8.8.8" if CONFIG_OPENTHREAD_DNS64_CLIENT
CONFIG_OPENTHREAD_UART_BUFFER_SIZE
The uart received buffer size of openthread
Found in: |
OpenThread
Set the OpenThread UART buffer size.
- Range:
-
-
from 128 to 1024 if CONFIG_OPENTHREAD_ENABLED
- Default value:
-
-
768 if CONFIG_OPENTHREAD_ENABLED
CONFIG_OPENTHREAD_LINK_METRICS
Enable link metrics feature
Found in: Component config > OpenThread
Select this option to enable link metrics feature
- Default value:
-
-
No (disabled) if CONFIG_OPENTHREAD_ENABLED
CONFIG_OPENTHREAD_MACFILTER_ENABLE
Enable mac filter feature
Found in: Component config > OpenThread
Select this option to enable mac filter feature
- Default value:
-
-
No (disabled) if CONFIG_OPENTHREAD_ENABLED
CONFIG_OPENTHREAD_CSL_ENABLE
Enable CSL feature
Found in: Component config > OpenThread
Select this option to enable CSL feature
- Default value:
-
-
No (disabled) if CONFIG_OPENTHREAD_ENABLED
CONFIG_OPENTHREAD_XTAL_ACCURACY
|
Found in: Component config > OpenThread
The fixed uncertainty of the Device for scheduling CSL Transmissions in units of 10 microseconds.
- Default value:
-
CONFIG_OPENTHREAD_CSL_DEBUG_ENABLE
Enable CSL debug
Found in: Component config > OpenThread
Select this option to set rx on when sleep in CSL feature, only for debug
- Default value:
-
-
No (disabled) if CONFIG_OPENTHREAD_CSL_ENABLE
CONFIG_OPENTHREAD_DUA_ENABLE
Enable Domain Unicast Address feature
Found in: Component config > OpenThread
Only used for Thread1.2 certification
- Default value:
-
-
No (disabled) if CONFIG_OPENTHREAD_ENABLED
CONFIG_OPENTHREAD_TIME_SYNC
Enable the time synchronization service feature
Found in: Component config > OpenThread
Select this option to enable time synchronization feature, the devices in the same Thread network could sync to the same network time.
- Default value:
-
-
No (disabled) if CONFIG_OPENTHREAD_ENABLED
CONFIG_OPENTHREAD_RADIO_STATS_ENABLE
Enable Radio Statistics feature
Found in: Component config > OpenThread
Select this option to enable the radio statistics feature, you can use radio command to print some radio Statistics informations.
- Default value:
-
-
No (disabled) if CONFIG_OPENTHREAD_FTD || CONFIG_OPENTHREAD_MTD
CONFIG_OPENTHREAD_SPINEL_ONLY
Enable OpenThread External Radio Spinel feature
Found in: Component config > OpenThread
Select this option to enable the OpenThread Radio Spinel for external protocol stack, such as Zigbee.
- Default value:
-
-
No (disabled)
CONFIG_OPENTHREAD_RX_ON_WHEN_IDLE
Enable OpenThread radio capibility rx on when idle
Found in: Component config > OpenThread
Select this option to enable OpenThread radio capibility rx on when idle. |
Protocomm
Enable support of security version 2. Disabling this option saves some code size. Consult the Enabling protocomm security version section of the Protocomm documentation in ESP-IDF Programming guide for more details.
- Default value:
-
-
Yes (enabled)
PThreads
Contains:
CONFIG_PTHREAD_TASK_PRIO_DEFAULT
Default task priority
Found in: Component config > PThreads
Priority used to create new tasks with default pthread parameters.
- Range:
-
-
from 0 to 255
- Default value:
-
-
5
CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT
Default task stack size
Found in: Component config > PThreads
Stack size used to create new tasks with default pthread parameters.
- Default value:
-
-
3072
CONFIG_PTHREAD_STACK_MIN
Minimum allowed pthread stack size
Found in: Component config > PThreads
Minimum allowed pthread stack size set in attributes passed to pthread_create
- Default value:
-
-
768
CONFIG_PTHREAD_TASK_CORE_DEFAULT
Default pthread core affinity
Found in: Component config > PThreads
The default core to which pthreads are pinned.
Available options:
-
No affinity (CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY)
-
Core 0 (CONFIG_PTHREAD_DEFAULT_CORE_0)
-
Core 1 (CONFIG_PTHREAD_DEFAULT_CORE_1)
CONFIG_PTHREAD_TASK_NAME_DEFAULT
Default name of pthreads
Found in: Component config > PThreads
The default name of pthreads.
- Default value:
-
-
"pthread"
SoC Settings
Contains:
MMU Config
Main Flash configuration
Contains:
SPI Flash behavior when brownout
Contains:
CONFIG_SPI_FLASH_BROWNOUT_RESET_XMC
Enable sending reset when brownout for XMC flash chips
Found in: Component config > |
Available options:
-
Auto (Enable when bootloader support enabled (BOOTLOADER_FLASH_DC_AWARE)) (CONFIG_SPI_FLASH_HPM_DC_AUTO)
-
Disable (READ DOCS FIRST) (CONFIG_SPI_FLASH_HPM_DC_DISABLE)
CONFIG_SPI_FLASH_AUTO_SUSPEND
Auto suspend long erase/write operations (READ DOCS FIRST)
Found in: Component config > Main Flash configuration > Optional and Experimental Features (READ DOCS FIRST)
This option is disabled by default because it is supported only for specific flash chips and for specific Espressif chips. To evaluate if you can use this feature refer to Optional Features for Flash > Auto Suspend & Resume of the ESP-IDF Programming Guide.
|
If you want to OTA to an app with this feature turned on, please make sure the bootloader has the support for it. (later than IDF v4.3)
If you are using an official Espressif module, please contact Espressif Business support to check if the module has the flash that support this feature installed. Also refer to Concurrency Constraints for Flash on SPI1 > Flash Auto Suspend Feature before enabling this option.
SPI Flash driver
Contains:
CONFIG_SPI_FLASH_VERIFY_WRITE
Verify SPI flash writes
Found in: Component config > SPI Flash driver
If this option is enabled, any time SPI flash is written then the data will be read back and verified. This can catch hardware problems with SPI flash, or flash which was not erased before verification.
|
CONFIG_SPI_FLASH_YIELD_DURING_ERASE
Defines how many ticks will be before returning to continue a erasing.
CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE
Flash write chunk size
Found in: Component config > SPI Flash driver
Flash write is broken down in terms of multiple (smaller) write operations. This configuration options helps to set individual write chunk size, smaller value here ensures that cache (and non-IRAM resident interrupts) remains disabled for shorter duration.
CONFIG_SPI_FLASH_SIZE_OVERRIDE
Override flash size in bootloader header by ESPTOOLPY_FLASHSIZE
Found in: Component config > SPI Flash driver
SPI Flash driver uses the flash size configured in bootloader header by default. Enable this option to override flash size with latest ESPTOOLPY_FLASHSIZE value from the app header if the size in the bootloader header is incorrect.
CONFIG_SPI_FLASH_CHECK_ERASE_TIMEOUT_DISABLED
Flash timeout checkout disabled
Found in: Component config > SPI Flash driver
This option is helpful if you are using a flash chip whose timeout is quite large or unpredictable.
CONFIG_SPI_FLASH_OVERRIDE_CHIP_DRIVER_LIST
Override default chip driver list
Found in: Component config > SPI Flash driver
This option allows the chip driver list to be customized, instead of using the default list provided by ESP-IDF.
When this option is enabled, the default list is no longer compiled or linked. Instead, the default_registered_chips structure must be provided by the user.
See example: custom_chip_driver under examples/storage for more details.
Auto-detect flash chips
Contains:
CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP
ISSI
Found in: Component config > SPI Flash driver > Auto-detect flash chips
Enable this to support auto detection of ISSI chips if chip vendor not directly given by
chip\_drvmember of the chip struct. This adds support for variant chips, however will extend detecting time.
|
CONFIG_SPI_FLASH_SUPPORT_GD_CHIP
GigaDevice
Found in: Component config > SPI Flash driver > Auto-detect flash chips
Enable this to support auto detection of GD (GigaDevice) chips if chip vendor not directly given by
chip\_drvmember of the chip struct. If you are using Wrover modules, please don't disable this, otherwise your flash may not work in 4-bit mode.
This adds support for variant chips, however will extend detecting time and image size. Note that the default chip driver supports the GD chips with product ID 60H.
CONFIG_SPI_FLASH_SUPPORT_WINBOND_CHIP
Winbond
Found in: Component config > SPI Flash driver > Auto-detect flash chips
Enable this to support auto detection of Winbond chips if chip vendor not directly given by
chip\_drvmember of the chip struct. This adds support for variant chips, however will extend detecting time.
|
CONFIG_SPI_FLASH_SUPPORT_TH_CHIP
TH
Found in: Component config > SPI Flash driver > Auto-detect flash chips
Enable this to support auto detection of TH chips if chip vendor not directly given by
chip\_drvmember of the chip struct. This adds support for variant chips, however will extend detecting time.
CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE
Enable encrypted partition read/write operations
Found in: Component config > SPI Flash driver
This option enables flash read/write operations to encrypted partition/s. This option is kept enabled irrespective of state of flash encryption feature. However, in case application is not using flash encryption feature and is in need of some additional memory from IRAM region (~1KB) then this config can be disabled.
SPIFFS Configuration
Contains:
CONFIG_SPIFFS_MAX_PARTITIONS
Maximum Number of Partitions
Found in: Component config > SPIFFS Configuration
Define maximum number of partitions that can be mounted.
- Range:
-
-
from 1 to 10
- Default value:
-
-
3
SPIFFS Cache Configuration
Contains:
CONFIG_SPIFFS_CACHE
Enable SPIFFS Cache
Found in: Component config > SPIFFS Configuration > SPIFFS Cache Configuration
Enables/disable memory read caching of nucleus file system operations.
- Default value:
-
-
Yes (enabled)
CONFIG_SPIFFS_CACHE_WR
Enable SPIFFS Write Caching
Found in: Component config > SPIFFS Configuration > SPIFFS Cache Configuration > CONFIG_SPIFFS_CACHE
Enables memory write caching for file descriptors in hydrogen.
- Default value:
-
-
Yes (enabled)
CONFIG_SPIFFS_CACHE_STATS
Enable SPIFFS Cache Statistics
Found in: Component config > SPIFFS Configuration > SPIFFS Cache Configuration > CONFIG_SPIFFS_CACHE
Enable/disable statistics on caching. Debug/test purpose only.
- Default value:
-
-
No (disabled)
CONFIG_SPIFFS_PAGE_CHECK
Enable SPIFFS Page Check
Found in: Component config > SPIFFS Configuration
Always check header of each accessed page to ensure consistent state. If enabled it will increase number of reads from flash, especially if cache is disabled.
- Default value:
-
-
Yes (enabled)
CONFIG_SPIFFS_GC_MAX_RUNS
Set Maximum GC Runs
Found in: Component config > SPIFFS Configuration
|
Define maximum number of GC runs to perform to reach desired free pages.
- Range:
-
-
from 1 to 10000
- Default value:
-
-
10
CONFIG_SPIFFS_GC_STATS
Enable SPIFFS GC Statistics
Found in: Component config > SPIFFS Configuration
Enable/disable statistics on gc. Debug/test purpose only.
- Default value:
-
-
No (disabled)
CONFIG_SPIFFS_PAGE_SIZE
SPIFFS logical page size
Found in: Component config > SPIFFS Configuration
Logical page size of SPIFFS partition, in bytes. Must be multiple of flash page size (which is usually 256 bytes). Larger page sizes reduce overhead when storing large files, and improve filesystem performance when reading large files. Smaller page sizes reduce overhead when storing small (< page size) files.
- Range:
-
-
from 256 to 1024
- Default value:
-
-
256
CONFIG_SPIFFS_OBJ_NAME_LEN
Set SPIFFS Maximum Name Length
Found in: Component config > SPIFFS Configuration
Object name maximum length. Note that this length include the zero-termination character, meaning maximum string of characters can at most be SPIFFS_OBJ_NAME_LEN - 1.
SPIFFS_OBJ_NAME_LEN + SPIFFS_META_LENGTH should not exceed SPIFFS_PAGE_SIZE - 64.
- Range:
-
-
from 1 to 256
- Default value:
-
-
32
CONFIG_SPIFFS_FOLLOW_SYMLINKS
Enable symbolic links for image creation
Found in: Component config > SPIFFS Configuration
If this option is enabled, symbolic links are taken into account during partition image creation.
- Default value:
-
-
No (disabled)
CONFIG_SPIFFS_USE_MAGIC
Enable SPIFFS Filesystem Magic
Found in: Component config > SPIFFS Configuration
Enable this to have an identifiable spiffs filesystem. This will look for a magic in all sectors to determine if this is a valid spiffs system or not at mount time.
- Default value:
-
-
|
CONFIG_SPIFFS_USE_MAGIC
If this option is enabled, the magic will also be dependent on the length of the filesystem. For example, a filesystem configured and formatted for 4 megabytes will not be accepted for mounting with a configuration defining the filesystem as 2 megabytes.
- Default value:
-
-
Yes (enabled)
CONFIG_SPIFFS_META_LENGTH
Size of per-file metadata field
Found in: Component config > SPIFFS Configuration
This option sets the number of extra bytes stored in the file header. These bytes can be used in an application-specific manner. Set this to at least 4 bytes to enable support for saving file modification time.
SPIFFS_OBJ_NAME_LEN + SPIFFS_META_LENGTH should not exceed SPIFFS_PAGE_SIZE - 64.
- Default value:
-
-
4
CONFIG_SPIFFS_USE_MTIME
Save file modification time
Found in: Component config > SPIFFS Configuration
If enabled, then the first 4 bytes of per-file metadata will be used to store file modification time (mtime), accessible through stat/fstat functions. Modification time is updated when the file is opened.
- Default value:
-
-
Yes (enabled)
CONFIG_SPIFFS_MTIME_WIDE_64_BITS
The time field occupies 64 bits in the image instead of 32 bits
Found in: Component config > SPIFFS Configuration
If this option is not set, the time field is 32 bits (up to 2106 year), otherwise it is 64 bits and make sure it matches SPIFFS_META_LENGTH. If the chip already has the spiffs image with the time field = 32 bits then this option cannot be applied in this case. Erase it first before using this option. |
To resolve the Y2K38 problem for the spiffs, use a toolchain with 64-bit time_t support.
- Default value:
-
-
No (disabled) if CONFIG_SPIFFS_META_LENGTH >= 8
Debug Configuration
Contains:
CONFIG_SPIFFS_DBG
Enable general SPIFFS debug
Found in: Component config > SPIFFS Configuration > Debug Configuration
Enabling this option will print general debug mesages to the console.
- Default value:
-
-
No (disabled)
CONFIG_SPIFFS_API_DBG
Enable SPIFFS API debug
Found in: Component config > SPIFFS Configuration > Debug Configuration
Enabling this option will print API debug mesages to the console.
- Default value:
-
-
No (disabled)
CONFIG_SPIFFS_GC_DBG
Enable SPIFFS Garbage Cleaner debug
Found in: Component config > SPIFFS Configuration > Debug Configuration
Enabling this option will print GC debug mesages to the console.
- Default value:
-
-
No (disabled)
CONFIG_SPIFFS_CACHE_DBG
Enable SPIFFS Cache debug
Found in: Component config > SPIFFS Configuration > Debug Configuration
Enabling this option will print cache debug mesages to the console.
- Default value:
-
-
No (disabled)
CONFIG_SPIFFS_CHECK_DBG
Enable SPIFFS Filesystem Check debug
Found in: Component config > SPIFFS Configuration > Debug Configuration
Enabling this option will print Filesystem Check debug mesages to the console.
- Default value:
-
-
No (disabled)
CONFIG_SPIFFS_TEST_VISUALISATION
Enable SPIFFS Filesystem Visualization
Found in: Component config > SPIFFS Configuration > Debug Configuration
Enable this option to enable SPIFFS_vis function in the API.
- Default value:
-
-
No (disabled)
TCP Transport
Contains:
Websocket
Contains:
CONFIG_WS_TRANSPORT
Enable Websocket Transport
Found in: Component config > TCP Transport > Websocket
Enable support for creating websocket transport.
- Default value:
-
-
Yes (enabled)
CONFIG_WS_BUFFER_SIZE
Websocket transport buffer size
Found in: Component config > TCP Transport > |
CONFIG_WS_TRANSPORT
If enable this option, websocket transport buffer will be freed after connection succeed to save more heap.
- Default value:
-
-
No (disabled)
Ultra Low Power (ULP) Co-processor
Contains:
CONFIG_ULP_COPROC_ENABLED
Enable Ultra Low Power (ULP) Co-processor
Found in: Component config > Ultra Low Power (ULP) Co-processor
Enable this feature if you plan to use the ULP Co-processor. Once this option is enabled, further ULP co-processor configuration will appear in the menu.
- Default value:
-
-
No (disabled)
CONFIG_ULP_COPROC_TYPE
ULP Co-processor type
Found in: Component config > Ultra Low Power (ULP) Co-processor > CONFIG_ULP_COPROC_ENABLED
Choose the ULP Coprocessor type: ULP FSM (Finite State Machine) or ULP RISC-V.
Available options:
-
ULP FSM (Finite State Machine) (CONFIG_ULP_COPROC_TYPE_FSM)
-
ULP RISC-V (CONFIG_ULP_COPROC_TYPE_RISCV)
-
LP core RISC-V (CONFIG_ULP_COPROC_TYPE_LP_CORE)
CONFIG_ULP_COPROC_RESERVE_MEM
RTC slow memory reserved for coprocessor
Found in: Component config > Ultra Low Power (ULP) Co-processor > CONFIG_ULP_COPROC_ENABLED
Bytes of memory to reserve for ULP Co-processor firmware & data. Data is reserved at the beginning of RTC slow memory.
- Range:
-
-
from 32 to 8176 if CONFIG_ULP_COPROC_ENABLED
- Default value:
-
-
512 if CONFIG_ULP_COPROC_ENABLED
ULP RISC-V Settings
Contains:
CONFIG_ULP_RISCV_UART_BAUDRATE
Baudrate used by the bitbanged ULP RISC-V UART driver
Found in: Component config > Ultra Low Power (ULP) Co-processor > ULP RISC-V Settings
The accuracy of the bitbanged UART driver is limited, it is not recommend to increase the value above 19200.
- Default value:
-
-
9600 if CONFIG_ULP_COPROC_TYPE_RISCV
CONFIG_ULP_RISCV_I2C_RW_TIMEOUT
Set timeout for ULP RISC-V I2C transaction timeout in ticks.
Found in: Component config > Ultra Low Power (ULP) Co-processor > ULP RISC-V Settings
Set the ULP RISC-V I2C read/write timeout. |
The MPS limits for each biasing are listed below:
Balanced: - IN (all transfer types), 408 bytes - OUT non-periodic (Bulk/Control), 192 bytes (i.e., 3 x 64 byte packets) - OUT periodic (Interrupt/Isochronous), 192 bytes
Bias IN: - IN (all transfer types), 600 bytes - OUT non-periodic (Bulk/Control), 64 bytes (i.e., 1 x 64 byte packets) - OUT periodic (Interrupt/Isochronous), 128 bytes
Bias Periodic OUT: - IN (all transfer types), 128 bytes - OUT non-periodic (Bulk/Control), 64 bytes (i.e., 1 x 64 byte packets) - OUT periodic (Interrupt/Isochronous), 600 bytes
Available options:
-
Balanced (CONFIG_USB_HOST_HW_BUFFER_BIAS_BALANCED)
-
Bias IN (CONFIG_USB_HOST_HW_BUFFER_BIAS_IN)
-
Periodic OUT (CONFIG_USB_HOST_HW_BUFFER_BIAS_PERIODIC_OUT)
Root Hub configuration
Contains:
CONFIG_USB_HOST_DEBOUNCE_DELAY_MS
Debounce delay in ms
Found in: Component config > USB-OTG > |
Root Hub configuration
On connection of a USB device, the USB 2.0 specification requires a "debounce interval with a minimum duration of 100ms" to allow the connection to stabilize (see USB 2.0 chapter 7.1.7.3 for more details). During the debounce interval, no new connection/disconnection events are registered.
The default value is set to 250 ms to be safe.
- Default value:
-
-
250 if SOC_USB_OTG_SUPPORTED
CONFIG_USB_HOST_RESET_HOLD_MS
Reset hold in ms
Found in: Component config > USB-OTG > Root Hub configuration
The reset signaling can be generated on any Hub or Host Controller port by request from the USB System Software. The USB 2.0 specification requires that "the reset signaling must be driven for a minimum of 10ms" (see USB 2.0 chapter 7.1.7.5 for more details). After the reset, the hub port will transition to the Enabled state (refer to Section 11.5).
The default value is set to 30 ms to be safe.
- Default value:
-
-
30 if SOC_USB_OTG_SUPPORTED
CONFIG_USB_HOST_RESET_RECOVERY_MS
Reset recovery delay in ms
Found in: Component config > USB-OTG > Root Hub configuration
After a port stops driving the reset signal, the USB 2.0 specification requires that the "USB System Software guarantees a minimum of 10 ms for reset recovery" before the attached device is expected to respond to data transfers (see USB 2.0 chapter 7.1.7.3 for more details). The device may ignore any data transfers during the recovery interval.
The default value is set to 30 ms to be safe.
- Default value:
-
-
30 if SOC_USB_OTG_SUPPORTED
CONFIG_USB_HOST_SET_ADDR_RECOVERY_MS
SetAddress() recovery time in ms
Found in: Component config > USB-OTG > Root Hub configuration
"After successful completion of the Status stage, the device is allowed a SetAddress() recovery interval of 2 ms. At the end of this interval, the device must be able to accept Setup packets addressed to the new address. Also, at the end of the recovery interval, the device must not respond to tokens sent to the old address (unless, of course, the old and new address is the same)." |
See USB 2.0 chapter 9.2.6.3 for more details.
The default value is set to 10 ms to be safe.
- Default value:
-
-
10 if SOC_USB_OTG_SUPPORTED
CONFIG_USB_HOST_ENABLE_ENUM_FILTER_CALLBACK
Enable enumeration filter callback
Found in: Component config > USB-OTG
The enumeration filter callback is called before enumeration of each newly attached device. This callback allows users to control whether a device should be enumerated, and what configuration number to use when enumerating a device.
If enabled, the enumeration filter callback can be set via 'usb_host_config_t' when calling 'usb_host_install()'.
- Default value:
-
-
No (disabled) if SOC_USB_OTG_SUPPORTED
Virtual file system
Contains:
CONFIG_VFS_SUPPORT_IO
Provide basic I/O functions
Found in: Component config > Virtual file system
If enabled, the following functions are provided by the VFS component.
open, close, read, write, pread, pwrite, lseek, fstat, fsync, ioctl, fcntl
Filesystem drivers can then be registered to handle these functions for specific paths.
Disabling this option can save memory when the support for these functions is not required.
Note that the following functions can still be used with socket file descriptors when this option is disabled:
close, read, write, ioctl, fcntl.
- Default value:
-
-
|
CONFIG_VFS_SUPPORT_IO
If enabled, select function is provided by the VFS component, and can be used on peripheral file descriptors (such as UART) and sockets at the same time.
If disabled, the default select implementation will be provided by LWIP for sockets only.
Disabling this option can reduce code size if support for "select" on UART file descriptors is not required.
CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT
Suppress select() related debug outputs
Found in: Component config > Virtual file system > CONFIG_VFS_SUPPORT_IO > CONFIG_VFS_SUPPORT_SELECT
Select() related functions might produce an unconveniently lot of debug outputs when one sets the default log level to DEBUG or higher. It is possible to suppress these debug outputs by enabling this option.
- Default value:
-
-
|
Component config > Virtual file system > CONFIG_VFS_SUPPORT_IO
Define maximum number of virtual filesystems that can be registered.
- Range:
-
-
from 1 to 20
- Default value:
-
-
8
Host File System I/O (Semihosting)
Contains:
CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS
Host FS: Maximum number of the host filesystem mount points
Found in: Component config > Virtual file system > CONFIG_VFS_SUPPORT_IO > Host File System I/O (Semihosting)
Define maximum number of host filesystem mount points.
- Default value:
-
-
1
|
Wear Levelling
Sector size used by wear levelling library. You can set default sector size or size that will fit to the flash device sector size.
With sector size set to 4096 bytes, wear levelling library is more efficient. However if FAT filesystem is used on top of wear levelling library, it will need more temporary storage: 4096 bytes for each mounted filesystem and 4096 bytes for each opened file.
With sector size set to 512 bytes, wear levelling library will perform more operations with flash memory, but less RAM will be used by FAT filesystem library (512 bytes for the filesystem and 512 bytes for each file opened).
|
Wear Levelling
Specify the mode to store data into flash:
-
In Performance mode a data will be stored to the RAM and then stored back to the flash. Compared to the Safety mode, this operation is faster, but if power will be lost when erase sector operation is in progress, then the data from complete flash device sector will be lost.
-
In Safety mode data from complete flash device sector will be read from flash, modified, and then stored back to flash. Compared to the Performance mode, this operation is slower, but if power is lost during erase sector operation, then the data from full flash device sector will not be lost.
|
Available options:
-
Perfomance (CONFIG_WL_SECTOR_MODE_PERF)
-
Safety (CONFIG_WL_SECTOR_MODE_SAFE)
Wi-Fi Provisioning Manager
Contains:
CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES
Max Wi-Fi Scan Result Entries
Found in: Component config > Wi-Fi Provisioning Manager
This sets the maximum number of entries of Wi-Fi scan results that will be kept by the provisioning manager
- Range:
-
-
from 1 to 255
- Default value:
-
-
16
CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT
Provisioning auto-stop timeout
Found in: Component config > Wi-Fi Provisioning Manager
Time (in seconds) after which the Wi-Fi provisioning manager will auto-stop after connecting to a Wi-Fi network successfully.
- Range:
-
-
from 5 to 600
- Default value:
-
-
30
CONFIG_WIFI_PROV_BLE_BONDING
Enable BLE bonding
Found in: Component config > Wi-Fi Provisioning Manager
This option is applicable only when provisioning transport is BLE.
CONFIG_WIFI_PROV_BLE_SEC_CONN
Enable BLE Secure connection flag
Found in: Component config > Wi-Fi Provisioning Manager
Used to enable Secure connection support when provisioning transport is BLE.
- Default value:
-
-
Yes (enabled) if CONFIG_BT_NIMBLE_ENABLED
CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION
Force Link Encryption during characteristic Read / Write
Found in: Component config > Wi-Fi Provisioning Manager
Used to enforce link encryption when attempting to read / write characteristic
CONFIG_WIFI_PROV_KEEP_BLE_ON_AFTER_PROV
Keep BT on after provisioning is done
Found in: Component config > Wi-Fi Provisioning Manager
CONFIG_WIFI_PROV_DISCONNECT_AFTER_PROV
Terminate connection after provisioning is done
Found in: Component config > Wi-Fi Provisioning Manager > CONFIG_WIFI_PROV_KEEP_BLE_ON_AFTER_PROV
- Default value:
-
-
Yes (enabled) if CONFIG_WIFI_PROV_KEEP_BLE_ON_AFTER_PROV
CONFIG_WIFI_PROV_STA_SCAN_METHOD
Wifi Provisioning Scan Method
Found in: Component config > Wi-Fi Provisioning Manager
Available options:
-
All Channel Scan (CONFIG_WIFI_PROV_STA_ALL_CHANNEL_SCAN)
Scan will end after scanning the entire channel. This option is useful in Mesh WiFi Systems.
-
Fast Scan (CONFIG_WIFI_PROV_STA_FAST_SCAN)
Scan will end after an AP matching with the SSID has been detected.
CONFIG_IDF_EXPERIMENTAL_FEATURES
Make experimental features visible
Found in:
By enabling this option, ESP-IDF experimental feature options will be visible.
|
Protocol Communication
Overview
The Protocol Communication (protocomm) component manages secure sessions and provides the framework for multiple transports. The application can also use the protocomm layer directly to have application-specific extensions for the provisioning or non-provisioning use cases.
Following features are available for provisioning:
-
Communication security at the application level
-
protocomm_security0(no security)
-
protocomm_security1(Curve25519 key exchange + AES-CTR encryption/decryption)
-
protocomm_security2(SRP6a-based key exchange + AES-GCM encryption/decryption)
-
Proof-of-possession (support with protocomm_security1 only)
-
Salt and Verifier (support with protocomm_security2 only)
Protocomm internally uses protobuf (protocol buffers) for secure session establishment. Users can choose to implement their own security (even without using protobuf). Protocomm can also be used without any security layer.
Protocomm provides the framework for various transports:
Bluetooth LE
Wi-Fi (SoftAP + HTTPD)
Console, in which case the handler invocation is automatically taken care of on the device side. See Transport Examples below for code snippets.
Note that for protocomm_security1 and protocomm_security2, the client still needs to establish sessions by performing the two-way handshake. See Unified Provisioning for more details about the secure handshake logic.
Enabling Protocomm Security Version
The protocomm component provides a project configuration menu to enable/disable support of respective security versions. The respective configuration options are as follows:
-
Support
protocomm_security0, with no security: CONFIG_ESP_PROTOCOMM_SUPPORT_SECURITY_VERSION_0, this option is enabled by default.
-
Support
protocomm_security1with Curve25519 key exchange + AES-CTR encryption/decryption: CONFIG_ESP_PROTOCOMM_SUPPORT_SECURITY_VERSION_1, this option is enabled by default .
-
Support
protocomm_security2with SRP6a-based key exchange + AES-GCM encryption/decryption: CONFIG_ESP_PROTOCOMM_SUPPORT_SECURITY_VERSION_2.
Note
Enabling multiple security versions at once offers the ability to control them dynamically but also increases the firmware size.
SoftAP + HTTP Transport Example with Security 2
For sample usage, see wifi_provisioning/src/scheme_softap.c.
/ |
[] = {0xf7, 0x5f, 0xe2, 0xbe, 0xba, 0x7c, 0x81, 0xcd};
static const char sec2_verifier[] = {0xbf, 0x86, 0xce, 0x63, 0x8a, 0xbb, 0x7e, 0x2f, 0x38, 0xa8, 0x19, 0x1b, 0x35,
0xc9, 0xe3, 0xbe, 0xc3, 0x2b, 0x45, 0xee, 0x10, 0x74, 0x22, 0x1a, 0x95, 0xbe, 0x62, 0xf7, 0x0c, 0x65, 0x83, 0x50,
0x08, 0xef, 0xaf, 0xa5, 0x94, 0x4b, 0xcb, 0xe1, 0xce, 0x59, 0x2a, 0xe8, 0x7b, 0x27, 0xc8, 0x72, 0x26, 0x71, 0xde,
0xb2, 0xf2, 0x80, 0x02, 0xdd, 0x11, 0xf0, 0x38, 0x0e, 0x95, 0x25, 0x00, 0xcf, 0xb3, 0x3f, 0xf0, 0x73, 0x2a, 0x25,
0x03, 0xe8, 0x51, 0x72, 0xef, 0x6d, 0x3e, 0x14, 0xb9, 0x2e, 0x9f, 0x2a, 0x90, 0x9e, 0x26, 0xb6, 0x3e, 0xc7, 0xe4,
0x9f, 0xe3, 0x20, 0xce, 0x28, 0x7c, 0xbf, 0x89, 0x50, 0xc9, 0xb6, 0xec, 0xdd, 0x81, 0x18, 0xf1, 0x1a, 0xd9, 0x7a,
0x21, 0x99, 0xf1, 0xee, 0x71, 0x2f, 0xcc, 0x93, 0x16, 0x34, 0x0c, 0x79, 0x46, 0x23, 0xe4, 0x32, 0xec, 0x2d, 0x9e,
0x18, 0xa6, 0xb9, 0xbb, 0x0a, 0xcf, 0xc4, 0xa8, 0x32, 0xc0, 0x1c, 0x32, 0xa3, 0x97, 0x66, 0xf8, 0x30, 0xb2, 0xda,
0xf9, 0x8d, 0xc3, 0x72, 0x72, 0x5f, 0xe5, 0xee, 0xc3, 0x5c, 0x24, 0xc8, 0xdd, 0x54, 0x49, 0xfc, 0x12, 0x91, 0x81,
0x9c, 0xc3, 0xac, 0x64, 0x5e, 0xd6, 0x41, 0x88, 0x2f, 0x23, 0x66, 0xc8, 0xac, 0xb0, 0x35, 0x0b, 0xf6, 0x9c, 0x88,
0x6f, 0xac, 0xe1, 0xf4, 0xca, 0xc9, 0x07, 0x04, 0x11, 0xda, 0x90, 0x42, 0xa9, 0xf1, 0x97, 0x3d, 0x94, 0x65, 0xe4,
0xfb, 0x52, 0x22, 0x3b, 0x7a, 0x7b, 0x9e, 0xe9, 0xee, 0x1c, 0x44, 0xd0, 0x73, 0x72, 0x2a, 0xca, 0x85, 0x19, 0x4a,
0x60, 0xce, 0x0a, 0xc8, 0x7d, 0x57, 0xa4, 0xf8, 0x77, 0x22, 0xc1, 0xa5, 0xfa, 0xfb, 0x7b, 0x91, 0x3b, 0xfe, 0x87,
0x5f, 0xfe, 0x05, 0xd2, 0xd6, 0xd3, 0x74, 0xe5, 0x2e, 0x68, 0x79, 0x34, 0x70, 0x40, 0x12, 0xa8, 0xe1, 0xb4, 0x6c,
0xaa, 0x46, 0x73, 0xcd, 0x8d, 0x17, 0x72, 0x67, 0x32, 0x42, 0xdc, 0x10, 0xd3, 0x71, 0x7e, 0x8b, 0x00, 0x46, 0x9b,
0x0a, 0xe9, 0xb4, 0x0f, 0xeb, 0x70, 0x52, 0xdd, 0x0a, 0x1c, 0x7e, 0x2e, 0xb0, 0x61, 0xa6, 0xe1, 0xa3, 0x34, 0x4b,
0x2a, 0x3c, 0xc4, 0x5d, 0x42, 0x05, 0x58, 0x25, 0xd3, 0xca, 0x96, 0x5c, 0xb9, 0x52, 0xf9, 0xe9, 0x80, 0x75, 0x3d,
0xc8, 0x9f, 0xc7, 0xb2, 0xaa, 0x95, 0x2e, 0x76, 0xb3, 0xe1, 0x48, 0xc1, 0x0a, 0xa1, 0x0a, 0xe8, 0xaf, 0x41, 0x28,
0xd2, 0x16, 0xe1, 0xa6, 0xd0, 0x73, 0x51, 0x73, 0x79, 0x98, 0xd9, 0xb9, 0x00, 0x50, 0xa2, 0x4d, 0x99, 0x18, 0x90,
0x70, 0x27, 0xe7, 0x8d, 0x56, 0x45, 0x34, 0x1f, 0xb9, 0x30, 0xda, 0xec, 0x4a, 0x08, 0x27, 0x9f, 0xfa, 0x59, 0x2e,
0x36, 0x77, 0x00, 0xe2, 0xb6, 0xeb, 0xd1, 0x56, 0x50, 0x8e};
/* The example function for launching a protocomm instance over HTTP. |
*/
protocomm_t *start_pc()
{
protocomm_t *pc = protocomm_new();
/ * Endpoint UUIDs */
protocomm_ble_name_uuid_t nu_lookup_table [] = {
{"security_endpoint", 0xFF51},
{"echo_req_endpoint", 0xFF52}
};
/* Config for protocomm_ble_start(). */
protocomm_ble_config_t config = {
.service_uuid = {
/* LSB <---------------------------------------
* ---------------------------------------> MSB */
0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80,
0x00, 0x10, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
},
.nu_lookup_count = sizeof(nu_lookup_table)/sizeof(nu_lookup_table[0]),
.nu_lookup = nu_lookup_table
};
/ * Start protocomm layer on top of Bluetooth LE. |
*/
void stop_pc(protocomm_t *pc)
{
protocomm_remove_endpoint(pc, "echo_req_endpoint");
protocomm_unset_security(pc, "security_endpoint");
/ * Stop the Bluetooth LE protocomm service. */
protocomm_ble_stop(pc);
protocomm_delete(pc);
}
API Reference
Header File
This header file can be included with:
#include "protocomm.h"
This header file is a part of the API provided by the
protocommcomponent. To declare that your component depends on
protocomm, add the following to your CMakeLists.txt:
REQUIRES protocomm
or
PRIV_REQUIRES protocomm
Functions
-
protocomm_t *protocomm_new(void)
Create a new protocomm instance.
This API will return a new dynamically allocated protocomm instance with all elements of the protocomm_t structure initialized to NULL.
- Returns
protocomm_t* : |
No memory for allocating new instance
-
-
void protocomm_delete(protocomm_t *pc)
Delete a protocomm instance.
This API will deallocate a protocomm instance that was created using
protocomm_new().
- Parameters
pc -- [in] Pointer to the protocomm instance to be deleted
-
esp_err_t protocomm_add_endpoint(protocomm_t *pc, const char *ep_name, protocomm_req_handler_t h, void *priv_data)
Add endpoint request handler for a protocomm instance.
This API will bind an endpoint handler function to the specified endpoint name, along with any private data that needs to be pass to the handler at the time of call.
Note
An endpoint must be bound to a valid protocomm instance, created using
protocomm_new().
This function internally calls the registered
add_endpoint()function of the selected transport which is a member of the protocomm_t instance structure.
- Parameters
pc -- [in] Pointer to the protocomm instance
ep_name -- [in] Endpoint identifier(name) |
string
h -- [in] Endpoint handler function
priv_data -- [in] Pointer to private data to be passed as a parameter to the handler function on call. Pass NULL if not needed.
-
- Returns
ESP_OK : Success
ESP_FAIL : Error adding endpoint / Endpoint with this name already exists
ESP_ERR_NO_MEM : Error allocating endpoint resource
ESP_ERR_INVALID_ARG : Null instance/name/handler arguments
-
-
-
esp_err_t protocomm_remove_endpoint(protocomm_t *pc, const char *ep_name)
Remove endpoint request handler for a protocomm instance.
This API will remove a registered endpoint handler identified by an endpoint name.
Note
This function internally calls the registered
remove_endpoint()function which is a member of the protocomm_t instance structure.
- Parameters
pc -- [in] Pointer to the protocomm instance
ep_name -- [in] Endpoint identifier(name) string
-
- Returns
ESP_OK : Success
ESP_ERR_NOT_FOUND : Endpoint with specified name doesn't exist
ESP_ERR_INVALID_ARG : Null instance/name arguments
-
-
-
esp_err_t protocomm_open_session(protocomm_t *pc, uint32_t session_id)
Allocates internal resources for new transport session.
Note
An endpoint must be bound to a valid protocomm instance, created using
protocomm_new().
- Parameters
pc -- [in] Pointer to the protocomm instance
session_id -- [in] Unique ID for a communication session
-
- Returns
ESP_OK : Request handled successfully
ESP_ERR_NO_MEM : Error allocating internal resource
ESP_ERR_INVALID_ARG : Null instance/name arguments
-
-
-
esp_err_t protocomm_close_session(protocomm_t *pc, uint32_t session_id)
Frees internal resources used by a transport session.
Note
An endpoint must be bound to a valid protocomm instance, created using
protocomm_new().
- Parameters
pc -- [in] Pointer to the protocomm instance
session_id -- [in] Unique ID for a communication session
-
- Returns
ESP_OK : Request handled successfully
ESP_ERR_INVALID_ARG : Null instance/name arguments
-
-
-
esp_err_t protocomm_req_handle(protocomm_t *pc, const char *ep_name, uint32_t session_id, const uint8_t *inbuf, ssize_t inlen, uint8_t **outbuf, ssize_t *outlen)
Calls the registered handler of an endpoint session for processing incoming data and generating the response.
Note
An endpoint must be bound to a valid protocomm instance, created using
protocomm_new().
Resulting output buffer must be deallocated by the caller.
- Parameters
pc -- [in] Pointer to the protocomm instance
ep_name -- [in] Endpoint identifier(name) |
string
session_id -- [in] Unique ID for a communication session
inbuf -- [in] Input buffer contains input request data which is to be processed by the registered handler
inlen -- [in] Length of the input buffer
outbuf -- [out] Pointer to internally allocated output buffer, where the resulting response data output from the registered handler is to be stored
outlen -- [out] Buffer length of the allocated output buffer
-
- Returns
ESP_OK : Request handled successfully
ESP_FAIL : Internal error in execution of registered handler
ESP_ERR_NO_MEM : Error allocating internal resource
ESP_ERR_NOT_FOUND : Endpoint with specified name doesn't exist
ESP_ERR_INVALID_ARG : Null instance/name arguments
-
-
-
esp_err_t protocomm_set_security(protocomm_t *pc, const char *ep_name, const protocomm_security_t *sec, const void *sec_params)
Add endpoint security for a protocomm instance.
This API will bind a security session establisher to the specified endpoint name, along with any proof of possession that may be required for authenticating a session client.
Note
An endpoint must be bound to a valid protocomm instance, created using
protocomm_new().
The choice of security can be any
protocomm_security_tinstance. Choices
protocomm_security0and
protocomm_security1and
protocomm_security2are readily available.
|
string
sec -- [in] Pointer to endpoint security instance
sec_params -- [in] Pointer to security params (NULL if not needed) The pointer should contain the security params struct of appropriate security version. For protocomm security version 1 and 2 sec_params should contain pointer to struct of type protocomm_security1_params_t and protocmm_security2_params_t respectively. The contents of this pointer must be valid till the security session has been running and is not closed.
-
- Returns
ESP_OK : Success
ESP_FAIL : Error adding endpoint / Endpoint with this name already exists
ESP_ERR_INVALID_STATE : Security endpoint already set
ESP_ERR_NO_MEM : Error allocating endpoint resource
ESP_ERR_INVALID_ARG : Null instance/name/handler arguments
-
-
-
esp_err_t protocomm_unset_security(protocomm_t *pc, const char *ep_name)
Remove endpoint security for a protocomm instance.
This API will remove a registered security endpoint identified by an endpoint name.
- Parameters
pc -- [in] Pointer to the protocomm instance
ep_name -- [in] Endpoint identifier(name) string
-
- Returns
ESP_OK : Success
ESP_ERR_NOT_FOUND : Endpoint with specified name doesn't exist
ESP_ERR_INVALID_ARG : Null instance/name arguments
-
-
esp_err_t protocomm_set_version(protocomm_t *pc, const char *ep_name, const char *version)
Set endpoint for version verification.
This API can be used for setting an application specific protocol version which can be verified by clients through the endpoint.
Note
An endpoint must be bound to a valid protocomm instance, created using
protocomm_new().
- Parameters
pc -- [in] Pointer to the protocomm instance
ep_name -- [in] Endpoint identifier(name) |
[in] Version identifier(name) string
-
- Returns
ESP_OK : Success
ESP_FAIL : Error adding endpoint / Endpoint with this name already exists
ESP_ERR_INVALID_STATE : Version endpoint already set
ESP_ERR_NO_MEM : Error allocating endpoint resource
ESP_ERR_INVALID_ARG : Null instance/name/handler arguments
-
-
-
esp_err_t protocomm_unset_version(protocomm_t *pc, const char *ep_name)
Remove version verification endpoint from a protocomm instance.
This API will remove a registered version endpoint identified by an endpoint name.
- Parameters
pc -- |
string
-
- Returns
ESP_OK : Success
ESP_ERR_NOT_FOUND : Endpoint with specified name doesn't exist
ESP_ERR_INVALID_ARG : Null instance/name arguments
-
Type Definitions
-
typedef esp_err_t (*protocomm_req_handler_t)(uint32_t session_id, const uint8_t *inbuf, ssize_t inlen, uint8_t **outbuf, ssize_t *outlen, void *priv_data)
Function prototype for protocomm endpoint handler.
-
typedef struct protocomm protocomm_t
This structure corresponds to a unique instance of protocomm returned when the API
protocomm_new()is called. The remaining Protocomm APIs require this object as the first parameter.
Note
Structure of the protocomm object is kept private
Header File
This header file can be included with:
#include "protocomm_security.h"
This header file is a part of the API provided by the
protocommcomponent. To declare that your component depends on
protocomm, add the following to your CMakeLists.txt:
REQUIRES protocomm
or
PRIV_REQUIRES |
protocomm
Structures
-
struct protocomm_security1_params
Protocomm Security 1 parameters: Proof Of Possession.
-
struct protocomm_security2_params
Protocomm Security 2 parameters: Salt and Verifier.
-
struct protocomm_security
Protocomm security object structure.
The member functions are used for implementing secure protocomm sessions.
Note
This structure should not have any dynamic members to allow re-entrancy
Public Members
-
int ver
Unique version number of security implementation
-
esp_err_t (*init)(protocomm_security_handle_t *handle)
Function for initializing/allocating security infrastructure
-
esp_err_t (*cleanup)(protocomm_security_handle_t handle)
Function for deallocating security infrastructure
-
esp_err_t (*new_transport_session)(protocomm_security_handle_t handle, uint32_t session_id)
Starts new secure transport session with specified ID
-
esp_err_t (*close_transport_session)(protocomm_security_handle_t handle, uint32_t session_id)
Closes a secure transport session with specified ID
-
esp_err_t (*security_req_handler)(protocomm_security_handle_t handle, const void *sec_params, uint32_t session_id, const uint8_t *inbuf, ssize_t inlen, uint8_t **outbuf, ssize_t *outlen, void *priv_data)
Handler function for authenticating connection request and establishing secure session
-
esp_err_t (*encrypt)(protocomm_security_handle_t handle, uint32_t session_id, const uint8_t *inbuf, ssize_t inlen, uint8_t **outbuf, ssize_t *outlen)
Function which implements the encryption algorithm
-
esp_err_t (*decrypt)(protocomm_security_handle_t handle, uint32_t session_id, const uint8_t *inbuf, ssize_t inlen, uint8_t **outbuf, ssize_t *outlen)
Function which implements the decryption algorithm
- int ver
Type Definitions
-
typedef struct protocomm_security1_params protocomm_security1_params_t
Protocomm Security 1 parameters: Proof Of Possession.
-
typedef protocomm_security1_params_t protocomm_security_pop_t
-
typedef struct protocomm_security2_params protocomm_security2_params_t
Protocomm Security 2 parameters: Salt and Verifier.
-
typedef void *protocomm_security_handle_t
-
typedef struct protocomm_security protocomm_security_t
Protocomm security object structure.
The member functions are used for implementing secure protocomm sessions.
Note
This structure should not have any dynamic members to allow re-entrancy
Enumerations
-
enum protocomm_security_session_event_t
Events generated by the protocomm security layer.
These events are generated while establishing secured session.
|
Values:
-
enumerator PROTOCOMM_SECURITY_SESSION_SETUP_OK
Secured session established successfully
-
enumerator PROTOCOMM_SECURITY_SESSION_INVALID_SECURITY_PARAMS
Received invalid (NULL) security parameters (username / client public-key)
-
enumerator PROTOCOMM_SECURITY_SESSION_CREDENTIALS_MISMATCH
Received incorrect credentials (username / PoP)
- enumerator PROTOCOMM_SECURITY_SESSION_SETUP_OK
Header File
This header file can be included with:
#include "protocomm_security0.h"
This header file is a part of the API provided by the
protocommcomponent. |
To declare that your component depends on
protocomm, add the following to your CMakeLists.txt:
REQUIRES protocomm
or
PRIV_REQUIRES protocomm
Header File
This header file can be included with:
#include "protocomm_security1.h"
This header file is a part of the API provided by the
protocommcomponent. To declare that your component depends on
protocomm, add the following to your CMakeLists.txt:
REQUIRES protocomm
or
PRIV_REQUIRES protocomm
Header File
This header file can be included with:
#include "protocomm_security2.h"
This header file is a part of the API provided by the
protocommcomponent. To declare that your component depends on
protocomm, add the following to your CMakeLists.txt:
REQUIRES protocomm
or
PRIV_REQUIRES protocomm
Header File
This header file can be included with:
#include "esp_srp.h"
This header file is a part of the API provided by the
protocommcomponent. To declare that your component depends on
protocomm, add the following to your CMakeLists.txt:
REQUIRES protocomm
or
PRIV_REQUIRES |
protocomm
Functions
-
esp_srp_handle_t *esp_srp_init(esp_ng_type_t ng)
Initialize srp context for given NG type.
Note
the handle gets freed with
esp_srp_free
- Parameters
ng -- NG type given by
esp_ng_type_t
- Returns
esp_srp_handle_t* srp handle
-
void esp_srp_free(esp_srp_handle_t *hd)
free esp_srp_context
- Parameters
hd -- handle to be free
-
esp_err_t esp_srp_srv_pubkey(esp_srp_handle_t *hd, const char *username, int username_len, const char *pass, int pass_len, int salt_len, char **bytes_B, int *len_B, char **bytes_salt)
Returns B (pub key) and salt. |
Length of the public key
bytes_salt -- Salt bytes generated
-
- Returns
esp_err_t ESP_OK on success, appropriate error otherwise
-
esp_err_t esp_srp_gen_salt_verifier(const char *username, int username_len, const char *pass, int pass_len, char **bytes_salt, int salt_len, char **verifier, int *verifier_len)
Generate salt-verifier pair, given username, password and salt length.
Note
if API has returned ESP_OK, salt and verifier generated need to be freed by caller
Note
Usually, username and password are not saved on the device. Rather salt and verifier are generated outside the device and are embedded. this covenience API can be used to generate salt and verifier on the fly for development use case. OR for devices which intentionally want to generate different password each time and can send it to the client securely. e.g., a device has a display and it shows the pin
- Parameters
username -- |
[in] username
username_len -- [in] length of the username
pass -- [in] password
pass_len -- [in] length of the password
bytes_salt -- [out] generated salt on successful generation, or NULL
salt_len -- [in] salt length
verifier -- [out] generated verifier on successful generation, or NULL
verifier_len -- [out] length of the generated verifier
-
- Returns
esp_err_t ESP_OK on success, appropriate error otherwise
-
esp_err_t esp_srp_set_salt_verifier(esp_srp_handle_t *hd, const char *salt, int salt_len, const char *verifier, int verifier_len)
Set the Salt and Verifier pre-generated for a given password. This should be used only if the actual password is not available. The public key can then be generated using esp_srp_srv_pubkey_from_salt_verifier() and not esp_srp_srv_pubkey()
- Parameters
hd -- esp_srp_handle
salt -- pre-generated salt bytes
salt_len -- length of the salt bytes
verifier -- pre-generated verifier
verifier_len -- length of the verifier bytes
-
- Returns
esp_err_t ESP_OK on success, appropriate error otherwise
-
esp_err_t esp_srp_srv_pubkey_from_salt_verifier(esp_srp_handle_t *hd, char **bytes_B, int *len_B)
Returns B (pub key)[Step2.b] when the salt and verifier are set using esp_srp_set_salt_verifier()
Note
*bytes_B MUST NOT BE FREED BY THE CALLER
- Parameters
hd -- esp_srp handle
bytes_B -- |
This calculated session key is used for further communication given the proofs are exchanged/authenticated with
esp_srp_exchange_proofs
Note
*bytes_key MUST NOT BE FREED BY THE CALLER
- Parameters
hd -- esp_srp handle
bytes_A -- Private Key
len_A -- Private Key length
bytes_key -- Key returned to the caller
len_key -- length of the key in *bytes_key
-
- Returns
esp_err_t ESP_OK on success, appropriate error otherwise
-
esp_err_t esp_srp_exchange_proofs(esp_srp_handle_t *hd, char *username, uint16_t username_len, char *bytes_user_proof, char *bytes_host_proof)
Complete the authentication. If this step fails, the session_key exchanged should not be used.
This is the final authentication step in SRP algorithm [Step4.1, Step4.b, Step4.c]
- Parameters
hd -- esp_srp handle
username -- Username not expected NULL terminated
username_len -- Username length
bytes_user_proof -- param in
bytes_host_proof -- parameter out (should be SHA512_DIGEST_LENGTH) bytes in size
-
- Returns
esp_err_t ESP_OK if user's proof is ok and subsequently bytes_host_proof is populated with our own proof.
Type Definitions
-
typedef struct esp_srp_handle esp_srp_handle_t
esp_srp handle as the result of
esp_srp_init
The handle is returned by
esp_srp_initon successful init. It is then passed for subsequent API calls as an argument.
esp_srp_freecan be used to clean up the handle. After
esp_srp_freethe handle becomes invalid.
Enumerations
Header File
This header file can be included with:
#include "protocomm_httpd.h"
This header file is a part of the API provided by the
protocommcomponent. To declare that your component depends on
protocomm, add the following to your CMakeLists.txt:
REQUIRES protocomm
or
PRIV_REQUIRES protocomm
Functions
-
esp_err_t protocomm_httpd_start(protocomm_t *pc, const protocomm_httpd_config_t *config)
Start HTTPD protocomm transport.
This API internally creates a framework to allow endpoint registration and security configuration for the protocomm.
Note
This is a singleton. ie. Protocomm can have multiple instances, but only one instance can be bound to an HTTP transport layer.
- Parameters
pc -- |
protocomm transport.
This API cleans up the HTTPD transport protocomm and frees all the handlers registered with the protocomm.
- Parameters
pc -- [in] Same protocomm instance that was passed to protocomm_httpd_start()
- Returns
ESP_OK : Success
ESP_ERR_INVALID_ARG : Null / incorrect protocomm instance pointer
-
Unions
-
union protocomm_httpd_config_data_t
- #include <protocomm_httpd.h>
Protocomm HTTPD Configuration Data
Public Members
-
void *handle
HTTP Server Handle, if ext_handle_provided is set to true
-
protocomm_http_server_config_t config
HTTP Server Configuration, if a server is not already active
- void *handle
Structures
-
struct protocomm_http_server_config_t
Config parameters for protocomm HTTP server.
-
struct protocomm_httpd_config_t
Config parameters for protocomm HTTP server.
Public Members
-
bool ext_handle_provided
Flag to indicate of an external HTTP Server Handle has been provided. In such as case, protocomm will use the same HTTP Server and not start a new one internally.
-
protocomm_httpd_config_data_t data
Protocomm HTTPD Configuration Data
- bool ext_handle_provided
Macros
-
PROTOCOMM_HTTPD_DEFAULT_CONFIG()
Header File
This header file can be included with:
#include "protocomm_ble.h"
This header file is a part of the API provided by the
protocommcomponent. To declare that your component depends on
protocomm, add the following to your CMakeLists.txt:
REQUIRES protocomm
or
PRIV_REQUIRES |
Unified Provisioning
Overview
The unified provisioning support in the ESP-IDF provides an extensible mechanism to the developers to configure the device with the Wi-Fi credentials and/or other custom configuration using various transports and different security schemes. Depending on the use case, it provides a complete and ready solution for Wi-Fi network provisioning along with example iOS and Android applications. The developers can choose to extend the device-side and phone-app side implementations to accommodate their requirements for sending additional configuration data. The followings are the important features of this implementation:
Extensible Protocol
The protocol is completely flexible and it offers the ability for the developers to send custom configuration in the provisioning process. The data representation is also left to the application to decide.
|
Transport Flexibility
The protocol can work on Wi-Fi (SoftAP + HTTP server) or on Bluetooth LE as a transport protocol. The framework provides an ability to add support for any other transport easily as long as command-response behavior can be supported on the transport.
Security Scheme Flexibility
It is understood that each use case may require different security scheme to secure the data that is exchanged in the provisioning process. Some applications may work with SoftAP that is WPA2 protected or Bluetooth LE with the "just-works" security. Or the applications may consider the transport to be insecure and may want application-level security. The unified provisioning framework allows the application to choose the security as deemed suitable.
Compact Data Representation
The protocol uses Google Protobufs as a data representation for session setup and Wi-Fi provisioning. They provide a compact data representation and ability to parse the data in multiple programming languages in native format. Please note that this data representation is not forced on application-specific data and the developers may choose the representation of their choice.
|
The protocol requires the Salt and Verifier to be generated beforehand with the help of the identifying username
I and the plaintext password
p. The Salt and Verifier are then stored on ESP32.
The password
pand the username
Iare to be provided to the Phone App (Provisioning entity) by suitable means, e.g., QR code sticker.
Details about the Security 2 scheme are shown in the below sequence diagram:
Sample Code
Please refer to Protocol Communication and Wi-Fi Provisioning for API guides and code snippets on example usage.
Application implementation can be found as an example under provisioning.
|
Wi-Fi Provisioning
Overview
This component provides APIs that control the Wi-Fi provisioning service for receiving and configuring Wi-Fi credentials over SoftAP or Bluetooth LE transport via secure Protocol Communication sessions. The set of
wifi_prov_mgr_ APIs help quickly implement a provisioning service that has necessary features with minimal amount of code and sufficient flexibility.
Initialization
wifi_prov_mgr_init() is called to configure and initialize the provisioning manager, and thus must be called prior to invoking any other
wifi_prov_mgr_ APIs. Note that the manager relies on other components of ESP-IDF, namely NVS, TCP/IP, Event Loop and Wi-Fi, and optionally mDNS, hence these components must be initialized beforehand. The manager can be de-initialized at any moment by making a call to
wifi_prov_mgr_deinit().
|
wifi_prov_mgr_config_t config = { .scheme = wifi_prov_scheme_ble, .scheme_event_handler = WIFI_PROV_SCHEME_BLE_EVENT_HANDLER_FREE_BTDM }; ESP_ERROR_CHECK( wifi_prov_mgr_init(config) );
The configuration structure
wifi_prov_mgr_config_t has a few fields to specify the desired behavior of the manager:
-
wifi_prov_mgr_config_t::scheme- This is used to specify the provisioning scheme. Each scheme corresponds to one of the modes of transport supported by protocomm. Hence, support the following options:
-
wifi_prov_scheme_ble- Bluetooth LE transport and GATT Server for handling the provisioning commands.
-
wifi_prov_scheme_softap- Wi-Fi SoftAP transport and HTTP Server for handling the provisioning commands.
-
wifi_prov_scheme_console- Serial transport and console for handling the provisioning commands.
-
wifi_prov_mgr_config_t::scheme_event_handler: An event handler defined along with the scheme. Choosing the appropriate scheme-specific event handler allows the manager to take care of certain matters automatically. Presently, this option is not used for either the SoftAP or Console-based provisioning, but is very convenient for Bluetooth LE. To understand how, we must recall that Bluetooth requires a substantial amount of memory to function, and once the provisioning is finished, the main application may want to reclaim back this memory (or part of it) if it needs to use either Bluetooth LE or classic Bluetooth. Also, upon every future reboot of a provisioned device, this reclamation of memory needs to be performed again. To reduce this complication in using
wifi_prov_scheme_ble, the scheme-specific handlers have been defined, and depending upon the chosen handler, the Bluetooth LE/classic Bluetooth/BTDM memory is freed automatically when the provisioning manager is de-initialized. The available options are:
-
WIFI_PROV_SCHEME_BLE_EVENT_HANDLER_FREE_BTDM- Free both classic Bluetooth and Bluetooth LE/BTDM memory. Used when the main application does not require Bluetooth at all .
-
WIFI_PROV_SCHEME_BLE_EVENT_HANDLER_FREE_BLE- Free only Bluetooth LE memory. Used when main application requires classic Bluetooth .
-
WIFI_PROV_SCHEME_BLE_EVENT_HANDLER_FREE_BT- Free only classic Bluetooth. Used when main application requires Bluetooth LE. In this case freeing happens right when the manager is initialized.
-
WIFI_PROV_EVENT_HANDLER_NONE- Do not use any scheme specific handler. Used when the provisioning scheme is not Bluetooth LE, i.e., using SoftAP or Console, or when main application wants to handle the memory reclaiming on its own, or needs both Bluetooth LE and classic Bluetooth to function.
-
wifi_prov_mgr_config_t::app_event_handler(Deprecated) - It is now recommended to catch
WIFI_PROV_EVENTthat is emitted to the default event loop handler. See definition of
wifi_prov_cb_event_tfor the list of events that are generated by the provisioning service. Here is an excerpt showing some of the provisioning events:static void |
event_handler(void* arg, esp_event_base_t event_base, int event_id, void* event_data) { if (event_base == WIFI_PROV_EVENT) { switch (event_id) { case WIFI_PROV_START: ESP_LOGI(TAG, "Provisioning started"); break; case WIFI_PROV_CRED_RECV: { wifi_sta_config_t *wifi_sta_cfg = (wifi_sta_config_t *)event_data; ESP_LOGI(TAG, "Received Wi-Fi credentials" "\n\tSSID : %s\n\tPassword : %s", (const char *) wifi_sta_cfg->ssid, (const char *) wifi_sta_cfg->password); break; } case WIFI_PROV_CRED_FAIL: { wifi_prov_sta_fail_reason_t *reason = (wifi_prov_sta_fail_reason_t *)event_data; ESP_LOGE(TAG, "Provisioning failed!\n\tReason : %s" "\n\tPlease reset to factory and retry provisioning", (*reason == WIFI_PROV_STA_AUTH_ERROR) ? "Wi-Fi station authentication failed" : "Wi-Fi access-point not found"); break; } case WIFI_PROV_CRED_SUCCESS: ESP_LOGI(TAG, "Provisioning successful"); break; case WIFI_PROV_END: /* De-initialize manager once provisioning is finished */ wifi_prov_mgr_deinit(); break; default: break; } } }
The manager can be de-initialized at any moment by making a call to
wifi_prov_mgr_deinit().
Check the Provisioning State
Whether the device is provisioned or not can be checked at runtime by calling
wifi_prov_mgr_is_provisioned(). This internally checks if the Wi-Fi credentials are stored in NVS.
Note that presently the manager does not have its own NVS namespace for storage of Wi-Fi credentials, instead it relies on the
esp_wifi_ APIs to set and get the credentials stored in NVS from the default location.
If the provisioning state needs to be reset, any of the following approaches may be taken:
-
The associated part of NVS partition has to be erased manually
-
The main application must implement some logic to call
esp_wifi_APIs for erasing the credentials at runtime
-
The main application must implement some logic to force start the provisioning irrespective of the provisioning statebool provisioned = false; ESP_ERROR_CHECK( wifi_prov_mgr_is_provisioned(&provisioned) );
Start the Provisioning Service
At the time of starting provisioning we need to specify a service name and the corresponding key, that is to say:
-
A Wi-Fi SoftAP SSID and a passphrase, respectively, when the scheme is
wifi_prov_scheme_softap.
-
Bluetooth LE device name with the service key ignored when the scheme is
wifi_prov_scheme_ble.
Also, since internally the manager uses
protocomm, we have the option of choosing one of the security features provided by it:
-
Security 1 is secure communication which consists of a prior handshake involving X25519 key exchange along with authentication using a proof of possession
pop, followed by AES-CTR for encryption or decryption of subsequent messages.
-
Security 0 is simply plain text communication. In this case the
popis simply ignored.
See Unified Provisioning for details about the security features.
|
The response is in JSON format and looks like :
prov: { ver: v1.1, cap: [no_pop] }, my_app: { ver: 1.345, cap: [cloud, local_ctrl] },..... Here label
prov provides provisioning service version
ver and capabilities
cap. For now, only the
no_pop capability is supported, which indicates that the service does not require proof of possession for authentication. Any application-related version or capabilities are given by other labels, e.g.,
my_app in this example. These additional fields are set using
wifi_prov_mgr_set_app_info().
|