PCAN-miniPCIe FD driver for Linux arm64/aarch64 architecture

This forum covers PCAN-Linux and Linux development issues concerning our products
M.Heidemann
Sales & Support
Sales & Support
Posts: 673
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN-miniPCIe FD driver for Linux arm64/aarch64 architecture

Post by M.Heidemann » Wed 25. Aug 2021, 11:50

With a PCAN-PCIe you should not need to install the driver at all,
just uninstall the driver package and reboot the machine.

The maniline kernel 4.9 already includes the drivers for PCAN-PCIe.

Once everythin is uninstalled and the PC rebooted, check via

Code: Select all

ip link ls
if the device comes up with channels as "can0, can1, can2" etc.

Best Regards

Marvin

JoshBowman
Posts: 9
Joined: Mon 23. Aug 2021, 19:53

Re: PCAN-miniPCIe FD driver for Linux arm64/aarch64 architecture

Post by JoshBowman » Thu 26. Aug 2021, 16:34

---
Last edited by JoshBowman on Thu 26. Aug 2021, 16:39, edited 1 time in total.

JoshBowman
Posts: 9
Joined: Mon 23. Aug 2021, 19:53

Re: PCAN-miniPCIe FD driver for Linux arm64/aarch64 architecture

Post by JoshBowman » Thu 26. Aug 2021, 16:36

Does this look fine (before I crash the system again)?

Code: Select all

robot@robot:~/Downloads/peak-linux-driver-8.12.0$ sudo make -C driver install
make: Entering directory '/home/robot/Downloads/peak-linux-driver-8.12.0/driver'
mkdir -p /usr/local/bin
cp -f udev/pcan_usb_minor_check.bash /usr/local/bin
chmod 744 /usr/local/bin/pcan_usb_minor_check.bash
cp -f udev/45-pcan.rules /etc/udev/rules.d
Info: Copied 45-pcan.rules to /etc/udev/rules.d.
cp -f udev/blacklist-peak.conf /etc/modprobe.d
chmod 644 /etc/modprobe.d/blacklist-peak.conf
Info: mainline drivers removed and blacklisted in
      /etc/modprobe.d/blacklist-peak.conf
udevadm control --reload-rules
make: *** No rule to make target 'pcan.ko', needed by 'install_module'.  Stop.
make: Leaving directory '/home/robot/Downloads/peak-linux-driver-8.12.0/driver'

Code: Select all

robot@robot:~/Downloads/peak-linux-driver-8.12.0$ sudo lspci -vvv -d 1c:
0005:01:00.0 Network controller: PEAK-System Technik GmbH Device 0003 (rev 02)
	Subsystem: PEAK-System Technik GmbH Device 0005
	Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Interrupt: pin A routed to IRQ 0
	Region 0: Memory at 1f40000000 (32-bit, non-prefetchable) [disabled] [size=64K]
	Region 1: Memory at 1f40010000 (32-bit, non-prefetchable) [disabled] [size=64K]
	Capabilities: [50] Power Management version 0
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
		Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [70] MSI: Enable- Count=1/2 Maskable- 64bit+
		Address: 0000000000000000  Data: 0000
	Capabilities: [90] Express (v1) Endpoint, MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
			ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 0.000W
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
			MaxPayload 128 bytes, MaxReadReq 512 bytes
		DevSta:	CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
		LnkCap:	Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Exit Latency L0s unlimited, L1 <1us
			ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
		LnkCtl:	ASPM Disabled; RCB 64 bytes Disabled- CommClk-
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
	Capabilities: [100 v1] Vendor Specific Information: ID=0000 Rev=0 Len=00c <?>

M.Heidemann
Sales & Support
Sales & Support
Posts: 673
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN-miniPCIe FD driver for Linux arm64/aarch64 architecture

Post by M.Heidemann » Thu 26. Aug 2021, 16:39

Hello,

Did you check if you have the driver included in your kernel yet?

uninstall the driver and delete its remains.

reboot your machine.

Check if your can channels show up via

Code: Select all

ip link ls

they should be coming up as can0, can1, etc

Your kernel 4.9 includes driver for PCAN-PCI already, no need
to install the one from the package.

Best Regards

Marvin

JoshBowman
Posts: 9
Joined: Mon 23. Aug 2021, 19:53

Re: PCAN-miniPCIe FD driver for Linux arm64/aarch64 architecture

Post by JoshBowman » Sun 29. Aug 2021, 11:54

Code: Select all

$ cd peak-linux-driver-8.12.0
$ sudo make uninstall
Reboot...I don't see any information with "Kernel driver in use" nor "Kernel modules".

Code: Select all

sudo lspci -v
...
0005:01:00.0 Network controller: PEAK-System Technik GmbH Device 0003 (rev 02)
        Subsystem: PEAK-System Technik GmbH Device 0005
        Flags: fast devsel
        Memory at 1f40000000 (32-bit, non-prefetchable) [disabled] [size=64K]
        Memory at 1f40010000 (32-bit, non-prefetchable) [disabled] [size=64K]
        Capabilities: [50] Power Management version 0
        Capabilities: [70] MSI: Enable- Count=1/2 Maskable- 64bit+
        Capabilities: [90] Express Endpoint, MSI 00
        Capabilities: [100] Vendor Specific Information: ID=0000 Rev=0 Len=00c <?>
