I’m working with crank StoryBoard and I’m trying to send a message over TCP with there iogen tools It seems that I can’t open a socket if I’m going from PC to verdin board, or vise versa. Back when torizon was in the 5.0s I didn’t have any issues. This seems to be a 6+ issue. I’ll load torizon 5 and confirm.
Here are the basics
On my verdin board I open a tcp socket to listen
I send a test message to the port from the verdin board. It works
I send the message from my PC and it does not open the socket.
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Based on the context provided, there is no specific information about TCP socket issues related to Torizon 6 or any changes from Torizon 5 to Torizon 6 that might affect TCP communication. However, here are a few general troubleshooting steps you might consider:
Firewall/Network Configuration: Ensure that there are no firewall rules or network configurations on either the Verdin board or the PC that might be blocking the TCP connection.
Port Availability: Double-check that the port you are trying to use is not being used by another service and is open for communication.
Software Changes: Since you mentioned that this issue did not occur with Torizon 5, consider any changes in the network stack or security settings in Torizon 6 that might affect socket communication.
Logs and Diagnostics: Check system logs on both the Verdin board and the PC for any error messages or warnings that might provide more insight into why the socket is not opening.
Network Tools: Use network diagnostic tools like netstat or ss to verify that the socket is indeed listening on the Verdin board and to check the state of the connection.
If these steps do not resolve the issue, further investigation into the specific differences between Torizon 5 and Torizon 6 regarding network handling might be necessary. Unfortunately, without more detailed context or documentation, I cannot provide a more specific solution.
Please, also check if these links can help you solve your problem:
It sounds like you may know the solution points towards working with the StoryBoard. A bit strange it that it worked on BSP 5 and then it did not? Keep us in the loop.
Almost:
Attached are my compose and make files. I think it has something to do with a compiled library it needs to use. The libgreio-tcp.so is the lib that allows the TCP to work correctly. I’m confused because tcp from with in the program works, but not from the program to the rest of the container. I thought the Makefile would take care of that. Any ideas?
Summery
Using channel names between C program and SBIO utility in the same container works
Using TCP between C program and SBIO utility in the same container does not work
Issue:
Can not open tcp socket from with in C++ application.
Using Crank storyboard SBIO interface.
What I’ve tried:
Making 2 identical containers that has the SBIO utilities iogen and iorcv.
Container 1 – does an “iorcv tcp://50001”
Container 2 – does an “iogen tcp://50001 - test_channel” 1u1:value 55
Result – This works
Running my c++ program in a container with a thread that opens tcp://50001 and one that writes to tcp://50001
Thread 1 – opens tcp://50001
Thread 2 – writes to tcp://50001, loops till it can open a socket, then writes
Result – this works
Running my c++ program in a container, but jumping into the container and using the SBIO utilities
C program launched (container is made)
Open up a terminal window
Used docker exec -it bash to enter the container.
Used “iorcv tcp://50001” to open a channel
Opened a 2nd terminal
Used docker exec -it bash to enter the container.
Used “iogen tcp://50001 - test_channel” 1u1:value 55 to write
Result – this works
Open a channel name from my C++ program, and write to it with iogen, with in the same container.
C++ program launched (container is made), the program waits for incoming message. Just like Thread 1 in number (2), but instead if “tcp://50001” the channel is “hello”
Open up a terminal window
Used docker exec -it bash to enter the container.
Used “iogen hello - test_channel” 1u1:value 55 to write
Result – This worked
Writing to a tcp socket from my C++ program, with in the same container
C++ program launched (container is made), the program loops until is can open a socket. Just like Thread 2 in number (2)
Open up a terminal window
Used docker exec -it bash to enter the container.
Used “iorcv tcp://50001” to open a channel
Result – This does not work
C++ program errors out “send_handle is NULL”
Open a socket from my C++ program, and write to it with iogen, with in the same container.
C++ program launched (container is made), the program waits for incoming message. Just like Thread 1 in number (2)
Open up a terminal window
Used docker exec -it bash to enter the container.
Used “iogen tcp://50001 - test_channel” 1u1:value 55 to write
Result – This does not work
Sending Channel - Error calling connect(), error = 111
Can’t open send handle [tcp://50001] error 111
Everything works when I run the release container.
Debug container does not work. I really need to debug, does anyone know why the debug container would effect the tcp? and how to fix it?
For the case that does not work. Such as points 24 to 29. Does this happen after 1 through 23? Or can you create this event from the the start of the container build?
Also for this case. Are you launching two containers, For ‘Container One’ that is running your C++ program to open a socket, (can you verify this?) And are entering into the same “container one” to open a channel? Are you able to post more full logs.
And for this case, you are saying this will not work on the debug container, but when you build/test the release containers this works as expected?
Looks like my post got re-formatted an it’s not really clear what I was doing. I did not number things like that. Lets take it from where I’m at and what issue I still have.
What I have:
a) A container that opens a tcp socket and listens on it. This container is running Crank Storyboard
b) A container that gets created from VS code. This is my C++ application. I can make a debug container, which I can add break points to VS Code. I can also make a non-debug (release) container which just runs on my target.
The Issue:
When I run the debug container I can not send data to the Storyboard container. However, when I run as a release container, everything works. Only thing between working and non working, is weather not I’m release or debug. It seems like the debugger does not allow other TCP sockets to be used.
Thanks for the clarity. It does sound like its a port conflict between the debugging container and the application. On the Crank Storyboard side, do you know the port number you are using?