Skip to content

Releases: madprogrammer/python-can-busmust

0.1.0 — hardware-validated release

Choose a tag to compare

@madprogrammer madprogrammer released this 07 Oct 10:09

First release validated on physical adapters: two X1 units (firmware 2.2.4.10)
wired together — bidirectional classical CAN and CAN FD across 125 k – 1 Mbit/s
with data phases to 5 Mbit/s, every DLC length, extended IDs, RTR, software
filters, termination, TX echoes, and zero-loss 1000-frame bursts.

Changes since 0.1.0a1

  • Fixed silent first-frame loss after channel open: the firmware discards
    bulk frames submitted while switching operating modes, so channel open now
    waits 10 ms after the mode command before returning.
  • Automatic recovery of channels that come up latched in bus-off (about 4%
    of opens on Gen2/2.5 firmware), using the reference driver's loopback
    dummy-frame procedure; opens that stay bus-off fail with
    CanInitializationError instead of silently dropping frames.
  • Added BusMustBus.recover_bus_off(), the BMAPI BM_RecoverBusOff()
    equivalent: firmware-side recovery (control 0xF5) on Gen2/2.5 firmware
    ≥ 2.6.0.0 and Gen3 ≥ 3.1.0.0, with the retried loopback dummy-frame fallback
    for older adapters. send() probes controller health at most twice a second
    and raises CanOperationError while bus-off instead of silently discarding
    frames, or recovers and retries once when auto_recover_bus_off=True. The
    firmware version is read at open and shown in channel_info.
  • Hardened interpreter-exit cleanup: open channels are released
    best-effort, closed sessions never touch libusb again, and a wedged reader
    no longer corrupts cleanup.

0.1.0a1 — initial alpha

Pre-release

Choose a tag to compare

@madprogrammer madprogrammer released this 06 Oct 19:09

Initial alpha release of a native Python/PyUSB BUSMUST driver, registered as the busmust interface in python-can.

Not yet validated on physical hardware. This independent project is ready for early adapter testing; APIs and firmware compatibility may change.

Features include Classical CAN and CAN FD, shared multi-channel USB access, software filters, termination and bitrate configuration, timestamps, controller status, and requested TX echoes. Hardware TX tasks, offline storage/routing, and firmware-specific bus-off recovery are not implemented.

Validation: 64 automated tests passed locally, including an ISO-TP multi-frame exchange, cantools DBC round trip, asynchronous listeners, USB failure handling, and installed-wheel checks. Tested Python 3.9/3.14 and python-can 4.3/4.6 combinations; all USB traffic in tests is simulated.

The wheel and source archive are attached. See the README for libusb setup and examples/loopback.py for the first hardware smoke test. Please report model/product ID, firmware version, operating system, and CAN timing settings with hardware results.

Available on PyPI:

python -m pip install python-can-busmust==0.1.0a1

CI tests and packaging checks pass on Linux, macOS, and Windows.