Chapter 4. Software framework
• The RSSI obtained by esp_wifi_ap_get_sta_list is the average value over a period of time, not real-
time RSSI. The previous RSSI has a weight of 13, and the new RSSI has a weight of 3. The RSSI is updated
when it is or larger than 100ms, the old rssi_arg is used when updating as: rssi_avg = rssi_avg*13/16
+ new_rssi * 3/16.
4.10.80 Does ESP32 support FTM(Fine Timing Measurement)?
• No, it doesn't. FTM needs hardware support, but ESP32 doesn't have it.
• ESP32-S2 and ESP32-C3 can support FTM in hardware.
• ESP-IDF can support FTM from v4.3-beta1.
• For more information and examples of FTM, please refer to FTM.
4.10.81 When ESP32 is in STA+AP mode, how to specify whether using STA or AP in-
terface to send data?
Background:
The default network segment of ESP32 as AP is 192.168.4.x, and the network segment of the router to
which ESP32 as STA is connected is also 192.168.4.x. The PC connects to the same router and creates
a tcp server. In this case, the tcp connection between ESP32 as tcp client and PC as tcp server cannot
be established successfully.
Solutions:
• It is possible for ESP32 to specify whether to use STA or AP interface for data transmission. Please
see example tcp_client_multi_net, in which both ethernet and station interface are used and each
can be specified for data transmission.
• There are two ways to bind socket to an interface:
– use netif name (use socket option SO_BINDTODEVICE)
– use netif local IP address (get IP address of an interface via esp_netif_get_ip_info(), then call
bind())
Note:
• The tcp connection between ESP32 and PC can be established when an ESP32 is bound to the STA interface,
while the connection cannot be established when it is bound to the AP interface.
• By default, the tcp connection between ESP32 and mobile phone can be established(the mobile phone as a
station is connected to ESP32).
4.10.82 ESP8266 wpa2_enterprise How to enable Wi-Fi debugging function?
• Open menuconfig via idf.py menuconfig and configure the following parameters:
menuconfig==>Component config ==>Wi-Fi
[*]Enable WiFi debug log ==>The DEBUG level is enabled (Verbose)
[*]WiFi debug log submodule
[*] scan
[*] NET80211
[*] wpa
[*] wpa2_enterprise
menuconfig==>Component config ==>Supplicant
[*] Print debug messages from WPA Supplicant
Espressif Systems
==>
142
Submit Document Feedback
==>
Release master
Need help?
Do you have a question about the ESP and is the answer not in the manual?