erpc
erpc copied to clipboard
tcp transport is not working on Linux if debug logging is disabled
After deep level of debugging, I figured out the accept() call is failed when client try to connect to the server. Then I changed the accept(serverSocket, &incomingAddress, &incomingAddressLength) call parameter to accept(serverSocket, 0, 0). Then it worked. Can you initialize the incomingAddress and incomingAddressLength to 0, and then pass as reference to accept() function. is it possible to initialize all the local function variable to zero as will as autogen variable?
Hello @SASIDHARAN-dot could you please provide your setup when the TCP transport is not working? I have tried to run erpc test in Linux (ubuntu 16.04) and does not face any issue. Thank you.
Hello @SASIDHARAN-dot , did you have a chance to read my last comment? Thank you.
yes. It didn't fail in linux may be its a high end processor. I tried on stm32 microcontroller it didn't work. Ensure setting this flag to zero #define TCP_TRANSPORT_DEBUG_LOG (0).
Hello @SASIDHARAN-dot , I am not able to reproduce the issue. Even when #define TCP_TRANSPORT_DEBUG_LOG (0) the erpc tests in Linux work fine. Could you kindly describe your use case? Have you setup the erpc communication between a PC running Linux and an MCU with Ethernet capability? What TCP/IP stack have been used on the MCU side? Or, have you been running erpc between two MPUs with embedded Linux running on them? Thank you for any details.
FYI: Similar/Same issue had also Chris Reed. If debug log were disabled, tcp stopped working for him. But it was many years ago and later i couldn't reproduce issue so i thought that it was fixed.
Hello Michal, The use case is communication between PC and MCU through USART. and the POSIX version for tcp stack is POSIX.1-2001
Hi @SASIDHARAN-dot how many cpu cycles does erpc consumes??