We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
rs-canopen-dump
When using rs-canopen-dump I frequently encountered these errors and the tool would exit:
read: can raw socket read: Resource temporarily unavailable
This is because a non-blocking socket is opened when using can_socket_open():
can_socket_open()
libcanopen/bin/rs-canopen-dump.c
Lines 49 to 50 in 6e4758b
An alternate approach is to use can_socket_open_timeout() with a timeout of 0 instead:
can_socket_open_timeout()
diff --git a/bin/rs-canopen-dump.c b/bin/rs-canopen-dump.c index 7b68661..7439799 100644 --- a/bin/rs-canopen-dump.c +++ b/bin/rs-canopen-dump.c @@ -47,7 +47,7 @@ main(int argc, char **argv) } /* Create the socket */ - if ((sock = can_socket_open(argv[1])) < 0) + if ((sock = can_socket_open_timeout(argv[1], 0)) < 0) { fprintf(stderr, "Error: Failed to create socket.\n"); return -1;
This is consistent with how rs-canopen-monitor operates:
rs-canopen-monitor
libcanopen/bin/rs-canopen-monitor.c
Lines 174 to 190 in 6e4758b
Thanks for your work on libcanopen.
libcanopen
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When using
rs-canopen-dump
I frequently encountered these errors and the tool would exit:This is because a non-blocking socket is opened when using
can_socket_open()
:libcanopen/bin/rs-canopen-dump.c
Lines 49 to 50 in 6e4758b
An alternate approach is to use
can_socket_open_timeout()
with a timeout of 0 instead:This is consistent with how
rs-canopen-monitor
operates:libcanopen/bin/rs-canopen-monitor.c
Lines 174 to 190 in 6e4758b
Thanks for your work on
libcanopen
.The text was updated successfully, but these errors were encountered: