From eb381156e31ad7ad7def07aa19d16c3c2cce2c09 Mon Sep 17 00:00:00 2001 From: anderssandstrom Date: Thu, 25 Mar 2021 14:47:11 +0100 Subject: [PATCH] Update README.md --- kvaser/obsolete/README.md | 128 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/kvaser/obsolete/README.md b/kvaser/obsolete/README.md index f152e8a..cef2e94 100644 --- a/kvaser/obsolete/README.md +++ b/kvaser/obsolete/README.md @@ -79,3 +79,131 @@ These error messages are normal when the usb is unplugged while link is up (conf So conclusion is that use of "kvaser/socketcan_kvaser_drivers_1.6.113_patch_asm_3.10.tar.gz" is the only way to make it work under kernel 3.10. According to Kvaser support this approach is OK and should work just fine. Also test shows it works well. + +# OBSOLETE NOTES BELOW: +#### 1. First test without install of driver and without kvaser leaf connected. + +Check support before install of driver: + +``` +sudo cat /boot/config-3.10.0-1127.el7.x86_64 | grep KVASER +CONFIG_CAN_KVASER_PCI=m +CONFIG_CAN_KVASER_USB=m +``` + +Seems support for KVASER_USB already without installing. + +Check ip addr: +``` +ip addr +1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 + link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 + inet 127.0.0.1/8 scope host lo + valid_lft forever preferred_lft forever + inet6 ::1/128 scope host + valid_lft forever preferred_lft forever +2: eno1: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 + link/ether c0:3f:d5:66:25:44 brd ff:ff:ff:ff:ff:ff + inet 172.30.2.34/27 brd 172.30.2.63 scope global noprefixroute dynamic eno1 + valid_lft 9999557sec preferred_lft 9999557sec + inet6 fe80::c23f:d5ff:fe66:2544/64 scope link noprefixroute + valid_lft forever preferred_lft forever + + +``` +Seems no can interface (and it's not connected). + +#### 2. Connect kvaser leaf: + +Check ip addr: +``` +ip addr +1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 + link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 + inet 127.0.0.1/8 scope host lo + valid_lft forever preferred_lft forever + inet6 ::1/128 scope host + valid_lft forever preferred_lft forever +2: eno1: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 + link/ether c0:3f:d5:66:25:44 brd ff:ff:ff:ff:ff:ff + inet 172.30.2.34/27 brd 172.30.2.63 scope global noprefixroute dynamic eno1 + valid_lft 9999557sec preferred_lft 9999557sec + inet6 fe80::c23f:d5ff:fe66:2544/64 scope link noprefixroute + valid_lft forever preferred_lft forever + + +``` +Still no can0... + +``` +dmesg:[ 543.068096] usb 2-4: new high-speed USB device number 4 using xhci_hcd +[ 543.191792] usb 2-4: New USB device found, idVendor=0bfd, idProduct=0120, bcdDevice= 0.01 +[ 543.191803] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 +[ 543.191809] usb 2-4: Product: Kvaser Leaf Light v2 +[ 543.191815] usb 2-4: Manufacturer: Kvaser AB + +``` + + +#### 3. Try start services and conf if + +###### Services +Start services: +``` +$ sudo modprobe can_dev +$ sudo modprobe can +$ sudo modprobe can_raw +$ sudo ip link set can0 type can bitrate 125000 + +``` +Conclusion: +Cannot find can0.. Need to install kvaser driver.. + + +#### Insall kvaser socketcan 3.10 + +##### 1 unplug kvaser leaf + +##### 2 untar driver source +``` +cd kvaser +tar -xvf socketcan_kvaser_drivers_for_3.10.tar +cd socketcan_kvaser_drivers/ +``` + +NOTE: The socketcan_kvaser_drivers_for_3.10.tar was recived on request from kvaser support. Their normal socketcan driver will not support kernel 3.10. + +##### 3 make +Read the README file in kvaser driver. +These commands are from that README: +``` +$ sudo make uninstall +$ make +$ sudo make install +``` + +Fails at make... + +sudo yum install kernel-devel +The kernel sources are at the wrong place.. Sources for wrong kernel!! + +Need to update + +``` +sudo yum update +``` +Now the kernel sources are at the corerct location. patched version of new socketcan version builds and seems to work with candump and connected pmu905 + +#### THIS IS A SIDE NOTE for PEAK usb CAN interface !!! + +Check if support for PEAK USB +``` +sudo cat /boot/config-3.10.0-1127.el7.x86_64 | grep PEAK +CONFIG_CAN_PEAK_PCI=m +CONFIG_CAN_PEAK_PCIEC=y +CONFIG_CAN_PEAK_USB=m +CONFIG_SND_FIREWIRE_SPEAKERS=m +# CONFIG_SPEAKUP is not set +``` + +