I use i.MX6 DL processor and I tried to set CAN device. However I received the error
ip: RTNETLINK answers: Operation not supported
Could you help me to add CAN device?
root@tx6-dl:~/CanDrivers# ls
can-bcm.ko can-dev.ko can-gw.ko can-raw.ko can.ko flexcan.ko
root@tx6-dl:~/CanDrivers# modprobe flexcan
root@tx6-dl:~/CanDrivers# modprobe can_raw
root@tx6-dl:~/CanDrivers# modprobe can
root@tx6-dl:~/CanDrivers# ip link add dev can0 type can
ip: RTNETLINK answers: Operation not supported
root@tx6-dl:~/CanDrivers# ip link add dev can0 type flexcan
ip: RTNETLINK answers: Operation not supported
root@tx6-dl:~/CanDrivers#
Hi Victor,
which kernel version are you using?
What lsmod says after your modprobes ?
--
Marco
Hi Marco
Please see below:
Linux version 3.12.0-rc6-next-20131024-karo+
root@tx6-dl:~/CanDrivers# lsmod
Not tainted
w1_gpio 2735 0 - Live 0x7f2bf000
wire 22248 1 w1_gpio, Live 0x7f2b3000
vcan 1954 0 - Live 0x7f2af000
usbtouchscreen 5379 0 - Live 0x7f2aa000
usbtest 20574 0 - Live 0x7f2a0000
usbserial 24948 0 - Live 0x7f293000
usbmon 17921 0 - Live 0x7f28a000
usbhid 18608 0 - Live 0x7f281000
ums_sddr55 5654 0 - Live 0x7f27c000
ums_sddr09 9547 0 - Live 0x7f276000
ums_realtek 7582 0 - Live 0x7f270000
ums_datafab 5430 0 - Live 0x7f26b000
usb_storage 42463 4 ums_sddr55,ums_sddr09,ums_realtek,ums_datafab, Live 0x7f2570
udf 73831 0 - Live 0x7f23e000
spi_imx 9502 0 - Live 0x7f237000
spi_gpio 5134 0 - Live 0x7f232000
spi_bitbang 3907 2 spi_imx,spi_gpio, Live 0x7f22e000
sparse_keymap 3766 0 - Live 0x7f22a000
snd_soc_imx_audmux 5332 0 - Live 0x7f1cd000
snd_page_alloc 5120 0 - Live 0x7f170000
regmap_spi 1913 0 - Live 0x7f140000
regmap_i2c 1645 0 - Live 0x7f13c000
phy_gpio_vbus_usb 3344 0 - Live 0x7f138000
msdos 6758 0 - Live 0x7f133000
matrix_keymap 2473 0 - Live 0x7f12f000
libcomposite 36522 0 - Live 0x7f11f000
libahci 26285 0 - Live 0x7f112000
ledtrig_gpio 2950 0 - Live 0x7f10e000
isofs 29506 0 - Live 0x7f102000
i2c_gpio 3220 0 - Live 0x7f0e8000
i2c_dev 5114 0 - Live 0x7f0e3000
gadgetfs 19526 0 - Live 0x7f0da000
udc_core 9156 2 libcomposite,gadgetfs, Live 0x7f0d3000
flexcan 9142 0 - Live 0x7f0cd000
ehci_hcd 55793 0 - Live 0x7f0b9000
usbcore 177871 11 usbtouchscreen,usbtest,usbserial,usbmon,usbhid,ums_sddr55,ums0
usb_common 2849 4 usbtest,libcomposite,udc_core,usbcore, Live 0x7f076000
edt_ft5x06 9089 0 - Live 0x7f06f000
crc_itu_t 1533 1 udf, Live 0x7f06b000
configfs 26751 2 libcomposite, Live 0x7f05e000
can_raw 5987 0 - Live 0x7f059000
can_gw 7699 0 - Live 0x7f054000
can_dev 9544 1 flexcan, Live 0x7f04d000
can_bcm 10732 0 - Live 0x7f01a000
evbug 1881 0 - Live 0x7f016000
can 23212 3 can_raw,can_gw,can_bcm, Live 0x7f00c000
evdev 10143 0 - Live 0x7f005000
tsc2007 4628 0 - Live 0x7f000000
root@tx6-dl:~/CanDrivers#
Hi Victor,
try following this thread, it works on my side.
https://community.freescale.com/thread/308441
--
Marco Cavallini | KOAN sas | Bergamo - Italia
Hi
I installed a new version of iproute2 package and was able to set up CAN device.
root@tx6-dl:~/Working# ./ip link set up can0 type can bitrate 20000
flexcan 2094000.flexcan can0: writing ctrl=0xdb29a0d5
flexcan 2094000.flexcan can0: flexcan_set_bittiming: mcr=0x5980000f ctrl=0xdb29a0d5
flexcan 2094000.flexcan can0: flexcan_chip_start: writing mcr=0x79a20208
flexcan 2094000.flexcan can0: flexcan_chip_start: writing ctrl=0xdb29acd5
flexcan 2094000.flexcan can0: flexcan_chip_start: reading mcr=0x69a20208 ctrl=0xdb29acd5
Regards
Victor