Ethernet/IP CIP over Linux HELP!!


Thread Starter

Dominic Gagne

We are programming a gateway between a A/B Ethernet/IP PLC and a CAN/bus network in C language, on a Linux OS. Can someone give us a hint or tell us where we can find libraries who handle the CIP layer of the Enet/IP protocol (i.e. the session management, the services, the connections) ? We have a hell of a deadline and coding everything would be almost impossible!

thanks a lot for any information you can give!

Dominic Gagne

Yup, I've already contacted him about his library, but the problem is that his code is ControlLogix client oriented. We need a kind of server who can handle the CIP layer under Ethernet/IP. Our objective is to develop a simple gateway between an Ethernet/IP PLC and a CAN/bus network. We only have to "route" the communication packet between both network with the appropriate encapsulation. But to do so, we have to handle the damn CIP layer (sorry, I've been working on that since so many days!! hehe!) to accomodate the Ethernet/IP device (the connection management, the services, the transmission mode - connected or unconnected, and so on). In language C, over Linux OS, as I already said.

Do you have any idea?
thanks a lot for your time!
Unfortunately what you want won't be freely available yet. You're trying to create a "CIP Router" and it is a lot harder than just tossing "CIP" packets from Ethernet to CAN. Even if you had $50,000 to spend I'm not sure you'll find exactly what you want just because the few people who have tried this want to sell their hardware (and I'm not talking about Rockwell - as they prefer using a PLC+DNet_Scanner as gateway).

Ron Gage's code or the "free example" at ODVA will help you with the Encap/CIP session stuff.

However that is the "easy part" - you'll still need to:
1) create a series of "port objects" to act as the target of forwarded requests
2) manage the ForwardOpen, ForwardClose, and UnconnectedSend process
3) do some minor "massaging" of the CIP messages as DeviceNet simplified some to make better use of the 8-byte data payload limitation of CAN.

Your plan looks to me as a 2-3 month full-time project for someone well versed in either Ethernet/IP or DeviceNet. If you don't have that time or resource, your management had better be informed that while this looks easy on paper, it's a big job! Some day this ENet<>DNet routing
will be routine, but as of today you're still about 1 step ahead of the curve (ie: on the bleeding edge).

Best regards

Lynn August Linse, Senior IA Application Engineer
15353 Barranca Parkway, Lantronix Inc, Irvine CA 92618
[email protected]
Tel: (949)279-3969 Fax: (949)453-7152