5-socket limit on Pico as well? #13022
-
|
Anyone know where the limit of 5 sockets originates from? I came across it on the ESP8266, but I thought it was due to the limited RAM. Now I find that 5 is the limit on the Pico W as well : `
I have 12 LED's on my network monitor I'd like to activate simultaneously... :-) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
In lwip/opt.h /**
* MEMP_NUM_TCP_PCB: the number of simultaneously active TCP connections.
* (requires the LWIP_TCP option)
*/
#if !defined MEMP_NUM_TCP_PCB || defined __DOXYGEN__
#define MEMP_NUM_TCP_PCB 5
#endifYou can override this if you build your own firmware by adding it to |
Beta Was this translation helpful? Give feedback.
-
|
Looking into this, making the associated change and noticing that a TCP socket has a fixed RAM cost of about 196 bytes is there any reason we couldn't raise this to 10 or 20 sockets on Pico W/Pico 2 W? I found that using keepalives and holding sockets open for API requests saves the periodic 300-400ms blocking calls needed to negotiate TLS, but when you're holding sockets open for multiple APIs you run out pretty quickly. Granted I think most people run into this limit because they forgot to call |
Beta Was this translation helpful? Give feedback.
In lwip/opt.h
You can override this if you build your own firmware by adding it to
ports/rp2/lwip_inc/lwipopts.h