Hi, I added a CAN transceiver this morning and I have been able to send and receive messages instantly using SocketCAN feature tools: cansend and candump
You can install those using sudo apt-get install can-utils
thank you for share your experience
as my transceiver is on the way to my home. I am curious
if you can get the specific id that you want to get from the python code
thanks
Systemd and ubuntu have a bunch of different ways to activate network interfaces.
To see how network interfaces typically start up, do “sudo journalctl -xb --unit NetworkManager.service” to see logs of the network manager.
Easiest might be to hit it with a hammer, and create a script that installs the modules and brings up the interface, and then make sure that script gets started on bootup by creating a .system module file and put it in /etc/systemd/system
Better might be to list the modules in the /etc/modules file, and then define the interfaces in /etc/network/interfaces.
You can also put scripts in /etc/network/if-up.d/ that run when network interfaces show up; that script can look for the can interfaces and do whatever you want.
I resoved it by commenting out #mttcan in /etc/modprobe.d/blacklist-mttcan.conf in order ensure that the modules were loaded.
Then I added this to /etc/network/interfaces
[b]# interfaces(5) file used by ifup(8) and ifdown(8)
Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto can0
iface can0 inet manual
pre-up /sbin/ip link set $IFACE type can bitrate 500000
up /sbin/ifconfig $IFACE up
down /sbin/ifconfig $IFACE down[/b]
I have an Elroy Carrier board for the Jetson TX2 and want to use it, and because it has no pins for CANbus, I was planning to use the SPI…
What SPI to CANChip are you using?
It will be useful to know.