erpc icon indicating copy to clipboard operation
erpc copied to clipboard

tcp transport is not working on Linux if debug logging is disabled

Open SASIDHARAN-dot opened this issue 5 years ago • 7 comments

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?

SASIDHARAN-dot avatar Dec 13 '19 23:12 SASIDHARAN-dot

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.

MichalPrincNXP avatar Jan 21 '20 15:01 MichalPrincNXP

Hello @SASIDHARAN-dot , did you have a chance to read my last comment? Thank you.

MichalPrincNXP avatar Feb 28 '20 12:02 MichalPrincNXP

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).

SASIDHARAN-dot avatar Mar 16 '20 06:03 SASIDHARAN-dot

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.

MichalPrincNXP avatar Apr 09 '20 21:04 MichalPrincNXP

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.

Hadatko avatar Apr 10 '20 05:04 Hadatko

Hello Michal, The use case is communication between PC and MCU through USART. and the POSIX version for tcp stack is POSIX.1-2001

SASIDHARAN-dot avatar May 29 '20 07:05 SASIDHARAN-dot

Hi @SASIDHARAN-dot how many cpu cycles does erpc consumes??

Arunram241196 avatar Jun 05 '20 17:06 Arunram241196