0

I am using an ESP32 as my master and 10 ESP8266-07s are connected to the master that is in AP mode.

But I need at least 12 clients. Please help me to increase the number of clients the ESP32 can handle in AP mode.

I have read this article but it did not help me ESP32 AP max connections: 4 or 10?

2
  • have you considered ESP-NOW? it can handle more clients and traffic since it has lower overhead than wifi
    – dandavis
    Aug 29, 2018 at 15:41
  • esp-now is not secure to me.i think the better way is mesh.but its too force for me right now.so i add aother esp32 in my master and then connect both esp32 by serial to together.and then any of them can conect to 10 client and 1 on the esp32 control and calculate every thing
    – ehsan haji
    Sep 3, 2018 at 6:32

3 Answers 3

0

The max number of stations for SoftAP is a runtime setting available in Arduino.

ESP32 arduino WiFi library and esp8266 ESP8266WiFi library have it as last parameter in softAP() function which starts the SoftAP.

bool softAP(const char* ssid, const char* passphrase = NULL, 
    int channel = 1, int ssid_hidden = 0, int max_connection = 4);

esp8266 arduino doc

max_connection - optional parameter to set max simultaneous connected stations, from 0 to 8. Defaults to 4. Once the max number has been reached, any other station that wants to connect will be forced to wait until an already connected station disconnects.

ESP32 SDK doc

uint8_t max_connection Max number of stations allowed to connect in, default 4, max 10

1
  • this code is in the 254 i think,i changed it also.no result!!!
    – ehsan haji
    Sep 1, 2018 at 14:14
2

The SDK API documentation from Espressif directly notes:

uint8_t max_connection

Max number of stations allowed to connect in, default 4, max 4

EDIT

However, another area of the API documentation (The API Guide) notes:

max_connection

Currently, ESP32 Wi-Fi supports up to 10 Wi-Fi connections. If max_connection > 10, soft-AP defaults the value to 10.

2
  • strange. I do not believe this. it must be a copy-paste error (from esp8266 doc?). it has two processors
    – Juraj
    Aug 29, 2018 at 17:35
  • Perhaps so. I found another place in the API Guide which implies that 10 is the max. Aug 29, 2018 at 18:04
-1

If you use softAP, you can set the max number of connections to 16 I believe.

WiFi.softAP(const char* ssid, const char* passphrase, int channel, int ssid_hidden, int max_connection);
2
  • i use soft ap ,and realy thiscode,and changed the code max connection to 16,but didnt worked.is the chanel numer important?
    – ehsan haji
    Sep 1, 2018 at 3:48
  • i should do it,so i must try any idea which everyone suggest me
    – ehsan haji
    Sep 1, 2018 at 14:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.