From Linklayer
Jump to: navigation, search

The candleLight firmware is an alternative firmware for CANtact which implements the gs_usb protocol. This is supported by the mainline Linux kernel and SocketCAN. It does not require use of slcand and should be more reliable at high bitrates. For this reason, candleLight is recommended if you are only using CANtact on Linux.

The candleLight firmware was written by Hubert Denkmair, and is released under the MIT license. The source code is available on Github. Thanks to Hubert for his work on this project!

Flashing candleLight

  1. Flashing requires the dfu-util tool. On Ubuntu, this can be installed with sudo apt install dfu-util.
  2. Download the current binary release: gsusb_cantact_8b2b2b4.bin
  3. Disconnect the USB connector from the CANtact, short the BOOT pins, then reconnect the USB connector. The device should enumerate as "STM32 BOOTLOADER".
  4. Flash the device with: sudo dfu-util --dfuse-address -d 0483:df11 -c 1 -i 0 -a 0 -s 0x08000000 -D gsusb_cantact_8b2b2b4.bin
  5. Disconnect the USB connector, un-short the BOOT pins, and reconnect. The device is now flashed!

Using candleLight

  1. Ensure the gs_usb kernel module is enabled: sudo modprobe gs_usb
  2. Configure the device: sudo ip link set can0 type can bitrate 500000. Replace can0 with the name of your device, and 500000 with the desired bitrate.
  3. Bring the device up: sudo ifconfig can0 up
  4. Use the device with SocketCAN. For example, candump can0. See SocketCAN for more information.