ticoti
January 28, 2025, 11:39am
1
Hi to everyone again! I've been dealing with PLC IDE in order to set up a ModbusTCP server. Works fine after read some examples.
Once running, it accepts up to three working sockets (three paralell clients). Is it possible to increase this value?
I found this answer for Arduino boards:
I'm using an Arduino Ethernet Shield 2 and the datasheet says that it supports up to eight simultaneous socket connections. My questions is what happens when there are more than eight connections, are the connections queued, waiting for a free socket or are they rejected?
But no luck on Opta on PLC IDE 1.0.3
steve9
January 28, 2025, 7:38pm
2
Hi, I'm not sure if this applies equally to the Opta as it does to the GIGA, but on the GIGA I needed to follow the instructions below to build a custom version of the libmbed.a library having added
"lwip.socket-max": 12,
"lwip.tcp-socket-max": 10,
to the mbed_app.json file.
{
"target_overrides": {
"*": {
"target.printf_lib": "std",
"platform.stdio-buffered-serial": false,
"platform.stdio-baud-rate": 115200,
"platform.default-serial-baud-rate": 115200,
"platform.callback-nontrivial": true,
"platform.all-stats-enabled": true,
"platform.memory-tracing-enabled": true,
"rtos.main-thread-stack-size": 32768,
"cordio.max-connections": 5,
"target.mbed_app_start": "0x8040000",
"target.macros_add": [
"METAL_INTERNAL",
"VIRTIO_DRIVER_ONLY",
"NO_ATOMIC_64_SUPPORT",
"METAL_MAX_DEVICE_REGIONS=2",
"RPMSG_BUFFER_SIZE=512"
]
This file has been truncated. show original
Why, with all the resources of these boards, Arduino took a conservative approach with some of the configuration is a mystery to me.
Contribute to arduino/ArduinoCore-mbed development by creating an account on GitHub.
1 Like
ledsyn
January 28, 2025, 7:58pm
3
Perhaps this can shed some insight:
tcp sockets memory usage Arduino