Skip to content

CONFIG_LWIP_MAX_SOCKETS=10 is too small #5699

Closed
@BbIKTOP

Description

@BbIKTOP

Well, I'm trying to make a HAP device with the Espressif hap, Espressif arduino and Espressif idf.
The problem I experienced is:

  1. Default CONFIG_LWIP_MAX_SOCKETS is set to 10
  2. No lwip sources provided with arduino core
  3. Homekit opens a persistent connection to each client. So, in average family, there are 10-15 devices connected simultaneously. I tested with my own 6 and ran into this problem.
  4. I also use WebServer (which built on WiFiServer), and by default it consumes, as far as I remember, 5 sockets. But no matter, even without the WiFiServer it is a problem, because 7 connected HAP clients surely ain't enough for real purposes. So, in my case, with the default configuration and 6 connected hap clients, any access to the WiFiServer leads to lwip_accept fails with errno 23.

It's a bit strange, that Espressif products don't work together. Even more, the main esp32's advantage is the networking, but 10 sockets is just a joke in this sense.

Proposed fixes:

  1. Include lwip sources, so any user could configure the required sockets amount and range (not default 1-16, but more reasonable 1-20 or maybe 1-30 as lwip has no such limit)
    It would probably lead to the need to add the whole IDF sources, but I'm not sure

  2. Include different precompiled liblwip.a versions, like with 10 (current value), 16 (current menuconfig max value) and 20 or even 30 CONFIG_LWIP_MAX_SOCKETS

Maybe you could propose better, I don't know, sorry.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions