4

I am using the SoftAP feature of the ESP to create a central node, and connecting five or six clients in the final application. However, I don't know if i can connect that many clients.

One of the core files on GitHub, esp_wifi_types.h shows two conflicting lines:

#line 215, as a member of the 'wifi_ap_config_t' struct
uint8_t max_connection; /**< Max number of stations allowed to connect in, default 4, max 4 */

#line 254
#define ESP_WIFI_MAX_CONN_NUM (10) /**< max number of stations which can connect to ESP32 soft-AP */

So is it four or ten? Or something else? Any advice by somebody who's tried this would be appreciated.

esp_wifi_types.h on GitHub

CharlieHanson
  • 1,430
  • 1
  • 11
  • 25

1 Answers1

2

The answer is as clear as any other EspressIf configuration data, it is 4 or maybe 5, or 8, or 12, 16 or even 20 (the same as a ESP8266!)

To clarify, it seems that around 2015 the maximum was 4 connections, but it is possible to recompile the SDK to support up to 16 connections. There doesn't seem to be a #define of flag that will let a programmer control this.

These links may guide you to a proper solution: https://github.com/esp8266/Arduino/issues/570 or https://myesp8266.blogspot.com/2016/11/esp32-increase-maximum-number-of-sockets.html

Code Gorilla
  • 5,652
  • 1
  • 17
  • 31