Site Information

 Loading... Please wait...

Blog

Building Wireless CAN Gateways with ESP32-S3

Posted by Wilfried Voss on

Building Wireless CAN Gateways with ESP32-S3The convergence of wireless networking and CAN bus technology is opening entirely new possibilities for automotive, industrial, agricultural, and embedded systems. Instead of connecting a laptop directly to a CAN network with a USB cable, engineers increasingly want remote access through Wi-Fi, Bluetooth, or Bluetooth Low Energy (BLE). Whether monitoring a machine from across a factory floor, collecting diagnostic data from a fleet of vehicles, or building an Industrial IoT gateway, the ESP32-S3 has become one of the most capable and affordable platforms available.

ESP32S3 Board with CAN FD and Classical CAN PortsEven more compelling is the availability of hardware that combines both Classical CAN and CAN FD on a single development board. The ESP32-S3 Board with CAN FD and Classical CAN Ports serves as an excellent example of such a platform, allowing developers to focus on firmware development rather than hardware design. It combines wireless connectivity, modern processing power, and dual CAN interfaces into one compact solution suitable for prototypes as well as production-ready applications.

Why Wireless CAN Gateways?

Traditional CAN interfaces connect directly to a PC through USB. While this remains the preferred solution for development, wireless connectivity offers significant advantages:

  • Remote diagnostics without physical access

  • Fleet-wide monitoring

  • Mobile service applications

  • Wireless firmware updates

  • Cloud-connected data logging

  • Portable handheld diagnostic tools

  • Industrial IoT integration

Instead of bringing a computer to the machine, the machine becomes available on the network.

The ESP32-S3 Advantage

The ESP32-S3 is far more than another microcontroller. It integrates wireless communication, substantial memory resources, and high processing performance into a single chip.

Key capabilities include:

  • Dual-core Xtensa LX7 processor operating up to 240 MHz

  • Hardware floating-point unit

  • 8 MB Flash

  • 8 MB PSRAM

  • Native USB OTG

  • Wi-Fi 802.11 b/g/n

  • Bluetooth 5

  • Bluetooth Low Energy (BLE)

  • Bluetooth Mesh support

  • Excellent Arduino IDE support

  • Extensive ESP-IDF software ecosystem

This combination makes the ESP32-S3 particularly attractive for communication gateways, where multiple protocols must operate simultaneously.

Supporting Both Classical CAN and CAN FD

Many industries currently operate mixed environments.

Older equipment often communicates through Classical CAN operating up to 1 Mbps, while newer systems increasingly rely on CAN FD for higher throughput and larger payloads.

The featured development board supports both technologies simultaneously:

Classical CAN

The ESP32-S3 includes Espressif's built-in TWAI controller, providing native support for Classical CAN (CAN 2.0A and CAN 2.0B). An onboard high-speed CAN transceiver connects the controller directly to the bus.

Typical applications include:

  • J1939

  • CANopen

  • DeviceNet

  • NMEA 2000

  • Proprietary industrial protocols

CAN FD

For modern applications, the board incorporates a dedicated Microchip MCP2518FD controller connected through SPI.

CAN FD provides several advantages:

  • Data rates up to 8 Mbps

  • Payloads up to 64 bytes

  • Higher overall throughput

  • Reduced bus utilization

  • Improved efficiency for larger data transfers

The result is a development platform capable of supporting both legacy and next-generation CAN networks.

Gateway Architecture

A wireless CAN gateway generally follows a straightforward architecture:

Classical CAN
      │
CAN Controller (TWAI)
      │
 ESP32-S3 Application
      │
 Wi-Fi / BLE / Bluetooth
      │
 Smartphone
 Laptop
 Cloud Server
 MQTT Broker
 REST API

For CAN FD applications:

CAN FD
     │
MCP2518FD
     │
 ESP32-S3
     │
Wireless Network

The gateway firmware receives CAN messages, processes them if necessary, and forwards them over the selected wireless interface.

Wi-Fi Connectivity

Wi-Fi is the natural choice whenever bandwidth is important.

Typical Wi-Fi applications include:

Remote Monitoring

Operators can monitor machine parameters from anywhere on the local network.

Embedded Web Servers

The ESP32-S3 can host a web interface that displays:

  • Live CAN traffic

  • Diagnostic information

  • Error counters

  • Bus load

  • Configuration settings

No dedicated PC software is required.

Cloud Connectivity

CAN data can be uploaded to cloud services using:

  • MQTT

  • HTTPS

  • WebSockets

  • REST APIs

Applications include:

  • Predictive maintenance

  • Fleet management

  • Industrial monitoring

  • Long-term data logging

Bluetooth Classic

Bluetooth Classic remains an excellent choice for direct communication between the gateway and nearby devices.

Typical applications include:

  • Laptop diagnostics

  • Mobile configuration utilities

  • Portable service tools

  • Wireless serial replacement

Many existing desktop and Android applications can communicate over Bluetooth without requiring a Wi-Fi infrastructure.

Bluetooth Low Energy (BLE)

BLE is increasingly becoming the preferred wireless technology for battery-powered and mobile devices.

Possible applications include:

Mobile Apps

