Development and Testing of
Safety Network Protocol
Alessio Lama
alessio.lama@yahoo.it
Linkedin
4 December 2018
Applications
●
Automotive
●
Industrial automation
●
Biomedical
●
Avionic
●
Interactions with safety MCU
●
Real-Time systems
Issues
●
Access Denial
●
Repetition
●
Loss
●
Corruption
●
Timeout
●
Hacking
●
Interface disconnection
●
Nondeterministic network
●
Net driver bugs
Access Denial
●
Network Topology
●
A VLAN is any broadcast domain that is partitioned and
isolated in a computer network at the data link layer.
# ip link add link eth0 name eth0.8 type vlan id 8
●
Limited access
# iptables -A INPUT -i eth1 -m mac --mac-source XX:XX:XX:XX:XX:XX -j ACCEPT
Polling Protocol
●
Unique ID request
●
Sequence number
●
Signature
●
Timestamp
●
…...
Corruption
●
CRC detecting random errors and it’s much easier
to implement on embedded hardware.
●
SHA or MD5 are used for security check and it’s not
recommended for real-time systems.
Interface disconnection
●
Periodic supervision packet
●
Realignment sequence number
Timeout
●
Master device uses a timer callback to report the
timeout response error.
●
Check timestamp frame value (PTP)
Encryption / Codification
High Data Rate AES128-CBC
Low Data Rate AES256-CBC
Bit Masking
1 10 0 0 01 1
ID: 200
RPM_engine[0:2]
ID: 400
RPM_engine[3:7]
Tools : Wireshark
Wireshark is a free and open source packet analyzer. It is
used for network troubleshooting, analysis, software and
communications protocol development, and education.
Wireshark : Filter and dissector
https://wiki.wireshark.org/Lua/Examples
Wireshark : Filter and dissector
https://wiki.wireshark.org/Lua/Examples
Tools : Scapy
Scapy is a powerful interactive packet manipulation program.
It is able to forge or decode packets of a wide number of
protocols, send them on the wire, capture them, match
requests and replies, and much more.
Tools : Scapy
Adding new protocols
Show packet
Test : TTCN-3
TTCN-3 (Testing and Test Control
Notation version 3) is a strongly
typed testing language used in
conformance testing of
communicating systems.
TTCN-3 has its own data types
and can be combined with ASN.1,
IDL and XML type definitions
Test : TTCN-3
PTP
PTP hardware (if supported) and
software timestamping to
synchronize the clocks of the
devices.
linuxptp
Check Driver Support Configuration File
PRP
Parallel Redundancy Protocol is a
network protocol standard for
Ethernet that provides seamless
failover against failure of any
network component. This
redundancy is invisible to the
application.
http://processors.wiki.ti.com/index.php/Processor_SDK_Linux_HSR_PRP
PRP
PRP nodes have two ports
and are attached to two
separated networks of similar
topology. PRP can be
implemented entirely in
software, i.e. integrated in the
network driver.
DropWindow size
depends on the timing.
Development and Testing of
Safety Network Protocol
Alessio Lama
alessio.lama@yahoo.it
Linkedin
4 December 2018

Alessio Lama - Development and testing of a safety network protocol