Engineering Reliable Data Exchange From Electrical Interface to System-Level Meaning. UART. SPI. I²C. SMBus. RS-232. RS-485. CAN. CAN FD. CAN XL. CANopen. Modbus. USB. Ethernet. TCP/IP. UDP. MQTT. OPC UA. EtherCAT. PTP. Custom Protocols. Diagnostics. Security. Interoperability.
Two electronic systems can be physically connected and still fail to communicate reliably.
The electrical signal may be correct.
The bytes may arrive.
The CRC may pass.
And the product can still behave incorrectly.
Why?
Because reliable communication requires several layers to agree: Electrical Levels → Timing → Bit Encoding → Frames → Addresses → Message Types → Data Representation → Sequence → State → Timeouts → Error Handling → Application Meaning
Communication Is a Layered Engineering System.
365PCB Communication Interface & Protocol Development therefore approaches communication from: Physical Signal to Product Semantics.
Don't Start With the Protocol Name
Before choosing: UART, CAN, RS-485, Ethernet or MQTT.
define: How far must data travel? How many nodes exist? How much data must move? What latency is acceptable? Must delivery be deterministic? What happens if a message is lost? Is galvanic isolation required? What electromagnetic environment exists? Does the device need interoperability with third-party equipment? What is the security threat model? Choose the Protocol for the Product — Not the Product for the Protocol.
A useful conceptual stack is: Physical Layer How bits physically travel. Data Link Layer How frames share and use the medium. Transport / Session Behavior How larger conversations are delivered and recovered. Application Protocol What the messages mean. Each Layer Solves a Different Problem.
For example: RS-485 defines electrical characteristics.
It does not inherently define: Register 40001 means temperature.
That meaning can come from: Modbus or a custom application protocol.
Electrical Interface ≠ Application Protocol.
A system might be: RS-485 → Modbus RTU → Product Register Map Or Ethernet → IP → TCP → MQTT → Product Topic / Payload Model, Document Every Layer.
Simplest topology: Device A ↔ Device B
Examples can include: UART, SPI, certain USB configurations. Fewer Nodes Simplify Addressing — Not Necessarily Reliability.
Several devices share one physical medium.
Examples include: I²C, RS-485, CAN, Shared Media Requires Arbitration, Addressing, or Controlled Access.
Larger communication architectures introduce: switches routing multiple endpoints traffic classes.
Network Architecture Creates New Failure Modes.
Full Duplex: Both directions can operate simultaneously.
Half Duplex: One shared path may alternate direction.
Direction Control Becomes Protocol Timing.
Some links may intentionally be one-directional. Not Every Interface Needs a Return Channel.
But absence of return path removes: acknowledgment direct error feedback.
Synchronous Communication carries or shares a clock.
Examples: SPI, I²C, Asynchronous, Receiver derives timing from waveform assumptions.
Example: UART.
Clock Architecture Changes Protocol Behavior.
Throughput is not simply: link bit rate.
Actual application throughput is reduced by: Headers, Addressing, CRC, ACK, Retries, Idle Time, Protocol Overhead
Raw Bit Rate ≠ Useful Data Rate.
Latency asks: How long from data becoming available at A until usable information reaches B?
The path can include: Buffer → Scheduler → Protocol → Transmission → Receiver → Parser → Application
Communication Latency Is End-to-End.
Even when average latency is acceptable: Variation may not be.
A control system may care about: 1.0 ms ± 50 µs
very differently from: 1.0 ms average, 10 ms occasionally.
Deterministic Communication Controls the Tail of the Distribution.
Ethernet may provide enormous bandwidth.
A lower-bandwidth deterministic bus may still be better for certain control tasks.
More Bandwidth Does Not Automatically Mean Better Control Communication.
For tiny sensor messages, a large protocol stack can produce far more overhead than payload.
Communication Efficiency Depends on Message Size.
A 4-byte value sent: once per second and 100,000 times per second are completely different communication problems.
Data Rate = Message Size × Message Rate + Overhead.
Average load may be low while bursts are high.
Buffers Must Survive Arrival Patterns — Not Only Average Traffic.
A communication architecture can define: Critical Control, Telemetry, Diagnostics, Firmware Update, with separate traffic requirements.
Not All Data Has Equal Urgency.
UART remains one of the most common embedded communication interfaces.
Typical parameters include: baud rate, data bits, parity, stop bits, flow control.
UART Transmits Bytes — Not Messages.
A raw byte stream does not inherently tell the receiver: Where one message ends.
Therefore a custom UART protocol might require: Start / Sync, Length, Message Type, Payload, CRC, Create Message Boundaries Explicitly.
If one byte is lost: Can the parser find the next valid frame?
A Robust Protocol Should Be Able to Re-Synchronize.
Selected binary protocols use a recognizable frame prefix.
But: Sync Marker Alone Is Not Validation.
Use: length, format, CRC, together.
Transmitter and receiver clocks differ slightly.
Clock Accuracy Becomes Communication Margin.
RTS / CTS can control data flow where supported.
Flow Control Prevents a Fast Sender From Overrunning a Slow Receiver.
Software-based control exists in some legacy/text applications.
But binary protocols require careful handling if reserved control characters are involved.
Transport Control Should Not Be Accidentally Confused With Payload.
SPI provides high-speed synchronous communication between controller and peripheral devices.
Typical signals: SCLK, MOSI, MISO, CS.
SPI Is Electrically Simple — but Timing Can Be Demanding.
CPOL + CPHA define clock polarity and phase.
Incorrect mode can produce: Data That Appears Almost Correct.
Some devices require: setup, hold inactive periods.
Clock Rate Alone Does Not Define SPI Timing.
Certain devices support daisy-chain architectures.
This can reduce chip-select count but changes: latency frame structure.
Topology Changes Protocol Behavior.
SPI itself typically offers no universal: Delivery Guarantee.
If application reliability requires it, add: CRC sequence readback status at higher layers.
I²C supports multiple devices over: SDA + SCL.
It is excellent for: sensors, EEPROM PMIC configuration devices.
I²C Is a Board-Level Shared Bus — Not a Universal Long-Distance Network.
Multiple devices need unique compatible addresses.
Address Planning Should Begin During Schematic Design.
Two identical fixed-address sensors may require: bus mux, configurable address, separate controllers, depending on architecture.
Software Cannot Solve Two Physically Identical Addresses on the Same Bus by Wishful Thinking.
I²C signal behavior depends on: Pull-Up Resistance, Bus Capacitance.
Protocol Timing Can Be an RC Network.
Certain devices can hold the clock while they require more processing time.
Controller and Device Must Agree on Protocol Features.
I²C can support multi-controller behavior in suitable architectures.
Shared Control Requires Arbitration.
A device interrupted mid-transaction can sometimes leave: SDA low.
A robust system needs a defined recovery strategy where required. One Peripheral Should Not Necessarily Hold the Whole Product Hostage Forever.
SMBus builds additional conventions and timing expectations on a two-wire architecture related to I²C.
Similar Wiring Does Not Mean Identical Protocol Requirements.
RS-232 remains relevant for: console, legacy equipment, service interfaces.
Logical UART and External Electrical Standard Are Different Layers.
RS-485 is highly useful for: industrial environments, long cable runs, multidrop networks.
Differential Signaling Improves Robustness — but Does Not Create a Protocol.
Bus topology, characteristic impedance and termination influence: reflections, signal quality.
Protocol Errors Can Begin as Transmission-Line Errors.
Idle-state behavior may require defined network bias according to architecture/transceiver.
Undefined Bus State Can Become Undefined Data.
A transceiver may need explicit: Transmit Enable.
If direction changes too early: final byte can be cut.
Too late: bus is held unnecessarily. Direction Timing Is Part of Protocol Implementation.
Multiple devices share the same pair.
That requires: addressing, turn-taking, collision avoidance, at higher layers.
The Physical Bus Does Not Decide Who Talks.
Modbus remains widely deployed in industrial equipment.
The Modbus Organization currently maintains: Application Protocol V1.1b3 and specifically recommends the Serial Line Protocol and Implementation Guide V1.02 for new serial Modbus implementations; its older 1996 serial document is explicitly marked for legacy applications only.
Mature Protocol Does Not Mean "Implement Whatever Legacy Device Did."
Follow the actual specification when interoperability matters.
A typical Modbus RTU frame contains concepts such as: Device Address, Function, Data, CRC.
Register Meaning Still Belongs to the Product Data Model.
A register map should define: address, data type, units, scaling, access valid range.
40001 = 2317 Is Meaningless Without a Data Contract.
Example:
Raw: 2317
may mean: 23.17 °C if scaling is defined. Units and Scale Belong in the Protocol Specification.
Multi-register values can create interoperability issues involving: byte order, word order.
Endianness Should Never Be Left to Guesswork.
Invalid: function, address, value, should produce defined protocol responses.
Error Reporting Is Part of Interoperability.
Modbus can also operate over TCP/IP/Ethernet.
The Modbus Organization maintains separate TCP/IP implementation guidance and conformance resources.
Same Application Meaning — Different Transport Architecture.
Traditional industrial protocols were often designed for trusted networks.
Modern deployments may require additional: authentication, transport protection, segmentation.
Modbus Organization now also defines a Modbus Security protocol using TLS and X.509 certificates.
Legacy Interoperability and Modern Cybersecurity Must Be Reconciled Deliberately.
CAN remains one of the most important deterministic embedded/industrial/vehicle network technologies.
Its key characteristics include: multi-master arbitration, message identifiers, error detection, retransmission behavior.
CAN Arbitration Prioritizes Messages — Not Devices.
A CAN identifier usually describes: Message Meaning / Priority
rather than simply: destination device.
CAN Is Naturally Information-Oriented.
When multiple nodes transmit simultaneously: Higher-Priority Arbitration Wins Without Destroying the Winning Message.
This is fundamental to CAN's deterministic behavior.
Lower numerical identifiers in conventional arbitration generally receive higher arbitration priority.
Message ID Architecture Becomes Real-Time Architecture.
A mature CAN architecture asks: Which messages have the tightest deadlines?
Identifier Planning Should Follow Timing Requirements.
Increasing traffic raises: waiting time, worst-case response time.
CAN Performance Should Be Analyzed as Network Scheduling.
For demanding deterministic systems, calculate worst-case message response rather than simply measuring average bus load.
40% Bus Utilization Alone Does Not Prove Deadlines Are Met.
Classical CAN data fields are limited compared with newer generations. It remains extremely important because of its enormous installed base.
New Technology Does Not Erase Legacy Networks.
CAN FD increases payload capacity and allows a faster data phase than Classical CAN. Arbitration Reliability + Increased Data Efficiency.
It is often a strong choice for modern embedded systems needing more bandwidth while retaining CAN concepts.
Larger frames can reduce overhead for larger application data.
But: Larger Frames Also Occupy the Bus Longer. Message design still matters.
Now we reach the current leading edge.
CAN in Automation states that CAN XL is standardized in ISO 11898-1:2024, supports payloads from 1 to 2048 bytes, separates priority and acceptance fields, and is intended for backbone/sub-backbone use and easier integration with TCP/IP-oriented systems. Optional physical coding can support 20 Mbit/s and above depending on network design.
CAN Is Evolving Toward Larger, Faster, More Network-Oriented Embedded Architectures.
It introduces architectural changes supporting: larger payloads, higher-layer integration, more flexible data mapping.
CiA's higher-layer specifications already define mechanisms including mapping multiple PDUs and even IEEE 802.3 MAC frames into CAN XL structures. Physical Bus Evolution Can Change Network Architecture.
A product family may need coexistence or migration.
Protocol Generation Is a Product-Lifecycle Decision.
CANopen adds standardized: object dictionary, communication services, device profiles, above CAN.
A Standardized Data Model Can Improve Multi-Vendor Interoperability.
Instead of proprietary register chaos: Define Device Data Systematically.
This becomes especially useful in industrial motion and device networks.
Motion systems often use standardized drive/device models rather than inventing: RunMotorCommand = 7. State Models Improve Interoperability.
We already connected this to Page 19 Motor Control.
LIN remains useful for lower-cost, lower-bandwidth distributed nodes in suitable applications. Not Every Sensor Needs Ethernet.
Protocol architecture should match: complexity, bandwidth, cost.
USB combines: Physical Link, Enumeration, Descriptors, Classes, Transfers, Power / Role, depending on generation.
USB Is a Protocol Ecosystem — Not Simply a Differential Pair.
A device must communicate identity and capabilities to the host.
Discovery Is Part of Communication.
Where applicable, standard classes can reduce custom host software.
Examples include common: HID, CDC, style functionality.
Standard Protocols Reduce Integration Cost.
Sometimes custom functionality is necessary.
Then define: commands, data model, versioning, error behavior.
Custom Does Not Mean Undocumented.
Endpoint type, host behavior, packet size and software architecture affect application throughput.
USB Link Speed Is Not Application Throughput.
Ethernet provides high bandwidth and scalable switched networking.
But Ethernet itself does not define the complete application communication model.
Ethernet Moves Frames.
IP moves packets.
TCP/UDP move transport data.
Application protocols carry product meaning.
Ethernet interfaces require controlled Layer-2 identity. Network Identity Is a Manufacturing / Provisioning Output.
Ethernet reliability depends physically on: MAC → PHY → Magnetics / Interface → PCB → Connector → Cable.
Network Software Cannot Correct a Marginal Physical Channel.
Ethernet endpoints may negotiate: speed, duplex, according to technology.
A Link-Up LED Is Only the First Layer of Network Validation.
Virtual LANs can separate traffic logically.
Network Segmentation Can Be Product Architecture.
Ethernet/network infrastructure can prioritize traffic classes. Critical Data and Bulk Data Should Not Always Compete Equally.
Internet Protocol provides logical addressing and routing. IP Allows Communication Beyond One Physical Link.
Products may require: IPv4, IPv6, dual stack, depending on deployment.
Network Addressing Is a Deployment Requirement — Not Only a Firmware Choice.
Devices may obtain addresses through: static configuration, DHCP, other mechanisms.
Address Provisioning Needs a Recovery Strategy.
Users should not always need to know: 192.168.1.73.
Discovery mechanisms can improve installation. Networking Includes Finding the Device.
TCP provides: ordered, reliable, byte-stream delivery.
TCP Guarantees Transport Properties — Not Application Semantics.
One: send()
does not guarantee one: recv().
Your Application Still Needs Message Framing. This is a classic protocol engineering issue.
Lost network data may be retransmitted.
This improves reliability but can increase: Latency.
Reliable Delivery and Deterministic Delivery Are Different Objectives.
One missing TCP segment can delay later ordered data. Perfect Ordering Can Cost Timeliness.
A connection can disappear due to: cable, switch, peer, Wi-Fi, routing.
Disconnect Is a Normal Network State — Not an Impossible Exception.
Define: backoff, session recovery, state synchronization.
Reconnected Does Not Automatically Mean Resynchronized.
UDP provides datagram transport with low protocol overhead but does not inherently guarantee: delivery, ordering, duplicate suppression.
The Application Owns More Reliability Decisions.
Suitable scenarios can include: streaming, telemetry, deterministic/local protocols, where stale data is worse than lost data.
Sometimes "Newest Value" Matters More Than "Every Value."
UDP/custom protocols can add sequence counters.
This enables detection of: lost, duplicate, reordered frames.
Ordering Evidence Should Be Explicit.
An ACK means: Something Was Received.
But define exactly what: Frame received? Command validated? Command executed? Transport ACK ≠ Product Action Confirmation. This distinction is extremely important.
A powerful architecture separates: Command Accepted from Command Completed.
Long-Running Operations Need State.
Retry can recover transient loss.
But commands must consider: What if the first message succeeded and only the ACK was lost?
A repeated command should not accidentally produce an unintended double action when protocol semantics require repeat safety.
Retry-Safe Commands Need Idempotent Design or Unique Transaction Identity.
A request can carry a unique identifier.
Receiver can correlate: Request with Response. Conversations Need Identity.
A sequence number can track: order, loss.
But after reboot: What Is the New Sequence Context? Lifecycle must be defined.
Every request/response system should answer: How long is the requester willing to wait? Timeout Is a Product Requirement. Not a random 1000 ms constant.
Consider: Transmission, Processing, Scheduling, Retry, Network, End-to-End Timing Determines Timeout.
Continuous immediate retry can worsen: congestion, CPU load.
Recovery Traffic Can Create the Failure It Is Trying to Recover From.
Network-oriented systems often increase retry delay progressively.
Fault Recovery Should Avoid Synchronizing Thousands of Devices Into a Retry Storm.
When receiver cannot process faster: Sender Must Know.
Otherwise buffers overflow.
Backpressure can exist at: UART, TCP, message queue, application level.
Every Producer Needs to Understand Consumer Capacity.
Buffers absorb short timing mismatch.
But large buffers can increase: Latency.
A system can have: zero packet loss, but seconds of queued delay.
Reliability Without Timeliness Can Still Be Product Failure.
For telemetry:
dropping: oldest data, may make sense.
For commands: dropping anything may be unacceptable. Buffer Policy Should Follow Data Semantics.
Possible categories: Command, Response, Event, Telemetry, Alarm, Configuration, Firmware Data, Different Message Types Need Different Reliability Rules.
A command changes product state.
Therefore it may need: authorization, validation, response.
Command Semantics Deserve Stronger Engineering Than Background Telemetry.
Telemetry describes state.
Repeated fresh samples can sometimes tolerate occasional loss. Data Criticality Depends on How the Data Is Used.
An event may be transient: Fault occurred at 10:31:22.
If lost: The Information May Never Exist Again.
Event delivery can therefore need stronger handling than periodic telemetry.
An alarm often has: activation and clearance.
State Change Is More Useful Than Repeating an Undefined Boolean Forever.
After reconnect:
device A may think: RUNNING
while B thinks: STOPPED.
Connection Recovery Must Reconcile State.
For each shared state variable: Which device owns the authoritative value?
Distributed State Needs Ownership.
Two controllers should not independently command the same actuator without a defined arbitration model.
Communication Architecture Is Control-Authority Architecture.
A heartbeat can demonstrate: connectivity basic liveness.
But: Heartbeat Received ≠ Product Healthy.
A richer health message can include: state, faults, uptime, version.
Communicate Meaningful Health — Not Merely Network Presence.
The product should define what happens when: Communication disappears.
Possible behavior depends on application: continue, degrade, hold, transition to defined state.
Communication Loss Is a Product State.
MQTT is a lightweight publish/subscribe messaging transport particularly useful for IoT and distributed applications.
MQTT 5.0 remains the current OASIS Standard and supports three QoS delivery levels, session behavior, properties and improved error/reporting mechanisms.
MQTT Decouples Publishers From Subscribers.
Instead of: Device A directly calls Device B,
a publisher sends to: Topic.
Subscribers consume the data they need. Communication Topology Becomes Loosely Coupled.
Do not create topic names randomly.
Example conceptual hierarchy: site / device / subsystem / measurement, Topic Namespace Is Information Architecture.
At-most-once style delivery.
Suitable where occasional loss is acceptable. Faster / Lighter Does Not Mean Appropriate for Every Message.
At-least-once delivery.
Duplicates can occur. Application Must Be Duplicate-Aware.
Exactly-once protocol delivery semantics use more handshake overhead. Stronger Delivery Semantics Cost More State and Traffic.
Even QoS 2 does not mean: physical actuator executed once.
Broker Delivery Semantics ≠ Physical Product Semantics.
MQTT can retain selected last-known data.
Useful for: configuration/state, when correctly designed.
Stale Data Must Not Accidentally Be Interpreted as a New Command.
MQTT supports notifying interested participants after abnormal disconnection.
Connection Failure Can Become a System Event.
The MQTT 5.0 standard strongly recommends authentication, authorization and protected communications for sensitive applications.
Lightweight Protocol Does Not Mean Lightweight Security Requirements.
OPC UA addresses more than packet transfer.
It provides: Information Modeling + Services + Security + Interoperability.
This is why it is powerful for industrial systems.
Instead of only communicating: register 17 = 5,
the system can represent: Object, Variable, Method, Relationship Type.
Semantics Become Machine-Readable.
OPC Foundation's current Part 1 release is 1.05.06, published in 2025; several parts continued receiving 1.05 updates in 2026, including Global Discovery Services 1.05.07 in April 2026.
Industrial Communication Is Moving From Data Exchange Toward Interoperable Information Models.
A client can: read, write, call, subscribe to information exposed by a server.
Communication API Can Map Directly to Product Capabilities.
Current OPC UA Part 14 defines an alternative publish/subscribe model.
It supports: broker-less communication, broker-based messaging, UDP, MQTT, AMQP mappings.
One Information Model Can Operate Across Different Transport Architectures.
These are not simply competitors.
MQTT primarily provides: Messaging Transport.
OPC UA adds richer: Information Semantics and Industrial Interoperability.
OPC UA PubSub can itself use MQTT as middleware. Separate Transport From Meaning.
EtherCAT is designed for high-performance industrial Ethernet communication, especially where deterministic: process data, synchronized motion matter.
The current EtherCAT Compendium was updated in May 2025 and covers Distributed Clocks, synchronization, state machines, process-data communication, error handling, cable redundancy and conformance.
Industrial Ethernet Can Be Engineered Around Machine Timing — Not Only Network Throughput.
Distributed Clocks synchronize spatially distributed nodes so coordinated actions can share a precise time base.
Motion Control Needs Shared Time — Not Merely Shared Packets.
This directly connects Page 19.
Real-time control data should be kept efficient and predictable.
Control Traffic Is Different From Configuration Traffic.
Configuration / diagnostics may tolerate different timing from: Cyclic Process Data.
Separate Traffic According to Timing Criticality.
Potential protocol families solve different needs: CAN / CANopen, Modbus, EtherCAT, OPC UA, Custom Ethernet.
The right selection follows: timing, ecosystem, device count, interoperability, complexity.
No Industrial Protocol Is Universally Best.
Distributed devices increasingly need a shared notion of: Time.
IEEE 1588-2019 remains the active core Precision Time Protocol standard and defines PTP v2.1. The standard supports sub-microsecond synchronization and, in appropriately designed systems, even sub-nanosecond-class time-transfer capability; subsequent amendments continue extending the framework.
Timestamping Can Turn Network Communication Into Coordinated Measurement.
Software timestamping can include variable: scheduler, driver, queue, latency.
Hardware timestamping closer to the physical interface can improve timing precision.
Timestamp Where the Packet Actually Crosses the Boundary.
A PTP system establishes a reference time source and distributes that time through the network.
Shared Time Needs an Authority.
Synchronization accuracy depends on: oscillator, timestamp hardware, network path, asymmetry.
Protocol Cannot Eliminate Bad Time Hardware.
Network delay must be measured/compensated.
Receiving a Clock Message Is Not the Same as Knowing When It Was Sent.
If forward and reverse network delays differ: Synchronization Can Be Biased.
IEEE 1588 explicitly addresses known path asymmetry correction.
TSN is a family of IEEE 802.1 technologies for bounded/deterministic Ethernet behavior and precise timing.
The TSN standards family continues to evolve; 2025–2026 publications include profiles for automotive and aerospace networks and new fault-tolerant timing extensions to IEEE 802.1AS.
Ethernet Is Becoming More Time-Aware.
Certain TSN architectures can coordinate transmission windows.
Network Scheduling Can Move From Probability Toward Engineered Timing.
Critical traffic can be protected from bulk/background traffic.
Determinism Requires Resource Reservation.
The newly published IEEE 802.1ASed-2026 addresses fault-tolerant timing using multiple time domains/paths and time-integrity mechanisms.
Shared Time Itself Can Need Redundancy and Fault Detection. This is a very advanced point.
Sometimes no standard protocol fully matches the product. Then a custom protocol may be justified.
But custom protocol must still solve: Framing, Versioning, Integrity, Addressing, Timing, Recovery, Security, Custom Does Not Mean Informal.
A robust custom frame may conceptually contain fields such as: Version, Message Type, Length, Transaction / Sequence ID, Payload, Integrity Check, Every Header Field Should Solve a Defined Problem.
Length allows variable payloads and parser validation.
Never Trust a Claimed Length Without Bounds Checking.
Avoid overloaded packets interpreted differently from hidden internal state whenever possible.
Message Meaning Should Be Explicit.
Protocol versioning should exist before: Version 2.
Not after incompatibility appears.
Define whether: v2 client
can communicate with: v1 device.
Compatibility Should Be Designed — Not Discovered.
Instead of assuming every peer supports every feature: Ask / Advertise Capabilities.
This improves evolving product families.
Endpoints can agree on: protocol version, optional features, payload limits.
Negotiate Differences Before Using Them.
Type-Length-Value structures can allow extensible optional information.
Unknown Extension Can Be Skipped if the Protocol Is Designed for It.
Reserve expansion intelligently.
But: Reserved ≠ Undefined Garbage.
Specify receiver behavior.
Protocol specification should define: uint16, int32, float32, boolean, etc.
"integer" Is Often Too Ambiguous.
162 — Signedness
0xFFFF
could mean: 65535 or −1.
Signedness Is Part of the Protocol.
If using IEEE floating-point representation, define: width, byte order, invalid-value semantics, as required.
Same Bytes Need Same Numerical Interpretation.
Resource-constrained systems can use scaled integers.
Example: 12345 → 123.45 units.
Scale Is Part of the Data Contract.
A speed value of: 50
could mean: RPM, rad/s, m/s.
A Number Without a Unit Is Not Complete Engineering Data.
Changing: °C to °F
without versioning can destroy interoperability. Units Belong to the Interface Contract.
Define explicit states: 0 = OFF, 1 = READY, 2 = RUNNING, 3 = FAULT. Enum Values Should Be Version-Controlled.
A newer device may send: 4 = DERATED to older software.
Older Software Should Have a Defined Unknown-Value Behavior.
Protocols can reserve values for: invalid, unavailable, future.
Avoid Using Every Possible Number in Version 1.
CRC detects accidental corruption.
CRC Protects Data Integrity Against Transmission Errors.
It does not prove who created the message.
Simple additive checksums provide weaker detection than well-selected CRCs.
Select Error Detection Based on the Channel and Consequence.
Define whether CRC covers: header, payload, both.
Integrity Scope Should Be Explicit.
CRC cannot stop an intentional attacker from creating another valid CRC.
Error Detection ≠ Security Authentication.
Security-sensitive protocols may require cryptographic: authentication, integrity, replay protection.
Trust Must Be Engineered Above Physical Connectivity.
Encryption protects confidentiality.
But: Not Every Protocol Needs Confidentiality.
Security should follow threat model rather than checkbox engineering.
A valid old command replayed later may still be harmful.
Possible protocol concepts include: counters, nonce, session state.
Authentic Does Not Automatically Mean Fresh.
Network protocols can use established secure transports where appropriate rather than inventing proprietary cryptography.
Build Product Protocols on Mature Security Primitives.
Two connected systems may need to verify: Who Is on the Other End?
Especially for: remote management, critical commands.
Authentication says: Who are you?
Authorization says: What are you allowed to do?
Identity and Permission Are Different Problems.
Every external message is: Untrusted Input.
Validate: length, type, range, state.
A Parser Is a Security Boundary.
A command can be structurally valid but invalid in the current product state.
Example: START CALIBRATION
while: MOTOR RUNNING.
Valid Packet ≠ Valid Operation.
A commanded value: 1,000,000 RPM
should not be accepted simply because it fits into uint32.
Protocol Validation Should Understand Physics.
Some communication requires persistent context: Authentication, Configuration Transaction, File Transfer.
Session State Should Have Clear Creation and Expiration Rules.
Keepalive mechanisms can detect dead peers.
But: Keepalive Interval Determines Detection Latency and Traffic.
A remote peer may reboot while the connection architecture survives/reconnects.
Detect Peer Generation / Session Restart Where State Matters.
A session-generation identifier can distinguish: same device from same device after reboot.
Device Identity and Session Identity Are Different.
Firmware/configuration transfer needs more than large packets.
Consider: size, chunk number, integrity, resume, final verification.
Bulk Data Transfer Is a Protocol Subsystem.
Large data can be segmented into smaller transfer units.
Fragmentation Should Be Explicit and Recoverable.
If a 500 MB transfer fails at 98%: Should It Restart From Zero?
Product requirements determine the answer.
Receiving every chunk does not prove: Correct Complete File.
Verify final content.
Communication carries the update.
But Bootloader/OTA architecture decides: Whether the Device Can Safely Install It.
This connects directly to Page 33.
Do not build diagnostics as an afterthought.
Define controlled messages for: state, errors, counters, versions.
Serviceability Is a Communication Requirement.
Useful counters can include: CRC Errors, Timeouts, Retries, Dropped Frames, Buffer Overflows, Bus-Off Events.
Communication Health Should Be Measurable.
Physical links may expose: error counters, retransmissions, signal metrics.
"Connected" Is Not a Complete Link-Health Metric.
Track: requests, failures, average/max latency, where useful.
Protocol Behavior Can Become an Engineering Dataset.
Complex systems can carry: transaction ID, timestamp, across multiple services.
Follow One Product Event Across Several Devices.
Ethernet protocol debugging benefits from packet capture and protocol analysis.
Inspect What Was Actually Transmitted — Not What the Source Code Intended to Send.
For CAN/RS-485/serial buses, appropriate engineering analyzers can expose: timing, IDs, traffic, errors.
Communication Debugging Should Have Observable Evidence.
For board-level protocols: SPI, I²C, UART.
logic-level capture can correlate: Firmware Events With Real Pins.
A logic analyzer may decode valid-looking data while analog signal quality is marginal.
Digital Decode Does Not Replace Electrical Measurement.
One of the strongest approaches: decoded message and electrical waveform at the same time.
Know What the Bits Mean and Whether the Physics Supports Them.
When a communication error occurs once per day: Create Conditions That Increase Its Probability.
Investigate: traffic, temperature, cable, power, EMI, concurrency.
Examples: I²C NACK → marginal pull-up. Ethernet CRC errors → channel issue. CAN errors → topology/termination issue. UART framing error → clock issue.
Protocol Error Counters Can Be Electrical Diagnostics.
Conversely: buffer overflow, parser bug, task starvation.
can look like: Cable / Hardware Failure.
Debug Across Layers.
An EFT/RF disturbance may create temporary: frame errors, resets, link loss.
Communication Robustness Is an EMC Outcome Too.
Power droop on: PHY, transceiver, MCU.
may appear as: Random Link Failure.
A communication task starved by RTOS priority may produce: Protocol Timeout.
So Page 27 and Page 30 are directly connected.
A protocol is most valuable when: Independent Implementations Agree.
This requires: specification, conformance, test cases.
If customer wants third-party integration: Test Against Real Independent Equipment.
Two devices can contain the same incorrect interpretation and still work perfectly together.
Two Matching Bugs Are Not Standard Compliance.
Standards organizations often provide: test profiles, tools, plugfests for interoperability.
For example, Modbus provides conformance resources for Modbus TCP, while EtherCAT maintains explicit conformance-related processes and documentation.
Standards Compliance Should Be Tested Against the Standard.
For a product ecosystem:
Product | Protocol Version | Hardware | Software | Tested Peer | Result |
Compatibility Should Be Evidence.
In controlled development environments, parsers can be tested with: malformed lengths, unknown messages, invalid combinations to validate safe rejection.
Invalid Input Should Produce Controlled Behavior.
Test: 0 maximum, minimum, one beyond valid.
Most protocol bugs live at boundaries.
Controlled test environments can introduce: loss, delay, duplication, reordering, to validate recovery logic.
Network Assumptions Should Be Tested by Breaking Them.
What happens when normally: 5 ms
becomes: 500 ms?
Slow Is Different From Disconnected.
Cycle: Connect → Disconnect → Reconnect.
many times.
Recovery Is a First-Class Communication Behavior.
Reboot one endpoint during: active transaction, file transfer, command.
Distributed Systems Need Partial-Failure Testing.
Drive traffic beyond expected capacity in a controlled validation environment.
Resource Exhaustion Should Fail Predictably.
Exercise the designed worst-case combination of CAN messages.
Validate Worst-Case Response Time — Not Only Nominal Operation.
Run background traffic while critical communication remains active.
Bandwidth Contention Should Be Part of DVT.
Stress: Communication, Control, Logging, simultaneously.
Protocol Reliability Depends on the Whole Processor Workload.
Oscillators, PHYs and transceivers can behave differently across temperature.
Communication Margin Has Environmental Corners.
For external interfaces, validate representative: length, type, connector, according to product requirements.
Cable Is Part of the Communication Channel.
Communication should recover appropriately from relevant product EMC disturbances.
A Robust Product Doesn't Turn One Corrupted Packet Into Permanent Failure.
If one communication bus fails: Should the Whole Product Fail?
Partitioning can preserve unrelated functions.
High-availability systems may use: redundant links, redundant paths, where consequence justifies complexity.
Redundancy Should Address a Defined Failure Mode.
Two Ethernet ports are not true redundancy if both depend on: same PHY power, same switch, same cable route.
Redundancy Requires Independence Analysis.
The system may detect link loss and move communication to another path.
Failover Time Is a Requirement.
Redundant paths can deliver duplicates.
Availability Architecture Creates Protocol Semantics.
For control systems, a communication command can affect physical behavior.
Communication Integrity Can Become Functional Safety.
Where applicable, system-level safety requirements may require: sequence, timeout, integrity, freshness, redundant checks.
Do not casually claim: safe protocol.
Formal functional safety requires the applicable domain architecture/standard.
CRC Alone Does Not Make Communication Safety-Certified.
Connected interfaces expand product attack surface.
Security design should consider: Who can connect? What can they read? What can they change? Can messages be replayed? How are credentials updated? Communication Interface Is Also a Security Interface.
Every deployed device freezes some version of the communication contract.
Protocol Decisions Can Live Longer Than the PCB.
Version 3 may need to communicate with Version 1.
Compatibility Policy Should Be Written Before Version 3 Exists.
Old messages/features should have: deprecation period, migration path.
Protocol Evolution Needs Governance.
Newer messages may contain fields older devices do not understand.
Extensible Protocols Need Forward-Compatibility Rules.
Ask: What can this peer actually do?
rather than: what do we assume it can do?
Capability Discovery Reduces Version Assumptions.
A real protocol specification should contain: layers, packet format, state, timing, errors, examples, compatibility.
A Header File Is Not a Protocol Specification.
For connection-oriented behavior: OFFLINE → DISCOVERED → CONNECTING → AUTHENTICATED → READY → DEGRADED → RECOVERY
Protocol State Should Be Visible.
Document interactions such as: Startup, Command, Update, Fault Recovery.
Distributed Behavior Needs Interaction Documentation.
Document: Request → Processing → Response
with deadlines.
Time Is Part of the Protocol Contract.
Bit/byte diagrams should define: offsets, widths, endianness.
Protocol Format Should Be Unambiguous Enough for Two Independent Teams to Implement.
Every field:
Field | Type | Unit | Scale | Range | Meaning |
Information Semantics Deserve Documentation.
Define: code, cause, recovery.
"Communication Error 5" Is Not Useful Engineering.
Message | Period | Deadline | Timeout | Priority | Loss Policy |
Timing Should Be Quantified.
Model total traffic before implementation.
Bandwidth Is a Shared Resource.
Especially for deterministic buses: Leave Margin for Faults, retries and future features.
Do not ship architecture already at saturation.
A mature review asks: Physical Layer
Is the interface electrically appropriate?
Framing
Can the receiver recover synchronization?
Data Model
Do both endpoints interpret values identically?
Timing
Are deadlines defined?
Failure
What happens when packets disappear?
Flow Control
Can buffers overflow?
Security
Who may send commands?
Lifecycle
How does version 2 coexist with version 1?
Review the Conversation Before Writing the Parser.
Check: transceiver, termination, isolation, protection, clock.
Protocol Begins in Hardware.
Check: buffers, interrupts, DMA, parser, timeouts.
Hardware Quality Cannot Save a Broken Parser.
Check: task priority, queue depth, blocking.
Communication Timing Depends on Scheduler Architecture.
Check: socket architecture, service ownership, reconnect, process isolation.
Linux Gives Powerful Networking — but Product Policy Still Must Be Designed.
Check: MAC / serial identities, transceiver population, variant, programming.
Communication Identity Can Be a Manufacturing Parameter.
A production test can validate: device identity, local loop, network connectivity, expected protocol response.
A Communication Interface Should Leave the Factory Proven to Communicate.
Ethernet identity must be unique and controlled.
Duplicate Network Identity Is a Manufacturing Defect.
Node IDs/configuration may also need factory assignment.
Logical Network Identity Should Match the Physical Unit.
Security-capable network products may receive cryptographic identity during provisioning.
Manufacturing Can Create Both Electrical and Digital Identity.
Store: Hardware Revision, Firmware, Protocol Version, Configuration.
Communication Compatibility Is Part of Product Traceability.
EVT asks: Can the interfaces communicate correctly?
Focus on: electrical bring-up, framing, basic protocol, diagnostics.
Capture: raw frames, errors, timing.
Early Development Should Make Communication Transparent.
DVT asks: Does communication remain reliable under the real product workload and environment?
Test: peak traffic, reconnect, power states, final cables, temperature, EMC.
PVT validates: identities, programming, approved variants, production test.
Communication Must Become Repeatable Manufacturing Behavior.
Record selected: disconnections, bus errors, retries, protocol versions.
Field Networks Generate Reliability Data.
New firmware can create protocol incompatibility with installed devices.
Regression Testing Should Include Older Peers.
A product fleet may contain: v1, v2, v3, simultaneously.
Protocol Evolution Is Distributed Product Lifecycle Engineering.
A gateway may translate: CAN → Ethernet → MQTT or Modbus → OPC UA.
Protocol Translation Is Semantic Translation — Not Only Packet Translation.
If CAN: 0x123 byte2 = 17
becomes MQTT: motor_temp = 17
the gateway owns: The Meaning Mapping.
A CAN sensor may update: 1000 Hz
while cloud telemetry only needs: 1 Hz.
Gateway Architecture Can Aggregate and Reduce Data.
Don't send every raw event upstream if the product does not need it.
Communication Architecture Can Reduce System Bandwidth at the Edge.
Critical local control should not necessarily depend on: Internet Round Trip.
This is a foundational architecture principle.
This page focuses on: Communication Interfaces + Protocol Behavior.
The next page: 31 — IoT Connectivity & Cloud Integration
will take: Device Connectivity
and extend it into: Provisioning → Device Registry → Cloud Ingestion → Digital Twin → Telemetry → Commands → Fleet Management → Cloud Security → OTA Orchestration → Observability.
So we keep the layers correctly separated.
A 1 Gbit/s Ethernet interface does not guarantee: 1 Gbit/s product data.
A 5 Mbit/s CAN FD data phase does not guarantee: every critical message meets deadline.
Interface Specification Is Not System Performance.
Measure: Latency, Jitter, Throughput, Loss, Recovery Time.
under: Real Workload.
One prototype might work perfectly.
Production introduces variation in: crystal, PCB, cable, transceiver, assembly.
Communication Margin Must Survive Manufacturing.
Consider relevant: Voltage, Temperature, Traffic, Cable, CPU Load, Protocol State, corners.
Reliable Communication Lives at the Worst Useful Combination — Not the Demo Condition.
When a link fails:
don't ask only: Is it software or hardware?
Ask: Which layer first becomes incorrect?
Find the First Broken Layer.
Possible chain: Protocol Timeout → CAN Error Counter Rises → Physical Errors → Cable / Termination / EMC
Follow Evidence Down the Stack.
Application Disconnect → TCP Retransmissions → Frame Errors → PHY Errors → Channel / Power
A Cloud Error Can Begin on the PCB.
Sensor Timeout → SDA Stuck → Rise-Time / Peripheral State → Pull-Up / Power / Reset.
A Driver Error Can Be an RC Circuit.
At the highest level: Product Requirements → Network / Bus Architecture → Physical Interface → Topology → Bandwidth Budget → Latency / Deadline Requirements → Framing → Addressing → Message Architecture → Data Types / Units → CRC / Error Detection → Sequence / Transaction Control → Acknowledgments → Timeouts → Retries → Flow Control → Backpressure → Buffers → State Synchronization → Fault Recovery → Time Synchronization → Protocol Security → Versioning → Capability Discovery → Diagnostics → Conformance → Interoperability → Electrical Measurement → Stress Testing → HIL → EVT → DVT → PVT → Production Provisioning → Field Diagnostics → Protocol Lifecycle → Reliable Exchange of Meaning.
That is the difference between: Moving Bytes and Engineering Communication.
Typical Communication Interface & Protocol Development Deliverables
Depending on project scope, a 365PCB ODM communication program may include: Communication Requirements Specification, Interface Architecture, Network Architecture, Protocol Selection, Physical-Layer Selection, Topology Definition, Bandwidth Budget, Bus-Load Analysis, Latency Requirements, Deadline Requirements, Determinism Analysis, UART Integration, UART Protocol Development, SPI Integration, SPI Protocol Development, I²C Integration, SMBus Integration, RS-232 Integration, RS-485 Architecture, RS-485 Multi-Drop Network, Modbus RTU, Modbus TCP, CAN Architecture, CAN Message Database Inputs, CAN Bus-Load Analysis, CAN Response-Time Inputs, CAN FD Development, CAN XL Feasibility / Architecture Inputs, CANopen Integration, LIN Integration, USB Protocol Integration, USB Device / Host Communication, Ethernet Protocol Development, IPv4 / IPv6, TCP Development, UDP Development, Multicast Inputs, Device Discovery, MQTT Integration, MQTT Topic Architecture, OPC UA Integration, OPC UA Information-Model Inputs, OPC UA Client / Server, OPC UA PubSub Inputs, EtherCAT Integration, Industrial Ethernet Inputs, PTP / IEEE 1588 Integration, Time-Synchronization Architecture, TSN Feasibility Inputs, Custom Binary Protocol, Custom Command Protocol, Framing Architecture, Packet Definition, Message Definition, Addressing Architecture, Transaction Architecture, Request / Response, Publish / Subscribe, Event Architecture, Alarm Architecture, Telemetry Architecture, Protocol State Machine, Connection State Machine, Heartbeat / Health Architecture, Timeout Architecture, Retry Architecture, Reconnection, Flow Control, Backpressure, Buffer Architecture, Queue-Dimensioning Inputs, CRC / Error Detection, Sequence Numbers, Duplicate Detection, Message Freshness, Idempotent Command Inputs, Data-Type Definition, Unit / Scaling Definition, Endianness Definition, Protocol Versioning, Backward Compatibility, Forward Compatibility, Capability Discovery, Feature Negotiation, Protocol Security Inputs, Authentication Inputs, Authorization Inputs, Secure-Transport Integration, Replay-Protection Inputs, Protocol Diagnostics, Communication Error Counters, Logging / Traceability, Packet Capture Analysis, Bus Analysis, Logic-Analyzer Correlation, Oscilloscope Correlation, Protocol Conformance Inputs, Interoperability Testing, Third-Party Integration, Protocol Robustness Testing, Packet-Loss Testing, Latency Testing, Burst-Traffic Testing, Buffer-Overflow Testing, Reconnect Testing, Peer-Reboot Testing, Network-Stress Testing, CAN Load Testing, EMC Communication Validation Inputs, HIL Communication Testing, Gateway Protocol Conversion, Edge Data Aggregation Inputs, Hardware / Software Communication Debug, Communication Root-Cause Analysis, EVT Communication Validation, DVT Communication Validation, PVT Communication Validation, Production Interface Test, Network Identity Provisioning, Protocol Version Traceability, Field Communication Diagnostics, Long-Term Protocol Maintenance, Communication Architecture Documentation.
The actual engineering depth should follow: Distance + Node Count + Bandwidth + Latency + Determinism + Environment + Interoperability + Security + Product Lifecycle.
Bring Us the Communication Problem — Not Just the Protocol Name
You can begin with: System Architecture, MCU / Processor, Interface Type, Existing Protocol, Protocol Specification, CAN Database, Modbus Map, Packet Capture, Bus Trace, Logic Analyzer Data, Timeout Logs, Interoperability Problem, Latency Requirement, Third-Party Device.
or simply: Tell Us What the Two Systems Must Understand — and What Must Happen When Communication Fails.
365PCB can help translate: Electrical Interface → Frames → Protocol → Meaning → Timing → Recovery → Verification → Production.
Don't Just Move the Bytes.
Define the Physical Layer.
Define the Topology.
Budget the Bandwidth.
Define the Deadline.
Design the Frame.
Define the Data Types.
Define the Units.
Detect Corruption.
Detect Lost Messages.
Detect Duplicates.
Define the Timeout.
Define the Retry.
Control the Buffers.
Synchronize the State.
Synchronize the Time.
Authenticate Where Required.
Version the Protocol.
Test Independent Implementations.
Stress the Network.
Measure the Physical Signal.
Make Communication Recoverable.
Make It Interoperable.
Make It Maintainable for the Product Lifecycle.
365PCB Communication Interface & Protocol Development connects: PCB + Signal Integrity + MCU + RTOS + Linux + Drivers + Industrial Networks + Time Synchronization + Security + Testing + Manufacturing