A smartphone application can:

  • Display live CAN values

  • Configure gateway parameters

  • Retrieve diagnostic information

  • Perform firmware updates

Wireless Sensors

BLE peripherals can transmit additional sensor information to the gateway, allowing CAN data to be combined with:

  • Temperature

  • Humidity

  • GPS

  • Pressure

  • Vibration

  • Environmental measurements

Low Power Operation

BLE's reduced power consumption makes it suitable for portable diagnostic equipment and battery-powered gateways.

Combining Multiple Wireless Interfaces

One of the ESP32-S3's greatest strengths is its ability to support multiple communication methods within the same application.

A single gateway might simultaneously:

  • Receive J1939 traffic on Classical CAN

  • Receive CAN FD messages

  • Publish selected parameters over Wi-Fi using MQTT

  • Accept configuration commands through BLE

  • Provide a USB diagnostic interface

  • Log data to onboard memory

Such flexibility enables developers to create highly capable embedded systems without additional processors.

Typical Gateway Applications

The hardware lends itself to a wide range of professional applications.

Wireless CAN Data Logger

Store CAN traffic locally while allowing remote access through Wi-Fi.

Fleet Telematics

Transmit selected vehicle information to a central server.

Industrial IoT Gateway

Bridge factory equipment to cloud services.

Wireless Diagnostics

Replace lengthy USB cables with Bluetooth or Wi-Fi connections.

Protocol Translation

Receive messages from one CAN network, process them, and retransmit them on another network.

Mobile Service Tool

Develop portable diagnostic devices using smartphones or tablets as the user interface.

Software Development

Developers have several software options available.

Arduino IDE remains an excellent choice for rapid prototyping and proof-of-concept development.

For larger commercial projects, the ESP-IDF framework provides:

  • Advanced networking

  • BLE services

  • Secure communication

  • File systems

  • OTA firmware updates

  • Real-time operating system support

Because the board exposes both CAN interfaces, developers can build sophisticated gateway software without designing custom hardware.

Hardware Designed for Professional Projects

The development board includes features that simplify deployment beyond the laboratory.

Highlights include:

  • Native USB-C programming

  • High-speed CAN transceivers

  • Wide 7–24 V power input

  • Reverse polarity protection

  • Onboard RGB status LED

  • I²C expansion connector

  • Compact PCB layout

These features make the platform suitable for both development and deployment in demanding automotive and industrial environments.

Looking Ahead

Wireless connectivity is rapidly becoming an expected feature of embedded systems. At the same time, CAN FD continues to gain traction across automotive, heavy-duty vehicle, agricultural, and industrial applications.

A development platform combining Wi-Fi, Bluetooth, BLE, Classical CAN, and CAN FD provides engineers with exceptional flexibility. Whether the goal is remote diagnostics, Industrial IoT, fleet management, wireless data logging, or protocol conversion, the ESP32-S3 delivers the processing power and connectivity needed to build modern gateway solutions.

For developers looking to explore wireless CAN applications, the ESP32-S3 Board with CAN FD and Classical CAN Ports offers an outstanding starting point. By integrating native Classical CAN, dedicated CAN FD hardware, advanced wireless communication, and a powerful dual-core processor into a single platform, it significantly shortens development time while leaving ample room for innovation.


The Wireless Cookbook- Build Real Projects and Master Wi-Fi, Bluetooth, and LoRaThe Wireless Cookbook: Build Real Projects and Master Wi-Fi, Bluetooth, and LoRa

Wi-Fi, Bluetooth, and LoRa power the connected world, but building reliable wireless systems is rarely as simple as it seems. Connections drop unexpectedly, documentation leaves out critical details, and error messages often create more questions than answers.

This book takes a practical, hands-on approach to wireless development with Raspberry Pi and Linux. Through a collection of self-contained projects, you'll learn not only how today's wireless technologies work, but also how to troubleshoot them, control them, and build systems that perform reliably in real-world applications. Every project is designed to be both educational and immediately useful, providing a solid foundation you can adapt to your own designs.

Among the many projects in this book, you'll build:

  • A BLE audio receiver for high-quality wireless sound
  • A battery-powered LoRa node capable of communicating over miles
  • A self-healing Wi-Fi mesh network
  • A real-time signal strength monitor with a mini TFT display
  • A wireless intrusion detection system with a captive portal

As you progress through the projects, you'll develop a practical understanding of Linux networking, master wireless technologies including IEEE 802.11 Wi-Fi, Bluetooth Low Energy (BLE), and LoRaWAN, and gain the confidence to design, deploy, and troubleshoot your own wireless solutions.

Each chapter focuses on a real-world wireless challenge, guiding you from understanding the underlying concepts to building a working solution you can immediately put to use.

Wireless development doesn't have to be mysterious. With Raspberry Pi, Linux, and this book as your guide, you'll have the knowledge and practical experience to build wireless systems that simply work. More information...

ESP32-S3 MicroPython Programming for CAN Bus and NMEA 2000

The embedded systems world has traditionally been dominated by C and C++, but over the past several years another language has been gaining remarkable momentum: Python. More specifically, MicroPython has become one of the most attractive development environments for engineers who want to prototype and deploy embedded applications quickly without sacrificing access to the underlying [...]

Read More »