ESP32 Bit Pirate

ESP32-S3 CAN bus debugging with MCP2515

Sniff and send CAN frames with MCP2515

ESP32 Bit Pirate turns a compatible ESP32-S3 board plus an MCP2515 module into a CAN bus debugging workbench. Use it to configure bitrate, check controller status, sniff frames, receive specific IDs and send controlled test frames.

CAN bus debugging visual with an ESP32 board, MCP2515 module and CANH CANL bus

Quick CAN workflow

Start passively. Confirm wiring, bitrate and MCP2515 status before trusting frames, and send only on a controlled bus where test traffic is allowed.

  1. 01

    Wire the MCP2515 module to the ESP32 Bit Pirate SPI pins, fixed CAN CS, power and shared ground.

  2. 02

    Connect CANH and CANL through a compatible CAN transceiver to a safe, terminated test bus.

  3. 03

    Start CAN mode, configure bitrate and check the selected MCP2515 pin settings.

  4. 04

    Run status first, then sniff all frames or receive one known frame identifier.

  5. 05

    Send a controlled standard frame only after the adapter is healthy and the bus is yours to test.

mode can
config
status
sniff
receive 0x123
send 0x123

Example CLI flow. See the CAN wiki for exact syntax, bitrate options, MCP2515 pin configuration and firmware-specific behavior.

CAN workflows covered by ESP32 Bit Pirate

Use this overview to choose the right MCP2515 CAN workflow before opening a detailed recipe.

Wire

MCP2515 CAN module setup

Connect the SPI control side and CANH/CANL bus side separately so wiring mistakes are easier to isolate.

Status

MCP2515 status check

Inspect controller state and error flags before assuming the target bus, bitrate or firmware command is wrong.

Sniff

CAN frame sniffing

Capture visible frames after bitrate and termination are confirmed, using passive observation as the first useful test.

Filter

Receive one CAN frame ID

Focus logging on a known identifier when a full frame stream is too noisy or you are validating a specific response.

Send

Controlled standard CAN frames

Transmit an 11-bit standard frame only on a lab bus or authorized system where test traffic cannot cause harm.

Diagnose

Bitrate and bus error checks

Separate wrong bitrate, missing termination, swapped CANH/CANL and SPI-side MCP2515 wiring before deeper analysis.

When an ESP32-S3 CAN workbench helps

CAN debugging often starts with basic electrical and controller checks. A small external workflow can show whether the module, bitrate and bus are plausible before any application-level decoding.

Unknown bitrate

Before parsing messages

Match the expected CAN bitrate first. A wrong bitrate can look like a silent or broken bus even when frames are present.

Adapter bring-up

Before trusting captures

Use status to check MCP2515 state and error flags before spending time on frame filters or application data.

Lab validation

Before sending traffic

Build a controlled test bus with known termination and another node before using send workflows.

CAN hardware reminders

These notes stay short. The detailed command references live in the project documentation and firmware repository.

MCP2515 module

CAN mode uses an MCP2515 controller module connected through SPI. Keep the SPI control wiring separate from the CANH/CANL bus wiring during checks.

Transceiver and bus

The MCP2515 controller still needs a compatible CAN transceiver path to reach CANH and CANL on a real bus or test fixture.

Bitrate and termination

Match the bus bitrate and verify termination. Wrong bitrate or missing termination is a common cause of empty captures and controller errors.

Authorized testing

Use read-only sniffing first. Send frames only on hardware you own or are explicitly allowed to test.

Common CAN problems

Most CAN failures come from wrong bitrate, missing termination, CANH/CANL mistakes, SPI-side MCP2515 wiring or active transmissions on a bus that should stay passive.

No frames visible

Check bitrate, bus activity, termination, CANH/CANL wiring and whether the MCP2515 status reports controller errors.

Status shows errors

Recheck bitrate, transceiver wiring, bus power, termination and whether another node is actually present on the test bus.

SPI probe fails

Check SCK, SI/MOSI, SO/MISO, the fixed CAN CS pin, ground and module power before touching CANH/CANL.

Receive filter is silent

Sniff all frames first to confirm the ID exists, then switch to receive 0x123 for focused logging.

Send is not observed

Use a second node or another adapter to confirm the frame, and verify standard 11-bit ID range, bitrate and bus health.

Detailed CAN recipes

These pages are the task-level MCP2515 CAN workflows. This overview keeps the protocol-level guidance here, while each recipe covers setup, commands and troubleshooting in detail.

Useful CAN references

This page is a protocol overview. Use the site index for the full web experience, or GitHub for source code, firmware documentation and the CAN command reference.

Flash ESP32 Bit Pirate

Flash a supported ESP32-S3 board before testing CAN mode from the browser.

Open Web Flasher

CAN command reference

Open the maintained firmware wiki for CAN mode commands, MCP2515 configuration and usage notes.

Open CAN command reference

Logic Analyzer

Capture SPI-side SCK, SI, SO or CS timing when you need to inspect MCP2515 control signals.

Open Logic Analyzer

ESP32 Bit Pirate GitHub

Check firmware source, issues and releases that affect CAN support.

Open GitHub repository

CAN debugging FAQ

Short answers for common questions before moving into a detailed workflow.

Can ESP32 Bit Pirate sniff CAN frames?

Yes. With a wired MCP2515 CAN module and matching bitrate, ESP32 Bit Pirate can use CAN mode to sniff frames on an authorized test bus.

Does ESP32 Bit Pirate need an MCP2515 module for CAN?

Yes. CAN mode is built around an MCP2515 controller module connected through SPI, plus the correct CANH and CANL bus connection through a compatible transceiver.

Should I send CAN frames on an unknown bus?

No. Start with wiring, bitrate, status and passive sniffing. Send frames only on a lab bus or a system you own and are explicitly allowed to test.