The VESC firmware exposes a USB CDC (Communications Device Class) serial interface. This lets a host computer communicate with the VESC using the same serial packet protocol used over UART, without any additional drivers on most operating systems.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/vedderb/bldc/llms.txt
Use this file to discover all available pages before exploring further.
How it works
When you plug a VESC into a computer via USB, it enumerates as a virtual serial port (CDC ACM device). The operating system assigns it a port name such as/dev/ttyACM0 on Linux, /dev/cu.usbmodem* on macOS, or COMx on Windows.
VESC Tool detects this port and connects to it automatically. All configuration, motor control, real-time data display, and firmware updates flow through this interface.
The USB interface is implemented in comm/comm_usb.c and exposes the following API:
Connecting with VESC Tool
Connect the VESC via USB
Plug the VESC into your computer using a USB cable. The device should enumerate as a virtual serial port.
Open VESC Tool
Launch VESC Tool. It will scan for connected devices and list available serial ports.
Connection settings
Because USB CDC is a virtual serial port, there is no physical baud rate — data is transferred at USB full-speed (12 Mbit/s). Any baud rate selected in a serial terminal application is ignored by the device.If you are connecting with a generic serial terminal instead of VESC Tool, you still need to select a baud rate in your terminal application. The value does not affect communication speed, but
115200 is a conventional default.Protocol over USB
The VESC USB interface uses the same framed serial protocol as UART. Bytes received from the host are fed through the packet layer (comm/packet.c), which handles framing, length, and CRC validation before passing complete packets to commands_process_packet.
See the UART protocol page for the full packet format and command reference.
Troubleshooting
Device not recognized / no port appears
Device not recognized / no port appears
- On Linux, ensure your user is in the
dialoutgroup:sudo usermod -aG dialout $USER(requires re-login). - On Windows, install the STM32 Virtual COM Port driver if the device does not enumerate automatically.
- Try a different USB cable — some cables are power-only and carry no data.
VESC Tool fails to connect
VESC Tool fails to connect
- Verify no other application (e.g., a serial terminal) is holding the port open.
- Disconnect and reconnect the USB cable, then try again.
- Check App Settings -> General -> CAN Mode is not set to a mode that interferes with USB communication.
Write timeouts (comm_usb_get_write_timeout_cnt)
Write timeouts (comm_usb_get_write_timeout_cnt)
A non-zero write timeout count indicates the host is not reading data fast enough. This can happen if VESC Tool is paused or closed while the firmware is actively sending data. Reconnecting clears the condition.
