Skip to content

commaai/qdl.js

Repository files navigation

qdl.js

Development

bun install

# to add scripts like `qdl.js` and `simg2img.js` to your path
bun link

Test

Run tests in watch mode

bun test --watch

Lint

Check for linting problems

bun lint

You can also install the Biome extension for VS Code, Zed and IntelliJ-based editors.

Build

Bundles JS and generates type declarations

bun run build

Linux instructions

Web

On Linux systems, the Qualcomm device in QDL mode is automatically bound to the kernel's qcserial driver, which needs to be unbound before the browser can access the device. This doesn't appear to be necessary in other environments like Node.js and Bun.

# List all devices currently bound to qcserial
ls -l /sys/bus/usb/drivers/qcserial/ | grep '^l'
# Unbind any devices from the qcserial driver
for d in /sys/bus/usb/drivers/qcserial/*-*; do [ -e "$d" ] && echo -n "$(basename $d)" | sudo tee /sys/bus/usb/drivers/qcserial/unbind > /dev/null; done

After running the unbind command, verify no devices are bound to qcserial by running the first command again.

Desktop

Create a file at /etc/udev/rules.d/99-qualcomm-edl.rules containing the following udev rule:

SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", ATTR{idProduct}=="9008", MODE="0666"

Reload udev rules and apply changes:

sudo udevadm control --reload-rules
sudo udevadm trigger