EasyManuals Logo

Espressif Systems ESP User Manual

Default Icon
191 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #113 background imageLoading...
Page #113 background image
Chapter 4. Software framework
Does ES32 support PPP functionality?
Yes, please refer to esp_modem example.
Every time ESP32 attempts to read 4 KB of data with read and recv APIs in the socket, it can not always
read the 4 KB of data. Why?
Both read and recv APIs are used to read the data in the underlying bu󰝗er. For example, if there are 100
bytes of data in the underlying bu󰝗er, and the len size passed in by read and recv is only 50, then the API
will return after it reads 50 bytes. If len exceeds the length of the data received in the underlying bu󰝗er, say
200, the API will return after it reads 100 bytes and will not wait until it receives 200 bytes. So, an attempt to
read 4 KB of data will not necessarily return 4 KB of data, but only the data available in the underlying bu󰝗er
at the time of reading.
If you need to read 4 KB of data every time, it is recommended to use application code on top of the socket
layer to design the corresponding logic, which reads data recursively until it reaches 4 KB.
What is the version of lwIP currently used in ESP-IDF?
lwIP v2.1.3 is used currently.
In DHCP mode, will ESP32 renew the IP or apply for a new IP when the lease expires?
There are two lease periods, T1 (1/2 time of the lease) and T2 (7/8 time of the lease) in DHCP mode.
When both lease expires, ESP32 usually renews the same IP. Only when both of them fail to renew will
ESP32 apply for a new IP.
Why does ESP-IDF report an error when SO_SNDBUF option of setsockopt are used to get or set the size
of the send buer?
By default, lwIP does not support SO_SNDBUF. To set the send bu󰝗er size, go to menuconfig ->
Component config
->
LWIP
->
TCP
->
Default send buffer size
. To get or set the
receive bu󰝗er size, you need to enable the CONFIG_LWIP_SO_RCVBUF option in menucon󰝘g before
you can use the SO_RCVBUF option of setsockopt to get or set the receive bu󰝗er size.
I nd that the network data latency of TCP & UDP is large when testing ESP-IDF. What is the buering
data mechanism of TCP & UDP protocols?
For TCP, there is TCP_NODELAY option in socket option. You can enable this option to disable the Nagle
algorithm which is enabled by default, so that the data will not be cached locally and then sent together.
For UDP, UDP data is sent directly. If there is any delay, it is because of the delay of the Wi-Fi network
environment, not the UDP itself.
If TCP retransmission is caused by poor network environment, and the transmission interval is set too long,
high latency will occur. You can try to shorten the RTO value (by modifying component config -> lwip
-> tcp -> Default TCP rto time and TCP timer interval options in menucon󰝘g).
Espressif Systems 96
Submit Document Feedback
Release master

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Espressif Systems ESP and is the answer not in the manual?

Espressif Systems ESP Specifications

General IconGeneral
BrandEspressif Systems
ModelESP
CategoryMotherboard
LanguageEnglish