I need my ESP8266 to be an access point and command multiplexer to more devices. I need at 5 to 7 devices - 4 to 6 slaves and one master that sends them commands by TCP/IP and receives responses. I can't broadcast UDP, and commands must be sent to all nodes in less than 250ms.

The issue is that by default ESP8266 doesn't allow more than 4 connections. There are a compile-time variable max_connections set to 4. Some say that this limit can be set to 8, but ESP8266 won't support more sockets than 5. I'm here to ask: is there any way to surpass that limit? I have three possibilities on how to do that:

  • Somehow configure ESP8266 that it can support more connections - perhaps it's just a question of reserved resources? Maybe somewhere in the firmware, there is another limit that can be changed? Disconnect one socket and connect another device in its place - will this be reliable?
  • Use something else - but what? I need something small and fairly cheap. Other platforms I considered:
    • Arduino YUN - too big and quite expensive, unsure about the limit of clients
    • CC3000 - doesn't support AP mode
    • Onion Omega - unavailable and unsure about the limit of clients
    • Raspberry PI 3 - too expensive and too big
    • Raspberry PI Zero + WiFi dongle - PI Zero is unavailable below 10x it's official price
    • Intel Edison - verified it works, but is very expensive
    • Sparkfun Particle P0/P1 - not sure if AP mode is controllable and what is the limit of clients

    I could do with a very small embedded router and an ESP8266 to control it - but can't find any such part either.

    3. There is also one solution that I really don't want to do, but have considered it - stacking ESP's - I can do that, but this will be a very big hack and will make large problems with connecting devices to this monstrosity - must make more than one wifi network, will have to keep track how many devices are connected to each network etc.

    Could you please tell me if #1 is possible? If not, any recommendations on #2?

    More Md Ziaul Haque Zim's questions See All
    Similar questions and discussions