Cyphal Yakut vs. SLCAN Adapter on Windows

Hi All,

i have a usb can device on my desk which runs a slcan firmware. In general the device works with a slcan compatibile monitor software. But to test my cyphal implemeatation i want to run yakut on my dev machine (Windows:::).

i tried the following code to setup yakut monitor

# .env file
UAVCAN__CAN__IFACE='slcan:COM6'
UAVCAN__CAN__MTU=8
UAVCAN__NODE__ID=1
UAVCAN__CAN__BITRATE=500000
# python code
import os;
from dotenv import load_dotenv
load_dotenv('.env')

os.system("yakut monitor")

The above gives the Error: InvalidMediaConfigurationError: Interface does not support CAN FD: slcan
This error is mentioned in an other thread here as well and the suggestion was to use “socketcan:slcan” but how do is set the serial port for slcan?

Are there any opensource CAN-FD cappable usb-can adapters around?

Thanks

Alex

RTFM! :grin:

The error says that the selected media does not support CAN FD. So you need to tell Yakut (actually PyCyphal) to use Classic CAN, not CAN FD.

The Yakut manual links the docs for pycyphal.application.make_transport(). The docs say (highlighted):

Hence the solution is:

UAVCAN__CAN__IFACE='slcan:COM6'
UAVCAN__CAN__MTU=8
UAVCAN__NODE__ID=1
UAVCAN__CAN__BITRATE=500000 500000

This actually can be improved. We should set single_bitrate=True if the second one (i.e., the data phase bitrate) is zero:

A pull request improving this would be welcome.

P.S. you are using a very roundabout way of exporting environment variables. Can you not just use PowerShell with a decent UX instead of typing these Python wrappers?

WTF. Thanks Pavel. I thought i only need to set MTU=8. but i ignored the fact that there where 2 bitrates set :slight_smile:

1 Like