Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCP malforms the logging information. #7552

Closed
canisLupus1313 opened this issue Mar 31, 2022 · 5 comments · Fixed by #7570
Closed

TCP malforms the logging information. #7552

canisLupus1313 opened this issue Mar 31, 2022 · 5 comments · Fixed by #7570
Assignees

Comments

@canisLupus1313
Copy link
Contributor

Describe the bug A clear and concise description of what the bug is.

To Reproduce Information to reproduce the behavior, including:

  1. Git commit id 5eb973c
  2. IEEE 802.15.4 hardware platform nRF52840dk RCP + ot daemon
  3. Build steps build rcp + ot daemon
  4. Network topology two boards Leader + router

During RCP crash the log outputted in system journal from ot daemon show incorrect function. BSD TCP function. Looks like this macro is overloaded in https://github.com/openthread/openthread/blob/main/third_party/tcplp/bsdtcp/tcp.h#L46

/jenkins_workspace/workspace/st-fw-nrfconnect-thread_master_4/thread_test/test_objects/rcp_host_app_1_1/bin/ot-daemon[46278]: 00:01:03.614 [C] Platform------: Too many rcp failures, exiting
/jenkins_workspace/workspace/st-fw-nrfconnect-thread_master_4/thread_test/test_objects/rcp_host_app_1_1/bin/ot-daemon[46278]: 00:01:03.614 [C] Platform------: BSD TCP function() at radio_spinel_impl.hpp:2249: Failure

Excluding TCP with -DOT_EXCLUDE_TCPLP_LIB=ON DOT_CONFIG=my-posix-config.h doesn't seem to have any effect.

my-posix-config.h content

#include <openthread-core-posix-config.h>

/**
* @def OPENTHREAD_CONFIG_TCP_ENABLE
*
* Define as 1 to enable TCP.
*
*/
#ifndef OPENTHREAD_CONFIG_TCP_ENABLE
#define OPENTHREAD_CONFIG_TCP_ENABLE 0
#endif
@canisLupus1313
Copy link
Contributor Author

@samkumar Can You take a look?

@samkumar
Copy link
Contributor

samkumar commented Apr 5, 2022

Thanks for bringing this to my attention. This indeed looks like an issue --- I put in that #define statement in the original TCPlp code since it was necessary for the original platform I was developing it on. But I can absolutely see that it could be harmful in OpenThread. Tomorrow, I'll investigate this and determine the best way to remove this.

@samkumar
Copy link
Contributor

samkumar commented Apr 5, 2022

(Also, sorry for the delay --- I just saw this now!)

@marcorussi
Copy link

Hello all, sorry to chip in but I came across the exact same problem while testing RCP sample from Nordic nrfconnect SDK. After many experiments I finally got to a point where that error happens when I send dataset init new from ot-ctl to the ot-daemon connected to my nRF52840 RCP board.
Thank you.

@canisLupus1313
Copy link
Contributor Author

@marcorussi just to keep things separate please create separate issue, and i will be glad to help you.

@samkumar This also highlights one more problem this code was supposed to be cut out from compilation and somehow there are few artifacts left.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants