What is the Importance of Embedded Networking

Embedded systems are small computers that are implemented as part of a larger system or product and designed to execute a specific function or application. They include a processing unit, usually a general-purpose microcontroller, along with on-board peripheral components such as I/O ports, memory (program memory, RAM and EEPROM), A/D converter, oscillators, and more. An embedded system may be connected to sensors that collect information about the environment and actuators that are used to trigger functions within the system.

What is Embedded Networking?

Embedded systems first originated in the mid-1960's - more than a decade before the first personal home computers and nearly 25 years before the introduction of the internet. One of the earliest applications of an embedded computer system was the Apollo Guidance Computer, introduced in 1966 to support guidance, navigation, and control of the Apollo spacecraft during NASA's lunar missions of that decade. Today, embedded systems are used in a range of industrial, commercial, and residential applications that range from controlling manufacturing systems to enabling vehicle safety features to powering home security systems and smart appliances.

Advancements in the technology of digital telecommunications have led to the development of embedded networking, a practice the expands the range of potential applications for embedded systems in a variety of contexts. The field of embedded networking deals with the network design and topology, hardware devices, and communication/data exchange protocols needed to connect and exchange information between embedded systems. 

Embedded systems engineers today have access to a range of wired and wireless communication options for implementing networking capabilities into their embedded systems. Effective design of an embedded networking product requires the selection of a protocol stack that enables the desired networking features and communication patterns while managing design constraints such as memory and power consumption. Embedded systems form the basis for the Internet of Things (IoT), networks of devices whose capabilities depend on internet connectivity.

For engineers that may be new to building networked embedded systems, we offer this basic embedded networking introduction. We'll look at several implementation models for embedded networks and show you how the most common embedded systems have implemented networking to support critical functions and applications in real-world settings.

Embedded Networking System Ethernet is one of the most popular technologies for networking embedded devices with the internet.

Image courtesy of Unsplash

Embedded Networking Introduction: The OSI Model

Our discussion of embedded networking begins with an overview of computer networking systems and how they function. The earliest conceptual model of computer networks was developed by the International Organization for Standardization (ISO) in 1984 and is known as the Open System Interconnection (OSI) model. 

The OSI model itself is conceptual in nature - it does not include any actual specifications for network implementation. However, the OSI model does provide a framework for understanding the components of a complete network communication system. As we will see, many of today's most commonly implemented networking technologies use features and protocols that reflect parts of the OSI model.

The OSI model defines a seven-layer architecture for a complete communication system:

1. Application Layer

The application layer is the top-most layer of the OSI model. Data transmissions frequently originate in the application layer of the origin device and terminate in the application layer of the target device. This layer deals with the identification of services and communication partners, user authentication, and data syntax. Some common application layer protocols include hypertext transfer protocol (HTTP), Telnet and file transfer protocol (FTP).

2. Presentation Layer

The presentation layer is a software layer that formats and encrypts data that will be sent across a network, ensuring compatibility between the transmitting device and the receiving device. The presentation layer includes protocols such as ASCII, JPEG, MPEG.

3. Session Layer

For data transfer to occur between applications on separate devices, a session must be created. The purpose of the session layer is to manage, synchronize, and terminate connectivity between applications, ensuring coordinated data exchange while minimizing packet loss. The session layer can provide for full-duplex, half-duplex, or simplex communications.

4. Transport Layer

In the OSI model, the transport layer receives messages from the data layer and converts it into smaller units that can be efficiently handled by the network layer. In protocols such as TCP/IP, the transport layer adds a header to each data segment which includes the port of origin and the destination port address - this is called service point addressing. Service point addressing ensures that a message from the transmitting computer goes to the correct port once it arrives at the destination computer. The Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) are popular transport layer protocols for devices that connect to the internet.

5. Network Layer

The network layer provides the features and functions that transfer data sequences from the host device to a destination device. Along with routing network traffic and reporting delivery errors, the network layer divides outgoing messages into packets and assembles incoming packets into messages. Network layer devices use protocols such as IP, ICMP, and IPX.

6. Data Link Layer

Data packets are encoded and decoded into bits in the data link layer, which may be divided into two sub-layers: media access control (MAC) and logical link control (LLC). Hardware network interface controllers are typically assigned a MAC address by the manufacturer that acts as a unique device identifier and network address within a network segment. While the MAC layer supports physical addressing, the LLC layer deals with data synchronization, error checking, and flow control. Protocols for the data link layer include IEEE 802.5/ 802.2, IEEE 802.3/802.2, and the Point-to-point protocol (PPP).

7. Physical Layer

The physical layer defines the electrical and physical requirements for networked devices with control over the transmission and reception of unstructured raw data over the network. The physical data also manages data encoding and the conversion of digital bits into electrical signals. Devices that operate at the physical layer include network interface cards (NICs), repeaters, and hubs.

With the OSI model as a basis, embedded systems engineers have several options for how to implement networking for their embedded devices. Networked systems are designed based on specific application needs and constraints such as cost, power consumption, and memory. Not all embedded systems require all of the functionalities that are expressed in the OSI - it is up to embedded engineers to determine which features are required and to implement suitable protocols from the required layers.

Three Different Types of Embedded Networking

1. Embedded Networking with CAN Bus

The Control Area Network (CAN) protocol was developed to meet the embedded systems requirements of the automotive industry. CAN is a specification for a serial network that can be used to establish local connections between the microcontrollers in a motor vehicle. The CAN bus protocol is a two-wire, half-duplex system that works well for applications that demand a high-speed transfer of short messages.

The specifications for the CAN bus protocol are described in the international standard ISO 11898:2003. The specification includes requirements for the physical layer and data link layers of the network, leaving individual engineers or manufacturers to implement other high-level protocols of their choosing to satisfy additional networking requirements. 

2. Embedded Networking with I2C Bus

The I2C communications protocol for embedded systems was invented by Philips Semiconductor in 1989. I2C is a two-wire, half-duplex serial communication protocol with a multi-master, multi-slave architecture whose primary application is short range, intra-board communication. Due to the limitations of the I2C protocol's 7-bit address space and the total bus capacitance of 400 pF, serial communication using the I2C protocol is only effective when the connected devices are less than a few meters apart. 

I2C implementations include features that correspond to the physical layer, data link layer, and network layer of the OSI network model. The physical layer consists of the physical requirements for transmitting data: two open-collector bus lines where the bus pulls the line low during communication and releases it when idle. I2C features that correspond to the data link layer protocol include bus arbitration and clock stretching - mechanisms for error checking and data flow control. I2C's physical and logical addressing features are typically associated with the network layer of the OSI model.

3. Embedded Networking with Ethernet

Embedded devices that connect to local area networks or the internet can be implemented using Ethernet technology. Ethernet connections are often implemented as part of a protocol stack known as the Internet Protocol Suite, sometimes referred to as TCP/IP. The TCP/IP protocol stack includes four layers that are closely analogous to the OSI network model:

  1. Application Layer - The application layer of the TCP/IP protocol stack combines functions that are represented in the application layer, presentation layer, and session layers of the OSI model. Communication protocols for the application layer include HTTP, FTP, DNS, SMTP, TELNET and others.
  2. Transport Layer - The transport layer of the TCP/IP protocol stack implements either the transmission control protocol (TCP) or the user datagram protocol (UDP). The TCP is ideal for applications that require reliable data streaming, whereas UDP can be implemented for embedded systems where reduced latency is valued over data transfer reliability.
  3. Internet - The internet layer of TCP/IP provides network layer functions from the OSI model. In the internet layer, each device is assigned an IP address according to the IPv4 or IPv6 standard. The internet layer transports network packets from a host device to a target device specified by its IP address. It supports processes and functions for sending and receiving packets, as well as detecting and diagnosing errors.
  4. Network Interface - An ethernet networking interface card allows an embedded system to connect to a network physically using a twisted-pair or fiber optic ethernet cable. Ethernet provides networking capabilities that encompass the features of the physical layer and the data link layer of the OSI model.

Embedded Networking for the Internet of Things (IoT)

Embedded systems engineers have pioneered new protocols with features that are more favorable for operating devices in the IoT. IoT devices come with a range of requirements for size, cost, data transfer rate, serviceability, power, and onboard computing capacity. 

While the traditional internet protocol suite is suitable for computers and some types of embedded systems, some of its protocols are not useful for the requirements of many devices in the IoT. Protocols like XML, HTTP, TCP, and IPv6 produce a large data overhead with each transmission that can be inefficient for smaller data transfers that frequently characterize IoT devices. New communication protocols such as MQTT, LoRa, SIGFOX, Weightless, WirelessHART, Zigbee, 6LoWPAN, and DTLS are being used to provide more efficient web-based communications while limiting data overhead for IoT devices.

The greatest challenge for embedded networking with IoT devices is anticipating which standards and technology will remain relevant in the future. 

Summary

Embedded networking presents a unique challenge for engineers, whether the application entails networking microcontrollers with each other in a closed system or implementing a physical ethernet connection to support LAN, WAN, or internet connectivity. To succeed, developers must be familiar with the basic functioning of computer networks and effectively adapt this knowledge to account for the application-specific device requirements and limitations associated with their embedded system. 

With the OSI model as a foundation, embedded engineers can better understand the features required to support network connectivity and adopt a protocol stack for their devices that suits its unique functions and requirements.

Total Phase empowers embedded engineers with the diagnostic tools they need to successfully implement embedded networking with I2C and CAN bus along with other leading protocols. With our high-performance bus monitoring tools, product engineers can debug their embedded networking implementations more quickly, reducing overall time-to-market.

Ready to learn more?

Request a Demo