Skip to main content

can_bus_toolkit 0.1.0 copy "can_bus_toolkit: ^0.1.0" to clipboard
can_bus_toolkit: ^0.1.0 copied to clipboard

PlatformAndroid

CAN bus toolkit for Android over USB OTG: PCAN-USB and SLCAN adapters, candump logging, ISO-TP, OBD-II and UDS clients, and DBC signal decoding.

0.1.0 #

Initial release. Android only. Requires API 24 or later.

core #

  • CanFrame, CanId, CanConfig, CanBitrate (10 kbit/s to 1 Mbit/s), CanFilter, and the CanBus interface with periodic sending.
  • VirtualCanBus and VirtualCanNetwork, with optional ACK and bitrate-mismatch simulation.
  • Bus statistics: frames per second, per-ID rates, error and dropped counts, and bus load with worst-case bit stuffing.
  • candump -L reader and writer, and CanLogReplayer. The replayer skips diagnostic frames by default.

usb #

  • USB OTG transport for PEAK PCAN-USB, and for SLCAN and gs_usb adapters (experimental).
  • Listen-only mode, hardware timestamps, error counters and bus state where the adapter supports them. UsbCanBus.capabilities reports what the device supports.
  • Device attach and detach events, the USB permission flow, and optional auto-reconnect.
  • Native frame batching with a bounded queue and a dropped-frame counter.
  • Background candump logging from an app-declared connectedDevice foreground service.
  • CanUsb.registerDevice for clone adapters.

obd #

  • ISO-TP (ISO 15765-2) channel with flow control, block size, STmin and padding.
  • OBD-II client:
    • modes 01, 02, 03, 04, 07, 09 and 0A
    • 11-bit and 29-bit addressing, and multi-ECU responses
    • PID polling
    • auto-detection that listens before it transmits
  • UDS client: session control, read/write DID, DTCs, security access, tester present, and "response pending" handling.
  • State-changing services need allowWrites: true.
  • ObdEcuSimulator for tests and demos.

dbc #

  • DBC parser with line and column errors, and warnings for tolerated input.
  • Signal decode and encode:
    • Intel and Motorola byte order
    • signed, float and double values
    • value tables and multiplexing
0
likes
160
points
54
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

CAN bus toolkit for Android over USB OTG: PCAN-USB and SLCAN adapters, candump logging, ISO-TP, OBD-II and UDS clients, and DBC signal decoding.

Repository (GitHub)
View/report issues

Topics

#can-bus #obd #automotive #usb #iot

License

MIT (license)

Dependencies

clock, flutter, meta

More

Packages that depend on can_bus_toolkit

Packages that implement can_bus_toolkit