On ESP32 call of socket(AF_INET,.....) returns a socket ID + an offset(named LWIP_SOCKET_OFFSET)
This results in an error message during check of socket against maxsize (32)
Is there any limitation inside Espruino for socket ID, except this assert, for range of sockets ?
With other words, is this socket ID used somewhere in Espruino, for example as a pointer to an array ?
Please can you link to github source so there is some reference.
The first socket does start at zero I would have thought. The inbuilt telnet server I would expect will be using the first socket.
The number of sockets is set in the sdkconfig file (menuconfig)
One of the last changes was an increase from 4 to 10:
I'm not sure where the 32 you refer to comes from?
Are you running out of sockets?
in libs/network/network.c, line 671
For ESP32 just got an answer from ESP_Angus here https://esp32.com/viewtopic.php?f=13&t=3941
Before doing changes in network.c, I would like to get a feedback from Gordon.
We could add an #if USE_ESP32 and have a 2nd ASSERT for ESP32 only
This check was in there because we used to keep track of which sockets had TLS with bits inside a 32 bit integer (using BITFIELD_SET). I'm pretty sure that's all been removed now we pass socketType through, so these checks could be taken out? I don't believe there's any reason to restrict the value of the socket handle at all now.
could you please create a list of all changes to sdkconfig, you did for ESP32 ?
It would help to stay on same track as you are during implementation of bluetooth
I would then add this to ESP32-docu on github
@gordon, wilberforce, removed the assert for testing. At least Espruino now starts without problems and BLE is running. Some more testing needs to be done, but there is light ....
The ask config are documented as part of the guild tools here:
Tried to compare your sdkConfig with actual and found tons of differences.
Most of them are new to or replaced in V3
There are some left, which could have been changed by you.
Could you please check this list, and mark those, which are changed by you
I would recommend, we build a sdkconfig.default for Espruino. This would make it easy to follow changes in esp-idf
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem