Xavier nx has only one can, and ifconfig displays can0,; I need two channels of can, so I need to configure mcp2515 as can1, but now after the configuration is completed, mcp2515 is displayed as can0, and nx’s own display is displayed as can1
There is a problem. After changing the address in the device tree, I can set mcp2515 to can1, but it will return to its original state when I refresh next time. So, there are still problems. Do you have a solution
I create a new file “77-nx-can-config.rules” in the “/etc/udev/rules. d” directory of the development board, and add the following information to the newly created file
After restarting the development board, the can interface has not changed. Can you help me see what is wrong with the configuration. The following is my can information
nvidia@nvidia-desktop:/etc/udev/rules.d$ udevadm info -a -p /sys/class/net/can0
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/3230000.spi/spi_master/spi2/spi2.0/net/can0':
KERNEL=="can0"
SUBSYSTEM=="net"
DRIVER==""
ATTR{addr_assign_type}=="0"
ATTR{addr_len}=="0"
ATTR{address}==""
ATTR{broadcast}==""
ATTR{carrier}=="1"
ATTR{carrier_changes}=="1"
ATTR{dev_id}=="0x0"
ATTR{dev_port}=="0"
ATTR{dormant}=="0"
ATTR{flags}=="0x40081"
ATTR{gro_flush_timeout}=="0"
ATTR{ifalias}==""
ATTR{ifindex}=="4"
ATTR{iflink}=="4"
ATTR{link_mode}=="0"
ATTR{mtu}=="16"
ATTR{netdev_group}=="0"
ATTR{operstate}=="up"
ATTR{proto_down}=="0"
ATTR{tx_queue_len}=="10"
ATTR{type}=="280"
looking at parent device '/devices/3230000.spi/spi_master/spi2/spi2.0':
KERNELS=="spi2.0"
SUBSYSTEMS=="spi"
DRIVERS=="mcp251x"
looking at parent device '/devices/3230000.spi/spi_master/spi2':
KERNELS=="spi2"
SUBSYSTEMS=="spi_master"
DRIVERS==""
looking at parent device '/devices/3230000.spi':
KERNELS=="3230000.spi"
SUBSYSTEMS=="platform"
DRIVERS=="spi-tegra114"
ATTRS{driver_override}=="(null)"
nvidia@nvidia-desktop:/etc/udev/rules.d$ udevadm info -a -p /sys/class/net/can1
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/c310000.mttcan/net/can1':
KERNEL=="can1"
SUBSYSTEM=="net"
DRIVER==""
ATTR{addr_assign_type}=="0"
ATTR{addr_len}=="0"
ATTR{address}==""
ATTR{broadcast}==""
ATTR{carrier}=="1"
ATTR{carrier_changes}=="1"
ATTR{cccr_init_txbar}=="CCCR.INIT reset"
ATTR{dev_id}=="0x0"
ATTR{dev_port}=="0"
ATTR{dormant}=="0"
ATTR{flags}=="0x40081"
ATTR{gro_flush_timeout}=="0"
ATTR{ifalias}==""
ATTR{ifindex}=="8"
ATTR{iflink}=="8"
ATTR{link_mode}=="0"
ATTR{mtu}=="16"
ATTR{netdev_group}=="0"
ATTR{operstate}=="up"
ATTR{proto_down}=="0"
ATTR{std_filter}=="Standard Filters"
ATTR{tdc_offset}=="tdc_offset=0x0, DBTP.tdc=0"
ATTR{trigger_mem}=="Trigger Memory Elements"
ATTR{tx_queue_len}=="10"
ATTR{txbar}=="Not implemented"
ATTR{type}=="280"
ATTR{xtd_filter}=="Extended Filters"
looking at parent device '/devices/c310000.mttcan':
KERNELS=="c310000.mttcan"
SUBSYSTEMS=="platform"
DRIVERS=="mttcan"
ATTRS{driver_override}=="(null)"