I am trying to bridge UDP to CAN using slcand on my Jetson AGX Orin Develeoper Kit with Ubuntu 22.04 (JetPack 6). While the UDP link to /dev/ttycan0 works, I encounter the following error when trying to use slcand:
slcand -o -c -F -s8 /dev/ttycan0 vcan0 &
Ioctl TIOCSETD: Invalid Argument
I’ve tried various options, but none have worked. Interestingly, when I set this up on an AGX Xavier with Ubuntu 20.04 (Focal), it works fine without any issues.
Additionally, when I attempt to load the slcan module on my Orin system I get the following error:
xyz-desktop:~/xxx$ sudo modprobe slcan
modprobe: FATAL: Module slcan not found in directory /lib/modules/5.15.136-tegra
Is it possible to use SLCAN with JetPack 6? Has anyone successfully set up SLCAN on Ubuntu 22.04 for Jetson devices, or are there any known workarounds for this issue?
Thank you in advance for any advice or solutions!
for reference here is my full script
# Start socat to forward UDP packets to the pseudo-terminal device
socat udp4-datagram:192.168.131.2:11412,bind=:11412,range=192.168.131.1/24 pty,link=/dev/ttycan0 &
echo $! > /run/can-udp-bridge.pid
sleep 1
# Start slcand to create the vcan0 interface
slcand -o -c -F -s8 /dev/ttycan0 vcan0 &
echo $! >> /run/can-udp-bridge.pid
sleep 1
# Create the virtual CAN interface if not already created
ip link add dev vcan0 type vcan
# Set txqueuelen for vcan0 and bring it up
ip link set vcan0 txqueuelen 100
ip link set vcan0 up
I successfully downloaded the driver files and installed the SLCAN module. I built the slcan.ko file and copied it to /drivers/net/can. Now, the SLCAN starts without any issues. I’ll be testing the full setup today as well.
I downloaded the Driver Package (BSP) Sources and after enabling the SLCAN in config, I installed the modules and retrieved the slcan.ko driver, now it works without problem.