ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

sudo ip link set can0 up Cannot find device "can0"

asked 2019-11-04 04:25:45 -0500

roslearner gravatar image

updated 2019-11-04 04:29:45 -0500

socketcan_interface,the ros package seems not working.I am using Peak-Can USB at Ubuntu 18.04.3 and 16.04,melodic.I am sure pcan driver is installed fine,testing by pcan-viewer.
But neither can work,with same error"Cannot find device "can0"",when executing "sudo ip link set can0 up",really confused,wish for reply,thanks~

edit retag flag offensive close merge delete

Comments

sudo ip link set can0 type can bitrate 500000

Try this maybe before you give your command

Let me know, if it had worked, we can update it as an answer!

pmuthu2s gravatar image pmuthu2s  ( 2019-11-04 08:15:32 -0500 )edit

No, it's not working. Above I have said,it's just right this conmand "set ip link set can0 type can bitrate 500000" causes the error occurrence---"cannot find device can0".

roslearner gravatar image roslearner  ( 2019-11-04 10:53:18 -0500 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2019-11-04 22:29:38 -0500

roslearner gravatar image

Have been solved. when building Peak Can usb driver,use this : make –C driver NET=NETDEV_SUPPORT referenced from PCAN-Driver-Linux_UserMan_eng.pdf in driver/documentation folder.

edit flag offensive delete link more
0

answered 2019-11-04 12:05:40 -0500

duck-development gravatar image

updated 2019-11-04 12:08:24 -0500

If you try to write ifconfig - a do you see the can0 device

Did you look At the dmesg output.

Is the led light up on the interface.

Check: Are CAN drivers part of your Linux environment? Open a terminal and type:

grep PEAK_ /boot/config-`uname -r`

All PEAK drivers are listed (y = included in kernel, m = separate module) but this may not work in every Linux environment.

Check: Is the CAN device initialized? Open a terminal and type:

 lsmod | grep ^peak

If, for example, a USB-based CAN interface from PEAK is connected and initialized, the output will be at least one line starting with peak_usb.

Did you look at the manual from peak http://www.peak-system.com/fileadmin/...

edit flag offensive delete link more

Comments

pm-autodrive@pm-autodrive:~$ grep PEAK_ /boot/config-uname -r

CONFIG_CAN_PEAK_PCIEFD=m CONFIG_CAN_PEAK_PCMCIA=m CONFIG_CAN_PEAK_PCI=m CONFIG_CAN_PEAK_PCIEC=y CONFIG_CAN_PEAK_USB=m

pm-autodrive@pm-autodrive:~$ **lsmod | grep ^peak

peak_usb 45056 0**

pm-autodrive@pm-autodrive:~$ sudo ip link set peak_usb up type can bitrate 500000 [sudo] password for pm-autodrive: Cannot find device "peak_usb"

roslearner gravatar image roslearner  ( 2019-11-04 19:26:50 -0500 )edit

ifconfig - a there is no can0

I use a peak-can usb not pcie can card.

roslearner gravatar image roslearner  ( 2019-11-04 19:40:09 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2019-11-04 04:23:12 -0500

Seen: 13,378 times

Last updated: Nov 04 '19