How boards like the ESP32 and BeagleBone Black talk to each other, to sensors, to the network, and to the user's screen — which protocol goes where, and why.
When multiple chips (a sensor, EEPROM, display) sit on one board, distance is measured in centimeters. Speed and simplicity matter most here.
Boards are now physically separate — distance is measured in meters. Reliability and noise immunity take priority.
| Protocol | Connection type | Device count | Distance | Purpose |
|---|---|---|---|---|
| UART | Point-to-point (1-1) | 2 | A few meters | Simple, direct serial transfer between two devices |
| I2C | Master-Slave, same board | Dozens | A few cm | Addressing sensors/chips on the same board |
| CAN | Multi-master bus | Dozens | ~40 m | Reliable, bidirectional board-to-board link in noisy environments |
| RS-485 | Multi-drop bus | Dozens | ~1200 m | Industrial sensor/PLC network via Modbus RTU |
| LIN | Master-Slave bus | ~16 | ~20 m | Cheaper, lower-speed alternative to CAN for in-vehicle actuators |
TWAI_TIMING_CONFIG_100KBITS() on the ESP32 with ip link set can0 type can bitrate 100000 on the BBB.No longer a physical wire — TCP/IP over WiFi or Ethernet. No distance limit; setup and messaging take center stage.
Unlike the others, these aren't a two-way messaging protocol — just one-way video output. Only present on the BBB, not the ESP32.
Cat5 isn't a protocol on its own — it's a carrier. The same cable can carry several protocols using different pairs or signal levels.
| Protocol | How it rides on Cat5 | Feasible on embedded | Extra hardware |
|---|---|---|---|
| Ethernet | Directly over RJ45 | Yes | Already on the BBB; needs an external PHY (LAN8720) on the ESP32 |
| CAN | One twisted pair as CAN_H/CAN_L | Yes | The same CAN transceiver you already use — only the cable changes |
| RS-485 | One differential twisted pair | Yes | UART + MAX485 transceiver |
| PoE | Power + data over unused pairs | Yes | PoE HAT on the BBB; external PoE module on the ESP32 |
| HDMI/USB extender | Via a balun/extender chip | Partly | Implemented in an external extender box, not on the board itself |
How the board "shows up" to the user varies across LogicLab's project ideas.
| Project | Board | User screen | Connection method |
|---|---|---|---|
| OBD-II gateway | ESP32 | In-car / external dashboard | OBD-II cable (CAN) + WiFi/MQTT |
| HIL test rig | BBB / ESP32 | Monitor or computer | HDMI or UART/USB terminal |
| CAN fuzzer + logger | BBB | Terminal / log screen | UART/USB terminal or live HDMI log |
| CAN → MQTT bridge | ESP32 / BBB | Web dashboard, phone | WiFi + MQTT → Grafana/Node-RED |
| AUTOSAR BSW prototype | ESP32 / BBB | Diagnostic terminal | UART/USB terminal debug output |
Every protocol has its own standard speed tiers. The rule is always the same: both ends of the line have to agree on the same value, or data gets read wrong — or not at all.
| Protocol | Typical speed values | Note |
|---|---|---|
| UART | 9600 · 19200 · 38400 · 57600 · 115200 bps | Must match exactly on both devices; debug output usually runs at 115200 |
| I2C | 100 kHz · 400 kHz (Fast) · 1 MHz (Fast+) | Set by the master; must not exceed what the slave supports |
| SPI | A few MHz – 50+ MHz | Upper limit set by the chip's datasheet |
| CAN | 100 kbit/s · 125 kbit/s · 250 kbit/s · 500 kbit/s · 1 Mbit/s | Standard ISO 11898 tiers; must match exactly across every node |
| RS-485 (Modbus) | 9600 · 19200 · 115200 bps | Modbus RTU typically runs at 9600 or 19200 |
| LIN | 19.2 kbit/s (upper limit) | Usually runs at 9.6 or 19.2 kbit/s |
| Ethernet | 10 · 100 · 1000 Mbit/s | The BBB's RJ45 port supports 10/100 Mbit/s |
| WiFi (802.11n/ac) | Tens to hundreds of Mbit/s | MQTT traffic uses only a small fraction of this |
main.cpp in VS Code / PlatformIO, you'll usually run into two different speed lines — these belong to two separate physical links, not one.
Serial.begin(115200); // (1) Computer <-> board — UART/USB, debug output only
TWAI_TIMING_CONFIG_100KBITS(); // (2) Board <-> board — CAN bus, the actual data link
Serial1.begin(9600); — that one is entirely independent from the computer-board line, and it's the line that must match the other board exactly.Serial vs Serial1/Serial2 vs twai_/CAN. vs Wire.).