I think this should be:

Code: Select all

Kernel driver in use: pcan
Kernel modules: pcan
In general, I cannot find pcan on my system.

Code: Select all

cat: /proc/pcan: No such file or directory

Code: Select all

ls  -l  /dev/pcan*
ls: cannot access '/dev/pcan*': No such file or directory

Code: Select all

/etc/modprobe.d$ ls
alsa-base.conf           blacklist-framebuffer.conf   blacklist-tegra-safety.conf
bcmdhd.conf              blacklist-modem.conf         iwlwifi.conf
blacklist-ath_pci.conf   blacklist-mttcan.conf        tegra-udrm.conf
blacklist.conf           blacklist-oss.conf
blacklist-firewire.conf  blacklist-rare-network.conf

Code: Select all

ip link ls
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 3e:8c:ed:0a:9b:78 brd ff:ff:ff:ff:ff:ff
3: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
    link/ether 48:b0:2d:3a:86:90 brd ff:ff:ff:ff:ff:ff
4: l4tbr0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 9a:8a:ae:12:94:65 brd ff:ff:ff:ff:ff:ff
5: rndis0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master l4tbr0 state DOWN mode DEFAULT group default qlen 1000
    link/ether 9a:8a:ae:12:94:65 brd ff:ff:ff:ff:ff:ff
6: usb0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master l4tbr0 state DOWN mode DEFAULT group default qlen 1000
    link/ether 9a:8a:ae:12:94:67 brd ff:ff:ff:ff:ff:ff
7: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
    link/ether 34:c9:3d:a2:a2:47 brd ff:ff:ff:ff:ff:ff
8: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
    link/ether 02:42:5f:14:80:69 brd ff:ff:ff:ff:ff:ff
9: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:0e:c6:bd:36:11 brd ff:ff:ff:ff:ff:ff

JoshBowman
Posts: 9
Joined: Mon 23. Aug 2021, 19:53

Re: PCAN-miniPCIe FD driver for Linux arm64/aarch64 architecture

Post by JoshBowman » Sun 29. Aug 2021, 15:29

Code: Select all

zcat /proc/config.gz | egrep PEAK_     
# CONFIG_CAN_PEAK_PCI is not set
CONFIG_CAN_PEAK_USB=m
Does this look like a problem?

M.Heidemann
Sales & Support
Sales & Support
Posts: 673
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN-miniPCIe FD driver for Linux arm64/aarch64 architecture

Post by M.Heidemann » Mon 30. Aug 2021, 09:47

Hello,

Could you please just check:

Code: Select all

ip link ls
and share the output with us?

thanks.

Best Regards

Marvin

JoshBowman
Posts: 9
Joined: Mon 23. Aug 2021, 19:53

Re: PCAN-miniPCIe FD driver for Linux arm64/aarch64 architecture

Post by JoshBowman » Mon 30. Aug 2021, 09:59

Code: Select all

$ ip link ls
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 56:f1:a9:2f:3f:1f brd ff:ff:ff:ff:ff:ff
3: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
    link/ether 48:b0:2d:3a:86:90 brd ff:ff:ff:ff:ff:ff
4: l4tbr0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 9a:8a:ae:12:94:65 brd ff:ff:ff:ff:ff:ff
5: rndis0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master l4tbr0 state DOWN mode DEFAULT group default qlen 1000
    link/ether 9a:8a:ae:12:94:65 brd ff:ff:ff:ff:ff:ff
6: usb0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master l4tbr0 state DOWN mode DEFAULT group default qlen 1000
    link/ether 9a:8a:ae:12:94:67 brd ff:ff:ff:ff:ff:ff
7: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
    link/ether 34:c9:3d:a2:a2:47 brd ff:ff:ff:ff:ff:ff
8: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
    link/ether 02:42:dc:cb:61:d9 brd ff:ff:ff:ff:ff:ff
9: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:0e:c6:bd:36:11 brd ff:ff:ff:ff:ff:ff

M.Heidemann
Sales & Support
Sales & Support
Posts: 673
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN-miniPCIe FD driver for Linux arm64/aarch64 architecture

Post by M.Heidemann » Mon 30. Aug 2021, 10:27

Hello,

Thank you for confirming this.

By default the drivers for PCAN-PCI should be included in the kernel,
seems like your kernel-config excluded them.

Code: Select all

cat /proc/config.gz | egrep PEAK_     
# CONFIG_CAN_PEAK_PCI is not set
CONFIG_CAN_PEAK_USB=m
In this case you'll have to change the config for your kernel and recompile it to include
the necessary drivers for PCAN-PCI.

Best Regards

Marvin

Post Reply