matlab-use-vehicle-network

Configure, diagnose, and analyze CAN and CAN FD vehicle network communication in MATLAB.

995|122|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-use-vehicle-network
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matlab-use-vehicle-network
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/test-and-measurement/matlab-use-vehicle-network
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-use-vehicle-network

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Setting up vehicle network communication in MATLAB involves vendor-specific channel syntax, bus speed configuration differences, and cryptic failures like missing acknowledgments or BusOff states. This Skill guides an AI agent through the full Vehicle Network Toolbox workflow so users avoid misconfigured channels, silent transmit failures, and unstructured troubleshooting.

Core Features & Use Cases

  • Hardware Discovery and Channel Setup: Discover devices with canChannelList and create CAN or CAN FD channels across Vector, Kvaser, PEAK-System, NI, SocketCAN, and MathWorks Virtual hardware with correct vendor-specific syntax.
  • Message Exchange and Signal Handling: Transmit (one-shot, periodic, event-based, replay), receive as timetables, filter IDs at the hardware level, and encode/decode signals via DBC databases or pack/unpack.
  • Structured Diagnostics: Follow a phased diagnostic workflow covering automated hardware checks, L1 physical-layer triage (termination, ground, bit timing, CAN FD stubs), and L2 traffic analysis with error counter interpretation.
  • Use Case: A test engineer connects a Kvaser interface, creates a CAN FD channel at 500k/2M, transmits periodic engine messages with live signal updates via pack, then verifies bus health using TEC/REC counters after every transmit.

Quick Start

Ask the agent to set up a CAN channel on your connected hardware, configure the bus speed, and send a test message while verifying the bus accepted it.

Frequently Asked Questions about matlab-use-vehicle-network

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I send and receive CAN messages in MATLAB?

Create a channel with canChannel(vendor, device, index), call configBusSpeed, then start(ch). Use transmit(ch, msg) to send canMessage objects and receive(ch, Inf) to read messages from the FIFO buffer as objects or a timetable.

How do I configure CAN FD bus speed in MATLAB Vehicle Network Toolbox?

Call configBusSpeed before start with vendor-specific syntax. NI and MathWorks Virtual accept the simple 3-argument form, while Vector and Kvaser require a 9-argument timing form and PEAK-System requires a 10-argument clock-based form.

Which CAN hardware vendors does Vehicle Network Toolbox support?

Supported vendors are Vector, Kvaser, PEAK-System, NI, SocketCAN, and MathWorks Virtual. Vector and NI are Windows-only, SocketCAN is Linux-only, and Kvaser and PEAK-System work on both platforms with vendor drivers installed.

Why does my CAN transmit appear to succeed but nothing is received?

The transmit function is non-blocking and returns immediately regardless of bus state. Check TransmitErrorCount, ReceiveErrorCount, and BusStatus after transmitting; TEC=128 with REC=0 means no other node acknowledged the frame.

Can I decode CAN signals from a DBC file in MATLAB?

Yes, load the file with canDatabase, then attach it to received message objects using attachDatabase to access the Signals struct. Messages created with canMessage(db, name) are auto-attached and handle factor, offset, and byte order automatically.

When should I not use this vehicle network skill?

Avoid it for logging or replaying BLF files without live communication, building Simulink vehicle network models, or creating and editing DBC, LDF, or A2L database files. J1939 and XCP protocols are architected but not yet documented.