-
Notifications
You must be signed in to change notification settings - Fork 101
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
Implicit Messaging with Siemens not working #48
Comments
Oh, possibly relevant: Epath class ID is 6, object ID is 1. |
Hi, Sorry for not reaching out sooner. Did you resolve this |
After reading this once more, if you're working with Implicit messaging, then EPath shouldn't apply, as EPath is only used to handle data in CIP Objects via explicit messaging. Please read this response and issue for better understanding about the differences - #36 (comment) |
This is not resolved at this time, no.
I do understand this, and was referring to the EPath displayed when using a ConnectionManager that failed to make a good connection. I think my error may be somewhat consistent with the one haellingsen mentioned though. The 0x13 error shows up during the ForwardOpen command (and mentions there's others that aren't being displayed, but I don't have WireShark to see what they are). I'm using the Connection Path shown for the first (and only) connection in the EDS file I attached in my original post, "20 04 24 67 2C 66 2C 65". I'm not sure what I'm missing, since there's no explicit reference to either of the assembly objects in the implicit messaging example.... |
Hi @jwhitman1-lmco, Can you share all your "eipScanner::cip::connectionManager::ConnectionParameters" as setup in your code? "I don't have WireShark to see what they are" |
Hi @Broekman,
Sure thing; here they are!
Does this help? One thing I note is that I'm not absolutely certain about the size of the network connection parameters. Like I said, I'm very new to this. Do they match with the eds that I attached above?
Because unfortunately the Powers That Be have yet to authorize its use. Getting that authorization will likely take an awful lot of time and migraines on my end. |
I strongly, strongly agree with @Broekman regarding debugging with wireshark, and I almost consider it as a necessity with implicit messaging. Without seeing the packets and errors, it will make debugging infinitely more difficult, especially for people who are trying to solve the issue remotely. It very well could be an error with the library as much as it could be an error with the parameters. |
Understood. I'll see if I can get special permission or something. Maybe I'll get lucky for a change, who knows? UPDATE: Managed to get approval accelerated. I'll be able to post packet capture tomorrow morning (28 APR 2021). |
Had to change the extension to upload this, but this is a capture of my creating the object, establishing the explicit connection, then trying ten times to open an implicit connection. Any help would be appreciated...nothing sticks out as obviously erroneous to me, but that could be a lack of familiarity with what 'good' looks like here. Remove the .txt and this should be a .pcapng file. EIP_10ImplicitOpens.pcapng.txt Thank you! |
Any chance you guys have some insight on this? Not to jostle your elbow, just checking so I can answer my boss when he asks. |
Sorry I haven't had time to look at this as I've been extremely busy with my main work. I'll try to get to it before the weekend. |
Understood, thank you so much. Knowing that will keep a bunch of flak off me. |
Just checking, has there been any chance to look at this? |
Thought I'd pop in as I encountered a similar issue as above. Hope this helps resolve your issue if you're still having it. IssueLike @jwhitman1-lmco, I was unable to get implicit connections working with my device. For my situation, I am trying to connect to an IFM AL1320 IO-Link hub to read sensor status. When I tried to follow the guide to connect, I received the same error:
Here's a screenshot of the wireshark capture of the request as well. At this point my parameters setup looked like this: eipScanner::cip::connectionManager::ConnectionParameters params;
params.connectionPath = {0x20, 0x04, 0x24, 0xC7, 0x2C, 0x96, 0x2C, 0x64 };
params.o2tRealTimeFormat = true;
params.originatorVendorId = 322;
{
using namespace eipScanner::cip::connectionManager;
params.t2oNetworkConnectionParams |= NetworkConnectionParams::P2P;
params.t2oNetworkConnectionParams |= NetworkConnectionParams::SCHEDULED_PRIORITY;
params.t2oNetworkConnectionParams |= NetworkConnectionParams::FIXED;
params.t2oNetworkConnectionParams |= 140;
params.o2tNetworkConnectionParams |= NetworkConnectionParams::P2P;
params.o2tNetworkConnectionParams |= NetworkConnectionParams::SCHEDULED_PRIORITY;
params.o2tNetworkConnectionParams |= NetworkConnectionParams::FIXED;
params.o2tNetworkConnectionParams |= 130;
params.t2oRPI = 10000;
params.o2tRPI = 10000;
params.transportTypeTrigger |= NetworkConnectionParams::CLASS1;
}
implicit_data_connection = conn_man->forwardOpen(session, params); The excerpt from the EDS file for this connection is as follows:
In my parameters, the SolutionThe issue I was having is from the config specified by params.connectionPath = {0x20, 0x04, 0x24, 0xC7, 0x2C, 0x96, 0x2C, 0x64,
0x80, 0x19, // 0x80 specifies the beginning of the data
// segment, 0x19 specifies the number of words in the
// data section. This is equivalent to 25 words (50 bytes).
// This is just a large empty buffer. This is the extra
// data that the device was expecting that caused it to throw error 0x13
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00
}; Since I see your EDS file doesn't specify any extra configurations I don't know if this is your exact problem, but I would guess that you have a similar issue in that your device is expecting some more data passed through the connection path in the data field. After changing my connection path to the above, I get the following output when configuring the messaging:
Normally you would read the assembly specified in the EDS to figure out what each value should be set to, but in my case all zeroes pretty much turned it into a useless device. The configuration values would be used to set up each device that is connected to the IO hub for me. I am extremely new to the EthernetIP protocol so I don't know how necessary a lot of this stuff is, but this is what I was able to get working after a couple days of banging my head around. |
Hi, I would like to chime in on this thread to request more information on the library. I would like to preface this with the fact that I only have a cursory knowledge of CIP-E/IP. Question: Is there any explicit definition within the library of the formatting of "conectionPath"? All I see is the header file definition of it being a Any help here would be greatly appreciated! EDIT: It appears the good implementation is has two 8-bit path segments (0x20 and 0x24) while the bad one has two 16-bit (0x21and 0x25) This is my setup:
` |
Update: #include "MessageRouter.h"
#include "ConnectionManager.h"
using eipScanner::ConnectionManager;
using eipScanner::MessageRouter;
int main()
{
MessageRouter::SPtr mr_ptr = std::make_shared<MessageRouter>(MessageRouter::USE_8_BIT_PATH_SEGMENTS);
ConnectionManager _connectionManager = ConnectionManager(mr_ptr);
/* ConnectionManager now uses 8-bit path segments */
return 0;
} This did not work. Could have been that I did something wrong, but I doubt it. class MessageRouter {
public:
using SPtr = std::shared_ptr<MessageRouter>;
static constexpr bool USE_8_BIT_PATH_SEGMENTS = true;
/**
* @brief Default constructor
*/
MessageRouter(bool use_8_bit_path_segments=true); // TW: edited this to default to true Data is now streaming to/from PLC |
Hi, everyone. I tried to set the 8-bit path as described in https://eipscanner.readthedocs.io/en/latest/misc/8-bit_path_segments.html, but I get this link error: '''/usr/bin/ld: CMakeFiles/eip2mqqt.dir/main.cpp.o: warning: relocation against What could be the reason? |
Hi,I have the same problem now.I modified it with your advice, but the routing information threw an exception, it seems that I can't modify it.
parameters.transportTypeTrigger |= NetworkConnectionParams::CLASS1;
parameters.transportTypeTrigger |= NetworkConnectionParams::CLASS1;` I'd be most grateful if you could help. |
Apologies for marking this as a bug, it should probably be a 'question', but Git doesn't want to let me switch the labels
I'm new to EIP and I'm trying to open an implicit messaging loop with a Siemens drive device using this eds. I thought I understood things, but when I tried to establish the connection using my understanding of the parameters, I got a 0x13 "not enough data supplied" error from the stack. Thought that was a little strange so I opened up the ImplicitMessagingExample and updated the path with the one on line 371 of that file, or-equaled the t2o network connection parameters to indicate multicast support, and switched the IP address for the one our device is using (and confirmed via ping). Unfortunately, even the example code (with my updates) is returning a 0x13 error.
I don't understand what's going on here...am I missing a nuance in how EIP is supposed to work? Is the stack incompatible with Siemens devices? Do I just need to update some other parameters because something is being finicky under the hood?
Can you shed some light on any of this?
Thanks!
The text was updated successfully, but these errors were encountered: