-
Notifications
You must be signed in to change notification settings - Fork 49
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
EtherNet/IP Adapter with FANUC using CIPster failing in Forward Open request #42
Comments
This is a support request, and not yet known to be an issue (aka bug report). It would have been better posted to the discussion section. However I respond: The Fanuc implementation of Ethernet/IP is somewhat limited. I know we have installs where we have had success talking with it, but its been months and my memory is not clear regarding the difficulties. To paraphrase the problem, try and relate this to the situation: the spec can say "all of the above is ok", yet Fanuc will only support a very specific subset of all of the above. I was not impressed with their implementation, and even less impressed with the support that was unavailable to my customer from them. To make a guess, I think the format or sequence of SockAddr fields in one of our replies was bothering them, even though you could clearly see we were within spec. I would start by bringing in wireshark. The packet decoding within that tool is very good for EIP. Perhaps it will show some kind of disagreement. You should be able to see both directions of traffic. On linux we just fire up tcpdump, create a capture file, and then transfer it to a desktop for examination by wireshark later. Attached is a script we use to fire up tcpdump. If that shows nothing, then I'd ask on an EIP forum about the brain dead or old form of the SockAddr sequence that this robot can handle. You could dumb down the code to work around the problem most likely. |
EtherNet/IP makes use of well known TCP port number 44818 for explicit messagingand UDP port number 2222 for implicit messagingtcpdump tutorial:https://danielmiessler.com/study/tcpdump/INTERFACE=any FILE=/tmp/eip.cap rm "$FILE" 2> /dev/null tcpdump -nn -i $INTERFACE -w "$FILE" 'udp port 2222 or tcp port 44818' |
Thanks for your reply! I tried Wireshark and to be honest, I do not see anything special there. There is a proper request-response sequence of List Services, Register Session and Forward Open. After the last one the robot just sends TCP RST to my adapter and that's it. |
Update: I made it work. We have to send the O->T Saii in the forward open reply even if we are using standard 0x08AE port. Now FANUC robot connects properly to my adapter using CIPster library. I made a proper pull request for next generations. |
I am trying to write a C++ EtherNet/IP Adapter that will communicate with a FANUC robot configured as a Scanner. Unfortunatelly, after exchanging 3 messages I get
recv() error: Connection reset by peer
and I don't know why. It seems that the robot for some reason refuses the Forward Open response, even if on the C++ side everything works fine.My code is in general very similar to the code from sample_application, configured to work with the robot.
From my
BeforeAssemblyDataSend
method I tried returning true, false, writing something in my buffer or not doing anything - each time without luck.My Scanner configuration on the robot side is:
When I set the connection Enable to TRUE, I get an error:
And the Status is for the whole time OFFLINE.
In my C++ Adapter I get logs:
What am I doing wrong? Is there any other thing to configure that I am not aware of? Or maybe the protocol versions are incompatible?
The text was updated successfully, but these errors were encountered: