This forum covers PCAN-Linux and Linux development issues concerning our products
-
inspire
- Posts: 2
- Joined: Fri 9. Jun 2017, 19:32
Post
by inspire » Fri 9. Jun 2017, 19:39
Hi,
I try to use the peak can driver with ubuntu server 16.04 but the driver is not loaded automatically. I installed the driver 8.3.1 with and without netdev support without success. The problem is always the same: If I start linux with the USB-CAN Dongle attached, the command "ifconfig -a" does not show any can device. But if comment all lines from the file /etc/modprobe.d/blacklist-peak.conf, plug the dongle in and out, uncomment the lines again and plug the dongle in again, the device is suddenly shown with "ifconfig -a".
The make install command also shows:
Info: Copied 45-pcan.rules to /etc/udev/rules.d.
Info: mainline drivers removed and blacklisted in
/etc/modprobe.d/blacklist-peak.conf
Makefile:507: recipe for target 'install_udev' failed
How can I make linux enable the dongle automatically?
Thanks in advance!
inspire
-
M.Maidhof
- Support

- Posts: 1753
- Joined: Wed 22. Sep 2010, 14:00
Post
by M.Maidhof » Mon 12. Jun 2017, 12:19
Hi,
if you want to use the NetDev driver interface with the PCAN-USB and Ubuntu 16.04, there is no need to install our peak-linux-driver. To disable the blacklisting of the kernel driver, please call "sudo make uninstall" in the peak-linux-driver-8.3.1 directory, and reboot your system once.
Please also check that you don´t use any USB extension cables or unpowered USB hubs between your PC and the PCAN-USB.
best regards
Michael
-
inspire
- Posts: 2
- Joined: Fri 9. Jun 2017, 19:32
Post
by inspire » Tue 13. Jun 2017, 20:56
Hi Michael,
You are right, without the drivers it works perfectly, thanks!
-
fmueller
- Posts: 2
- Joined: Tue 12. Sep 2017, 09:20
Post
by fmueller » Tue 12. Sep 2017, 09:29
Hy, I have the same problem. But nothing of the solutions here works.
Here are my outputs:
uname -a
Code: Select all
Linux fmueller-linux 4.11.0-11-generic #16-Ubuntu SMP Wed Jul 12 20:40:19 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
cat /boot/config-4.11.0-11-generic |grep -i can
Code: Select all
CONFIG_NET_EMATCH_CANID=m
CONFIG_CAN=m
CONFIG_CAN_RAW=m
CONFIG_CAN_BCM=m
CONFIG_CAN_GW=m
# CAN Device Drivers
CONFIG_CAN_VCAN=m
CONFIG_CAN_SLCAN=m
CONFIG_CAN_DEV=m
CONFIG_CAN_CALC_BITTIMING=y
CONFIG_CAN_LEDS=y
CONFIG_CAN_JANZ_ICAN3=m
CONFIG_CAN_C_CAN=m
CONFIG_CAN_C_CAN_PLATFORM=m
CONFIG_CAN_C_CAN_PCI=m
CONFIG_CAN_CC770=m
CONFIG_CAN_CC770_ISA=m
CONFIG_CAN_CC770_PLATFORM=m
CONFIG_CAN_IFI_CANFD=m
CONFIG_CAN_M_CAN=m
CONFIG_CAN_SJA1000=m
CONFIG_CAN_SJA1000_ISA=m
CONFIG_CAN_SJA1000_PLATFORM=m
CONFIG_CAN_EMS_PCMCIA=m
CONFIG_CAN_EMS_PCI=m
CONFIG_CAN_PEAK_PCMCIA=m
CONFIG_CAN_PEAK_PCI=m
CONFIG_CAN_PEAK_PCIEC=y
CONFIG_CAN_KVASER_PCI=m
CONFIG_CAN_PLX_PCI=m
CONFIG_CAN_SOFTING=m
CONFIG_CAN_SOFTING_CS=m
# CAN SPI interfaces
CONFIG_CAN_MCP251X=m
# CAN USB interfaces
CONFIG_CAN_EMS_USB=m
CONFIG_CAN_ESD_USB2=m
CONFIG_CAN_GS_USB=m
CONFIG_CAN_KVASER_USB=m
CONFIG_CAN_PEAK_USB=m
CONFIG_CAN_8DEV_USB=m
# CONFIG_CAN_DEBUG_DEVICES is not set
CONFIG_SCSI_SCAN_ASYNC=y
# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
sudo ifconfig -a
Code: Select all
can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
enp58s0f1 Link encap:Ethernet HWaddr 80:fa:5b:48:2b:24
inet addr:192.168.114.54 Bcast:192.168.114.255 Mask:255.255.255.0
inet6 addr: fe80::9336:6fb:720e:65a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4295 errors:0 dropped:0 overruns:0 frame:0
TX packets:2653 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:826970 (826.9 KB) TX bytes:213235 (213.2 KB)
enx0071007ff509 Link encap:Ethernet HWaddr 00:71:00:7f:f5:09
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:370 errors:0 dropped:0 overruns:0 frame:0
TX packets:370 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:29738 (29.7 KB) TX bytes:29738 (29.7 KB)
wlp59s0 Link encap:Ethernet HWaddr b0:35:9f:2c:54:b1
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
But if I run
candump can0 I got
or
sudo ifconfig can0 up
Last edited by
M.Gerber on Tue 12. Sep 2017, 14:14, edited 1 time in total.
Reason: Inserted [code] tags for improved readability
-
S.Grosjean
- Software Development

- Posts: 357
- Joined: Wed 4. Jul 2012, 17:02
Post
by S.Grosjean » Tue 12. Sep 2017, 09:56
Hi,
You have first to setup the bitrate in the PCAN-USB:
Code: Select all
$ ip link set can0 type can bitrate 500000
$ ip link set can0 up
$ ip -s -d link show can0
4: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10
link/can promiscuity 0
can state ERROR-ACTIVE restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
pcan_usb: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
$ candump can0
Regards,
Stéphane
— Stéphane
-
fmueller
- Posts: 2
- Joined: Tue 12. Sep 2017, 09:20
Post
by fmueller » Tue 12. Sep 2017, 11:53
Thanks!!! I forgot it!
