Resource-constrained Industrial Things –Proposal for the Adaptation of CoAP to EtherNet/IP™
Jonas Green, Björn Otterdahl
HMS Industrial Networks ABFebruary 22, 2017

Why EtherNet/IP over CoAP?
•Connect all devices in a factory to EtherNet/IP••••

Make EtherNet/IP cheaper and more simple to implement•••

Even small and simple sensors and actuators
No need for routers
Enable more diagnostic data from the devices

Remove TCP and the Encapsulation protocol and replace with CoAP
Less computing power and less memory required by the sensor system

Make the devices IoT Ready in a secure way••

Leverage on home automation to enable cloud connectivity
for every sensor
Use the security features used by the home automation businessTechnical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

www.odva.org

2

Introduction•Continuation on the work on Resource constrained EtherNet/IP device•

Presented 2015 by Paul Brooks and Dayin Xu•

Quick recap:•••••

Technical Track© 2017 ODVA, Inc.

Widen the ODVA ecosystem with IIoTsolutions
Cost and size reduction needed
EtherNet/IP over UDP reduces size/cost
Single Pair Ethernet reduces size/cost
CIP transport barrier – relies on TCP

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

www.odva.org

3

Why do we need a resource constrained design?
•••

Introduce sensors and small actuators to the ODVA ecosystem via Ethernet
connectivity
Enable data and diagnostics to achieve smart operations from every thing on thefactory floor
Cheaper and smaller solution is necessaryTechnical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

www.odva.org

4Introduction•Bachelor thesis in collaboration with Halmstad University 2016
• Evaluated different IoT protocols to solve reliability for UDP based EtherNet/IPcommunication. (CoAP, AMQP, MQTT and DDS were compared)• CoAP is request/response oriented• Demo implementation

Technical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

www.odva.org

5Constrained Application Protocol• Modern IoT protocol targeting IoT applications• Use cases– OMA Lightweight M2M – Device management protocol– Supported by ARM mbed Device Server– Application-layer option to ThreadTechnical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

www.odva.org

6Constrained Application Protocol• Machine-2-machine protocol• Targeting constrained devices• Low overhead and complexity– Built upon UDP– 4-byte header• Lightweight reliability– Re-transmissions– Duplicate message detection•Can be secured by DTLS

Technical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

www.odva.org

77

CoAP header••VersionMessage type
– Confirmable, Non-confirmable, Acknowledgement, Reset••Token length
Message code
– Request, Success response, Client error or Server error response•Message ID– Re-transmissions and duplicate message detection

Technical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

www.odva.org

8

CoAP options & payload•Options––––•

Present in both requests and responses
Type-Length-Value format
Multiple instances in single message
15 options specifiedPayload– Remaing part of the datagram size
– Format determined by the Content-Format option

Technical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

www.odva.org

9CIP adaptation on CoAP•

Replace the Encapsulation layer

Technical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

www.odva.org

10

CIP adaptation on CoAP – Messaging•

Address resources with URIs
– Objects, instances, attributes•Translate CIP services to CoAP methods– Subset of all services– Enough to control a device?
– CoAP option for CIP services•

How to handle status codes?
– Translate CIP status codes to CoAP response codes– Add CoAP options for general and additional status codes

Technical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

www.odva.org

11

CIP adaptation on CoAP – IO data•

CoAP is by design a messaging protocol– CoAP does not offer cyclic data exchange– Shall a resource contrained device handle cyclic data exchange?

•Let clients register for data updates– Observe resources– Publish/subscribe to topics linked to resources

Technical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

www.odva.org

12

CIP adaptation on CoAP – IO data•

Observing Resources in the Constrained Application Protocol– Extension to the CoAP specification (RFC7641)•Using the CoAP GET request but adds a Observe option•

Clients register to observe a resource– In GET request the Observe option tells the server to register an observer– Register and deregister is supported•

Servers send notifications when resources are updated– Subsequent responses to previous request– Sequence number for reordering detection

Technical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

www.odva.org

13CIP adaptation on CoAP – IO data•

CoAP publish/subscribe– Register topics– Publish data on topics– Subscribe to topics to get data updates (change-of-state)•Separate broker device•”Brokerless” setup– Pre-configured topics in the devices

Technical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

www.odva.org

14

CIP adaptation on CoAP – Security•

CoAP has built in support for DTLS
– URI: coaps://– Port 5684

•For key-exchange CoAP has support for– Pre-shared keys
– X.509 certificates– Raw public key••

Uses AES128 for encryption
Adds an extra burden on the host system–––

Cipher suites must be carefully chosen, Standardized on Elliptic-Curve DH (secp256r1)
Hardware acceleration
Use raw public keys instead of X.509 certificates (RFC7250)

Technical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

www.odva.org

15

Example of network traffic• Get_Attr_Single TCP/IP Interface object, instance 1, attribute 6 (host name)Technical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

www.odva.org

16

Example of network traffic• Get_Attr_Single TCP/IP Interface object, instance 1, attribute 6 (host name)Technical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

www.odva.org

17

Example of network traffic• Get_Attr_Single TCP/IP Interface object, instance 1, attribute 6 (host name)Technical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

www.odva.org

18

How to connect to the network
ITCoAP ClientEdge
Gateway/router
EtherNet/IP Scanner

Ethernet switch

EtherNet/IP adapter

EtherNet/
IP adapter

EtherNet/
IP to CoAP
Gateway

EtherNet/IP overCoApadapter

Technical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

Standard EtherNet/IP
CIP over CoAPOTStandard CoAP

www.odva.org

19How to connect to the network
IT
CoAP ClientEdge
Gateway/router

EtherNet/IP ScannerWith support for
EtherNet/IP over CoAP

Ethernet switch withsingle pair Ethernet

Standard EtherNet/IP
EtherNet/IP over CoAP

EtherNet/IP over CoAP on Singlepair Ethernet

WirelessAP

Wireless link(ex. wifi, 6LowPAN, Bluetooth LE)
Standard CoAPEtherNet/
IP overCoApadapter

EtherNet/IP overCoApadapter

EtherNet/
IP adapter

EtherNet/
IP adapter

EtherNet/IP overCoApadapter

EtherNet/IP overCoApadapter

OT

Technical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

www.odva.org

20Not a finished concept•CoAP works very well with explicit messaging of CIP– Examine how to support all CIP services and CIP Status codes•No support for exchange cyclic data
– Examine proposed techniques to replace cyclic data connections– How to map these techniques to the Connection Manager and Connection
object?

•Investigate how to handle device commissioning– Discovery of new devices

Technical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

www.odva.org

21

Summary•

Low resource protocols for IoT devices exists•

Take advantage of already developed IoT protocols– Use as is or use ideas of it when adapting EtherNet/IP•

Possible to use CoAP
– Support for explicit messaging– Cyclic data exchange needs a new approach•

Security of CoAP is well investigated and conforms well with CIP Security•More to investigate for a final solution

Technical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

www.odva.org

22

Demo of EtherNet/IP CoAP network adapter•••

HMS Anybus CompactCom 40 EtherNet/IP™ adapter
Open source CoAP stack ”libcoap”
PC with CoAP browser used as originator

Ethernet

Technical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

www.odva.org

23

Coming up•Next step: New work in collaboration with Halmstad University,moving technology to a wireless mesh network (6LoWPAN)

Ethernet

Technical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

6LoWPANwww.odva.org

24Questions and discussion

Technical Track© 2017 ODVA, Inc.

2017 Industry Conference & 18th Annual Meeting
All rights reserved.

www.odva.org

25

THANK YOU