Native socketcan support for mjcanfd-usb-1x
Since the fdcanusb, and subsequently the mjcanfd-usb-1x, have been released, the only interface they presented to a PC host was a USB CDC (communication class device). That meant they appeared as a modem, on linux as /dev/ttyACMx and on Windows as COMx. Sending and receiving frames was pretty simple using a basic line based protocol.
This works fine as long as you are either using the mjbots tools, or designing a complete custom application. However, if you want to use the adapter with other CAN or CAN-FD based applications on Linux, there wasn’t a whole lot you could do. There was a simple daemon which, with a fair amount of effort, would make the hardware appear as a slcan device, but that was finicky and hard to get working and not terribly reliable.
To rectify that limitation, I’m announcing a new feature that allows the mjcanfd-usb-1x (and fdcanusb) to report as a composite USB device that supports both the exact same CDC based protocol as before, as well as a gs_usb (Geschwister Schneider) device which allows use with a native Linux socketcan driver and python-can. This allows you to use a mjcanfd-usb-1x as a generic CAN-FD analysis tool much more easily, since any normal linux socketcan application will work with it out of the box.
If you have a mjcanfd-usb-1x with the new firmware, all you have to do to use the new interface is to use the appropriate socketcan tools as with any other adapter. For instance, the commands from the moteus reference for socketcan will configure the bus suitably to communicate with moteus controllers:
ip link set can0 up type can \
bitrate 1000000 dbitrate 5000000 \
sjw 10 dsjw 5 \
sample-point 0.666 dsample-point 0.666 \
restart-ms 1000 fd on
Caveats
python-can
python-can has support for gs_usb devices as well, which means you can use the mjcanfd-usb-1x on Windows with any python-can application. However, as of December 2025, python-can only really supports CAN 2.0 for gs_usb/candlelight devices. Thus if you want CAN-FD support, python-can on Windows is not an option.
Performance
The socketcan interface is no more performant than the CDC interface for the vast majority of uses. mjbots tools default to using the CDC interface if both are present.
Simultaneous interface use
The device does not prevent you from using both the CDC and gs_usb interface at the same time. Doing so will likely work, for some definitions of “work”, but is not recommended.
Updating
As with other mjcanfd-usb-1x upgrades, this one can only be applied to existing hardware using a STM32 SWD programmer like the one in the mjbots store: stm32 programmer
Once that is connected, you can download the most recent firmware release and flash it using:
sudo apt install openocd
./flash.py path/to/20260108-fdcanusb-46e1673acb42c476e07a57f90b9dd06451fb21b2.elf