Ubuntu 23.04 - usb interface not detected (no drivers)

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
LS___
Posts: 3
Joined: Sat 10. Jun 2023, 18:16

Ubuntu 23.04 - usb interface not detected (no drivers)

Post by LS___ » Sat 10. Jun 2023, 18:23

Recently i've upgraded from 20.04 to 23.04. After that Pcan View says it did not detect any interface. So i went through what's written in here:
https://www.peak-system.com/fileadmin/m ... /index.htm
first, check if drivers are in system:

Code: Select all

~$ grep PEAK_ /boot/config-`uname -r`
CONFIG_CAN_PEAK_PCIEFD=m
CONFIG_CAN_PEAK_PCI=m
CONFIG_CAN_PEAK_PCIEC=y
CONFIG_CAN_PEAK_PCMCIA=m
CONFIG_CAN_PEAK_USB=m
second is if the device is initialized:

Code: Select all

lsmod | grep ^peak
and nothing here is returned.

I've run "pcan-kernel-version.sh" script which did not return anything as well.

i've had no problems before the upgrade. Did anyone had the same situation?

Thanks in advance

EDIT:
trying to follow kernel docs, chapter 3.1 on building the driver, as i found this:
https://forum.peak-system.com/viewtopic.php?t=7280

but here is what i'm getting, and i have no clue what i'm doing wrong.

Code: Select all

:/usr/src/peak-linux-driver-8.16.0# make
make[1]: Wejście do katalogu '/usr/src/peak-linux-driver-8.16.0/driver'
***
*** Making pcan driver in chardev mode
***
*** Host OS Release=Ubuntu v23.04
*** Host machine kernel version=6.2.0-20-generic
*** Driver kernel version=6.2.0-20-generic (6.2.0)
*** Path to kernel sources=/usr/src/linux-headers-6.2.0-20-generic
*** use KBUILD=yes
*** use DKMS=
*** gcc version=12
***
make -C /usr/src/linux-headers-6.2.0-20-generic  EXTRA_CFLAGS="-I/usr/src/peak-linux-driver-8.16.0/driver -DNO_DEBUG -DMODVERSIONS -DNO_PARPORT_SUBSYSTEM -DUSB_SUPPORT -DPCI_SUPPORT -DPCIEC_SUPPORT -DISA_SUPPORT -DNO_DONGLE_SUPPORT -DNO_PCCARD_SUPPORT -DNO_NETDEV_SUPPORT -DNO_RT   -Wno-date-time" V=0 modules M=/usr/src/peak-linux-driver-8.16.0/driver
make[2]: Wejście do katalogu '/usr/src/linux-headers-6.2.0-20-generic'

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.

make[2]: *** [Makefile:820: include/config/auto.conf] Błąd 1
make[2]: Opuszczenie katalogu '/usr/src/linux-headers-6.2.0-20-generic'
make[1]: *** [Makefile:523: all] Błąd 2
make[1]: Opuszczenie katalogu '/usr/src/peak-linux-driver-8.16.0/driver'
make: *** [Makefile:84: all] Błąd 2

LS___
Posts: 3
Joined: Sat 10. Jun 2023, 18:16

Re: Ubuntu 23.04 - usb interface not detected (no drivers)

Post by LS___ » Sat 10. Jun 2023, 22:35

I just realised that when i run pcan-kernel-version.sh the cable was disconnected, it now returns

Code: Select all

Bus 001 Device 066: ID 0c72:000c PEAK System PCAN-USB needs Linux 3.4

LS___
Posts: 3
Joined: Sat 10. Jun 2023, 18:16

Re: Ubuntu 23.04 - usb interface not detected (no drivers)

Post by LS___ » Sun 11. Jun 2023, 09:43

Got it working. Started today with a fresh mind.

Removed system linux-headers
the same for user linux-headers
installed system linux-headers
the same for user linux-headers
downloaded drivers again

sudo make clean all
sudo make install

(it did not work with DKMS, "no rules to execute object" or something like that)
Anyway, i hope this helps someone or future me after another Ubuntu update.

beadon
Posts: 1
Joined: Thu 17. Aug 2023, 22:36

Re: Ubuntu 23.04 - usb interface not detected (no drivers)

Post by beadon » Thu 17. Aug 2023, 22:44

Love it when the cable is just disconnected :).

Since you're running 23.04, I suspect you might have a fixed up apt package system too.

It looks like PEAK doesn't yet support Ubuntu 23.04 (Lunar), according to these instructions.
https://www.peak-system.com/fileadmin/m ... /index.htm


Have your solved this, or do you know if PEAK is publishing a software update shortly ?



Thanks!

Post Reply