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,400
  • 1
  • 9
  • 25
  • I have no idea but have you tried connecting 5 clients to a simple service? I think it was 4 on a 3866 so I would lean towards 10 on a ESP32. – Code Gorilla Jul 16 '18 at 12:21
  • I don't have enough wireless devices at my disposal right now, hard though it is to believe. – CharlieHanson Jul 16 '18 at 12:26
  • Please see my findings (march 2020) here : https://arduino.stackexchange.com/questions/72845/increasing-esp32-ap-max-connections/73143#73143 – stefanu Mar 11 '20 at 05:48

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,617
  • 1
  • 14
  • 31